/*
 * SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
 *
 * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
 */

// This file is auto-generated. Do not edit directly.

use crate::{event::enums::*, Level};
use std::borrow::Cow;

impl EventType {
    pub fn parse(value: &str) -> Option<Self> {
        hashify::map! {
            value.as_bytes(),
            EventType,
            b"acme.auth-start" => EventType::Acme(AcmeEvent::AuthStart),
            b"acme.auth-pending" => EventType::Acme(AcmeEvent::AuthPending),
            b"acme.auth-valid" => EventType::Acme(AcmeEvent::AuthValid),
            b"acme.auth-completed" => EventType::Acme(AcmeEvent::AuthCompleted),
            b"acme.auth-error" => EventType::Acme(AcmeEvent::AuthError),
            b"acme.auth-too-many-attempts" => EventType::Acme(AcmeEvent::AuthTooManyAttempts),
            b"acme.process-cert" => EventType::Acme(AcmeEvent::ProcessCert),
            b"acme.order-start" => EventType::Acme(AcmeEvent::OrderStart),
            b"acme.order-processing" => EventType::Acme(AcmeEvent::OrderProcessing),
            b"acme.order-completed" => EventType::Acme(AcmeEvent::OrderCompleted),
            b"acme.order-ready" => EventType::Acme(AcmeEvent::OrderReady),
            b"acme.order-valid" => EventType::Acme(AcmeEvent::OrderValid),
            b"acme.order-invalid" => EventType::Acme(AcmeEvent::OrderInvalid),
            b"acme.renew-backoff" => EventType::Acme(AcmeEvent::RenewBackoff),
            b"acme.client-supplied-sni" => EventType::Acme(AcmeEvent::ClientSuppliedSni),
            b"acme.client-missing-sni" => EventType::Acme(AcmeEvent::ClientMissingSni),
            b"acme.tls-alpn-received" => EventType::Acme(AcmeEvent::TlsAlpnReceived),
            b"acme.tls-alpn-error" => EventType::Acme(AcmeEvent::TlsAlpnError),
            b"acme.token-not-found" => EventType::Acme(AcmeEvent::TokenNotFound),
            b"acme.error" => EventType::Acme(AcmeEvent::Error),
            b"ai.llm-response" => EventType::Ai(AiEvent::LlmResponse),
            b"ai.api-error" => EventType::Ai(AiEvent::ApiError),
            b"arc.chain-too-long" => EventType::Arc(ArcEvent::ChainTooLong),
            b"arc.invalid-instance" => EventType::Arc(ArcEvent::InvalidInstance),
            b"arc.invalid-cv" => EventType::Arc(ArcEvent::InvalidCv),
            b"arc.has-header-tag" => EventType::Arc(ArcEvent::HasHeaderTag),
            b"arc.broken-chain" => EventType::Arc(ArcEvent::BrokenChain),
            b"arc.sealer-not-found" => EventType::Arc(ArcEvent::SealerNotFound),
            b"auth.success" => EventType::Auth(AuthEvent::Success),
            b"auth.failed" => EventType::Auth(AuthEvent::Failed),
            b"auth.token-expired" => EventType::Auth(AuthEvent::TokenExpired),
            b"auth.mfa-required" => EventType::Auth(AuthEvent::MfaRequired),
            b"auth.too-many-attempts" => EventType::Auth(AuthEvent::TooManyAttempts),
            b"auth.client-registration" => EventType::Auth(AuthEvent::ClientRegistration),
            b"auth.error" => EventType::Auth(AuthEvent::Error),
            b"auth.warning" => EventType::Auth(AuthEvent::Warning),
            b"auth.credential-expired" => EventType::Auth(AuthEvent::CredentialExpired),
            b"calendar.rule-expansion-error" => EventType::Calendar(CalendarEvent::RuleExpansionError),
            b"calendar.alarm-sent" => EventType::Calendar(CalendarEvent::AlarmSent),
            b"calendar.alarm-skipped" => EventType::Calendar(CalendarEvent::AlarmSkipped),
            b"calendar.alarm-recipient-override" => EventType::Calendar(CalendarEvent::AlarmRecipientOverride),
            b"calendar.alarm-failed" => EventType::Calendar(CalendarEvent::AlarmFailed),
            b"calendar.itip-message-sent" => EventType::Calendar(CalendarEvent::ItipMessageSent),
            b"calendar.itip-message-received" => EventType::Calendar(CalendarEvent::ItipMessageReceived),
            b"calendar.itip-message-error" => EventType::Calendar(CalendarEvent::ItipMessageError),
            b"cluster.startup" => EventType::Cluster(ClusterEvent::Startup),
            b"cluster.subscriber-start" => EventType::Cluster(ClusterEvent::SubscriberStart),
            b"cluster.subscriber-stop" => EventType::Cluster(ClusterEvent::SubscriberStop),
            b"cluster.subscriber-error" => EventType::Cluster(ClusterEvent::SubscriberError),
            b"cluster.subscriber-disconnected" => EventType::Cluster(ClusterEvent::SubscriberDisconnected),
            b"cluster.publisher-start" => EventType::Cluster(ClusterEvent::PublisherStart),
            b"cluster.publisher-stop" => EventType::Cluster(ClusterEvent::PublisherStop),
            b"cluster.publisher-error" => EventType::Cluster(ClusterEvent::PublisherError),
            b"cluster.message-received" => EventType::Cluster(ClusterEvent::MessageReceived),
            b"cluster.message-skipped" => EventType::Cluster(ClusterEvent::MessageSkipped),
            b"cluster.message-invalid" => EventType::Cluster(ClusterEvent::MessageInvalid),
            b"cluster.node-id-renewed" => EventType::Cluster(ClusterEvent::NodeIdRenewed),
            b"dane.authentication-success" => EventType::Dane(DaneEvent::AuthenticationSuccess),
            b"dane.authentication-failure" => EventType::Dane(DaneEvent::AuthenticationFailure),
            b"dane.no-certificates-found" => EventType::Dane(DaneEvent::NoCertificatesFound),
            b"dane.certificate-parse-error" => EventType::Dane(DaneEvent::CertificateParseError),
            b"dane.tlsa-record-match" => EventType::Dane(DaneEvent::TlsaRecordMatch),
            b"dane.tlsa-record-fetch" => EventType::Dane(DaneEvent::TlsaRecordFetch),
            b"dane.tlsa-record-fetch-error" => EventType::Dane(DaneEvent::TlsaRecordFetchError),
            b"dane.tlsa-record-not-found" => EventType::Dane(DaneEvent::TlsaRecordNotFound),
            b"dane.tlsa-record-not-dnssec-signed" => EventType::Dane(DaneEvent::TlsaRecordNotDnssecSigned),
            b"dane.tlsa-record-invalid" => EventType::Dane(DaneEvent::TlsaRecordInvalid),
            b"delivery.attempt-start" => EventType::Delivery(DeliveryEvent::AttemptStart),
            b"delivery.attempt-end" => EventType::Delivery(DeliveryEvent::AttemptEnd),
            b"delivery.completed" => EventType::Delivery(DeliveryEvent::Completed),
            b"delivery.failed" => EventType::Delivery(DeliveryEvent::Failed),
            b"delivery.domain-delivery-start" => EventType::Delivery(DeliveryEvent::DomainDeliveryStart),
            b"delivery.mx-lookup" => EventType::Delivery(DeliveryEvent::MxLookup),
            b"delivery.mx-lookup-failed" => EventType::Delivery(DeliveryEvent::MxLookupFailed),
            b"delivery.ip-lookup" => EventType::Delivery(DeliveryEvent::IpLookup),
            b"delivery.ip-lookup-failed" => EventType::Delivery(DeliveryEvent::IpLookupFailed),
            b"delivery.null-mx" => EventType::Delivery(DeliveryEvent::NullMx),
            b"delivery.connect" => EventType::Delivery(DeliveryEvent::Connect),
            b"delivery.connect-error" => EventType::Delivery(DeliveryEvent::ConnectError),
            b"delivery.missing-outbound-hostname" => EventType::Delivery(DeliveryEvent::MissingOutboundHostname),
            b"delivery.greeting-failed" => EventType::Delivery(DeliveryEvent::GreetingFailed),
            b"delivery.ehlo" => EventType::Delivery(DeliveryEvent::Ehlo),
            b"delivery.ehlo-rejected" => EventType::Delivery(DeliveryEvent::EhloRejected),
            b"delivery.auth" => EventType::Delivery(DeliveryEvent::Auth),
            b"delivery.auth-failed" => EventType::Delivery(DeliveryEvent::AuthFailed),
            b"delivery.mail-from" => EventType::Delivery(DeliveryEvent::MailFrom),
            b"delivery.mail-from-rejected" => EventType::Delivery(DeliveryEvent::MailFromRejected),
            b"delivery.delivered" => EventType::Delivery(DeliveryEvent::Delivered),
            b"delivery.rcpt-to" => EventType::Delivery(DeliveryEvent::RcptTo),
            b"delivery.rcpt-to-rejected" => EventType::Delivery(DeliveryEvent::RcptToRejected),
            b"delivery.rcpt-to-failed" => EventType::Delivery(DeliveryEvent::RcptToFailed),
            b"delivery.message-rejected" => EventType::Delivery(DeliveryEvent::MessageRejected),
            b"delivery.start-tls" => EventType::Delivery(DeliveryEvent::StartTls),
            b"delivery.start-tls-unavailable" => EventType::Delivery(DeliveryEvent::StartTlsUnavailable),
            b"delivery.start-tls-error" => EventType::Delivery(DeliveryEvent::StartTlsError),
            b"delivery.start-tls-disabled" => EventType::Delivery(DeliveryEvent::StartTlsDisabled),
            b"delivery.implicit-tls-error" => EventType::Delivery(DeliveryEvent::ImplicitTlsError),
            b"delivery.concurrency-limit-exceeded" => EventType::Delivery(DeliveryEvent::ConcurrencyLimitExceeded),
            b"delivery.rate-limit-exceeded" => EventType::Delivery(DeliveryEvent::RateLimitExceeded),
            b"delivery.double-bounce" => EventType::Delivery(DeliveryEvent::DoubleBounce),
            b"delivery.dsn-success" => EventType::Delivery(DeliveryEvent::DsnSuccess),
            b"delivery.dsn-temp-fail" => EventType::Delivery(DeliveryEvent::DsnTempFail),
            b"delivery.dsn-perm-fail" => EventType::Delivery(DeliveryEvent::DsnPermFail),
            b"delivery.raw-input" => EventType::Delivery(DeliveryEvent::RawInput),
            b"delivery.raw-output" => EventType::Delivery(DeliveryEvent::RawOutput),
            b"dkim.pass" => EventType::Dkim(DkimEvent::Pass),
            b"dkim.neutral" => EventType::Dkim(DkimEvent::Neutral),
            b"dkim.fail" => EventType::Dkim(DkimEvent::Fail),
            b"dkim.perm-error" => EventType::Dkim(DkimEvent::PermError),
            b"dkim.temp-error" => EventType::Dkim(DkimEvent::TempError),
            b"dkim.none" => EventType::Dkim(DkimEvent::None),
            b"dkim.unsupported-version" => EventType::Dkim(DkimEvent::UnsupportedVersion),
            b"dkim.unsupported-algorithm" => EventType::Dkim(DkimEvent::UnsupportedAlgorithm),
            b"dkim.unsupported-canonicalization" => EventType::Dkim(DkimEvent::UnsupportedCanonicalization),
            b"dkim.unsupported-key-type" => EventType::Dkim(DkimEvent::UnsupportedKeyType),
            b"dkim.failed-body-hash-match" => EventType::Dkim(DkimEvent::FailedBodyHashMatch),
            b"dkim.failed-verification" => EventType::Dkim(DkimEvent::FailedVerification),
            b"dkim.failed-auid-match" => EventType::Dkim(DkimEvent::FailedAuidMatch),
            b"dkim.revoked-public-key" => EventType::Dkim(DkimEvent::RevokedPublicKey),
            b"dkim.incompatible-algorithms" => EventType::Dkim(DkimEvent::IncompatibleAlgorithms),
            b"dkim.signature-expired" => EventType::Dkim(DkimEvent::SignatureExpired),
            b"dkim.signature-length" => EventType::Dkim(DkimEvent::SignatureLength),
            b"dkim.signer-not-found" => EventType::Dkim(DkimEvent::SignerNotFound),
            b"dkim.build-error" => EventType::Dkim(DkimEvent::BuildError),
            b"dkim.signature-created" => EventType::Dkim(DkimEvent::SignatureCreated),
            b"dkim.signature-published" => EventType::Dkim(DkimEvent::SignaturePublished),
            b"dkim.signature-retiring" => EventType::Dkim(DkimEvent::SignatureRetiring),
            b"dkim.signature-retired" => EventType::Dkim(DkimEvent::SignatureRetired),
            b"dkim.signature-deleted" => EventType::Dkim(DkimEvent::SignatureDeleted),
            b"dmarc.pass" => EventType::Dmarc(DmarcEvent::Pass),
            b"dmarc.fail" => EventType::Dmarc(DmarcEvent::Fail),
            b"dmarc.perm-error" => EventType::Dmarc(DmarcEvent::PermError),
            b"dmarc.temp-error" => EventType::Dmarc(DmarcEvent::TempError),
            b"dmarc.none" => EventType::Dmarc(DmarcEvent::None),
            b"dns.record-created" => EventType::Dns(DnsEvent::RecordCreated),
            b"dns.record-creation-failed" => EventType::Dns(DnsEvent::RecordCreationFailed),
            b"dns.record-deletion-failed" => EventType::Dns(DnsEvent::RecordDeletionFailed),
            b"dns.record-not-propagated" => EventType::Dns(DnsEvent::RecordNotPropagated),
            b"dns.record-lookup-failed" => EventType::Dns(DnsEvent::RecordLookupFailed),
            b"dns.record-propagated" => EventType::Dns(DnsEvent::RecordPropagated),
            b"dns.record-propagation-timeout" => EventType::Dns(DnsEvent::RecordPropagationTimeout),
            b"dns.build-error" => EventType::Dns(DnsEvent::BuildError),
            b"eval.result" => EventType::Eval(EvalEvent::Result),
            b"eval.error" => EventType::Eval(EvalEvent::Error),
            b"eval.directory-not-found" => EventType::Eval(EvalEvent::DirectoryNotFound),
            b"eval.store-not-found" => EventType::Eval(EvalEvent::StoreNotFound),
            b"http.connection-start" => EventType::Http(HttpEvent::ConnectionStart),
            b"http.connection-end" => EventType::Http(HttpEvent::ConnectionEnd),
            b"http.error" => EventType::Http(HttpEvent::Error),
            b"http.request-url" => EventType::Http(HttpEvent::RequestUrl),
            b"http.request-body" => EventType::Http(HttpEvent::RequestBody),
            b"http.response-body" => EventType::Http(HttpEvent::ResponseBody),
            b"http.x-forwarded-missing" => EventType::Http(HttpEvent::XForwardedMissing),
            b"imap.connection-start" => EventType::Imap(ImapEvent::ConnectionStart),
            b"imap.connection-end" => EventType::Imap(ImapEvent::ConnectionEnd),
            b"imap.get-acl" => EventType::Imap(ImapEvent::GetAcl),
            b"imap.set-acl" => EventType::Imap(ImapEvent::SetAcl),
            b"imap.my-rights" => EventType::Imap(ImapEvent::MyRights),
            b"imap.list-rights" => EventType::Imap(ImapEvent::ListRights),
            b"imap.append" => EventType::Imap(ImapEvent::Append),
            b"imap.capabilities" => EventType::Imap(ImapEvent::Capabilities),
            b"imap.id" => EventType::Imap(ImapEvent::Id),
            b"imap.close" => EventType::Imap(ImapEvent::Close),
            b"imap.copy" => EventType::Imap(ImapEvent::Copy),
            b"imap.move" => EventType::Imap(ImapEvent::Move),
            b"imap.create-mailbox" => EventType::Imap(ImapEvent::CreateMailbox),
            b"imap.delete-mailbox" => EventType::Imap(ImapEvent::DeleteMailbox),
            b"imap.rename-mailbox" => EventType::Imap(ImapEvent::RenameMailbox),
            b"imap.enable" => EventType::Imap(ImapEvent::Enable),
            b"imap.expunge" => EventType::Imap(ImapEvent::Expunge),
            b"imap.fetch" => EventType::Imap(ImapEvent::Fetch),
            b"imap.idle-start" => EventType::Imap(ImapEvent::IdleStart),
            b"imap.idle-stop" => EventType::Imap(ImapEvent::IdleStop),
            b"imap.list" => EventType::Imap(ImapEvent::List),
            b"imap.lsub" => EventType::Imap(ImapEvent::Lsub),
            b"imap.logout" => EventType::Imap(ImapEvent::Logout),
            b"imap.namespace" => EventType::Imap(ImapEvent::Namespace),
            b"imap.noop" => EventType::Imap(ImapEvent::Noop),
            b"imap.search" => EventType::Imap(ImapEvent::Search),
            b"imap.sort" => EventType::Imap(ImapEvent::Sort),
            b"imap.select" => EventType::Imap(ImapEvent::Select),
            b"imap.status" => EventType::Imap(ImapEvent::Status),
            b"imap.store" => EventType::Imap(ImapEvent::Store),
            b"imap.subscribe" => EventType::Imap(ImapEvent::Subscribe),
            b"imap.unsubscribe" => EventType::Imap(ImapEvent::Unsubscribe),
            b"imap.thread" => EventType::Imap(ImapEvent::Thread),
            b"imap.get-quota" => EventType::Imap(ImapEvent::GetQuota),
            b"imap.error" => EventType::Imap(ImapEvent::Error),
            b"imap.raw-input" => EventType::Imap(ImapEvent::RawInput),
            b"imap.raw-output" => EventType::Imap(ImapEvent::RawOutput),
            b"incoming-report.dmarc-report" => EventType::IncomingReport(IncomingReportEvent::DmarcReport),
            b"incoming-report.dmarc-report-with-warnings" => EventType::IncomingReport(IncomingReportEvent::DmarcReportWithWarnings),
            b"incoming-report.tls-report" => EventType::IncomingReport(IncomingReportEvent::TlsReport),
            b"incoming-report.tls-report-with-warnings" => EventType::IncomingReport(IncomingReportEvent::TlsReportWithWarnings),
            b"incoming-report.abuse-report" => EventType::IncomingReport(IncomingReportEvent::AbuseReport),
            b"incoming-report.auth-failure-report" => EventType::IncomingReport(IncomingReportEvent::AuthFailureReport),
            b"incoming-report.fraud-report" => EventType::IncomingReport(IncomingReportEvent::FraudReport),
            b"incoming-report.not-spam-report" => EventType::IncomingReport(IncomingReportEvent::NotSpamReport),
            b"incoming-report.virus-report" => EventType::IncomingReport(IncomingReportEvent::VirusReport),
            b"incoming-report.other-report" => EventType::IncomingReport(IncomingReportEvent::OtherReport),
            b"incoming-report.message-parse-failed" => EventType::IncomingReport(IncomingReportEvent::MessageParseFailed),
            b"incoming-report.dmarc-parse-failed" => EventType::IncomingReport(IncomingReportEvent::DmarcParseFailed),
            b"incoming-report.tls-rpc-parse-failed" => EventType::IncomingReport(IncomingReportEvent::TlsRpcParseFailed),
            b"incoming-report.arf-parse-failed" => EventType::IncomingReport(IncomingReportEvent::ArfParseFailed),
            b"incoming-report.decompress-error" => EventType::IncomingReport(IncomingReportEvent::DecompressError),
            b"iprev.pass" => EventType::Iprev(IprevEvent::Pass),
            b"iprev.fail" => EventType::Iprev(IprevEvent::Fail),
            b"iprev.perm-error" => EventType::Iprev(IprevEvent::PermError),
            b"iprev.temp-error" => EventType::Iprev(IprevEvent::TempError),
            b"iprev.none" => EventType::Iprev(IprevEvent::None),
            b"jmap.method-call" => EventType::Jmap(JmapEvent::MethodCall),
            b"jmap.invalid-arguments" => EventType::Jmap(JmapEvent::InvalidArguments),
            b"jmap.request-too-large" => EventType::Jmap(JmapEvent::RequestTooLarge),
            b"jmap.state-mismatch" => EventType::Jmap(JmapEvent::StateMismatch),
            b"jmap.anchor-not-found" => EventType::Jmap(JmapEvent::AnchorNotFound),
            b"jmap.unsupported-filter" => EventType::Jmap(JmapEvent::UnsupportedFilter),
            b"jmap.unsupported-sort" => EventType::Jmap(JmapEvent::UnsupportedSort),
            b"jmap.unknown-method" => EventType::Jmap(JmapEvent::UnknownMethod),
            b"jmap.invalid-result-reference" => EventType::Jmap(JmapEvent::InvalidResultReference),
            b"jmap.forbidden" => EventType::Jmap(JmapEvent::Forbidden),
            b"jmap.account-not-found" => EventType::Jmap(JmapEvent::AccountNotFound),
            b"jmap.account-not-supported-by-method" => EventType::Jmap(JmapEvent::AccountNotSupportedByMethod),
            b"jmap.account-read-only" => EventType::Jmap(JmapEvent::AccountReadOnly),
            b"jmap.not-found" => EventType::Jmap(JmapEvent::NotFound),
            b"jmap.cannot-calculate-changes" => EventType::Jmap(JmapEvent::CannotCalculateChanges),
            b"jmap.unknown-data-type" => EventType::Jmap(JmapEvent::UnknownDataType),
            b"jmap.unknown-capability" => EventType::Jmap(JmapEvent::UnknownCapability),
            b"jmap.not-json" => EventType::Jmap(JmapEvent::NotJson),
            b"jmap.not-request" => EventType::Jmap(JmapEvent::NotRequest),
            b"jmap.websocket-start" => EventType::Jmap(JmapEvent::WebsocketStart),
            b"jmap.websocket-stop" => EventType::Jmap(JmapEvent::WebsocketStop),
            b"jmap.websocket-error" => EventType::Jmap(JmapEvent::WebsocketError),
            b"limit.size-request" => EventType::Limit(LimitEvent::SizeRequest),
            b"limit.size-upload" => EventType::Limit(LimitEvent::SizeUpload),
            b"limit.calls-in" => EventType::Limit(LimitEvent::CallsIn),
            b"limit.concurrent-request" => EventType::Limit(LimitEvent::ConcurrentRequest),
            b"limit.concurrent-upload" => EventType::Limit(LimitEvent::ConcurrentUpload),
            b"limit.concurrent-connection" => EventType::Limit(LimitEvent::ConcurrentConnection),
            b"limit.quota" => EventType::Limit(LimitEvent::Quota),
            b"limit.blob-quota" => EventType::Limit(LimitEvent::BlobQuota),
            b"limit.tenant-quota" => EventType::Limit(LimitEvent::TenantQuota),
            b"limit.too-many-requests" => EventType::Limit(LimitEvent::TooManyRequests),
            b"mail-auth.parse-error" => EventType::MailAuth(MailAuthEvent::ParseError),
            b"mail-auth.missing-parameters" => EventType::MailAuth(MailAuthEvent::MissingParameters),
            b"mail-auth.no-headers-found" => EventType::MailAuth(MailAuthEvent::NoHeadersFound),
            b"mail-auth.crypto" => EventType::MailAuth(MailAuthEvent::Crypto),
            b"mail-auth.io" => EventType::MailAuth(MailAuthEvent::Io),
            b"mail-auth.base64" => EventType::MailAuth(MailAuthEvent::Base64),
            b"mail-auth.dns-error" => EventType::MailAuth(MailAuthEvent::DnsError),
            b"mail-auth.dns-record-not-found" => EventType::MailAuth(MailAuthEvent::DnsRecordNotFound),
            b"mail-auth.dns-invalid-record-type" => EventType::MailAuth(MailAuthEvent::DnsInvalidRecordType),
            b"mail-auth.policy-not-aligned" => EventType::MailAuth(MailAuthEvent::PolicyNotAligned),
            b"manage-sieve.connection-start" => EventType::ManageSieve(ManageSieveEvent::ConnectionStart),
            b"manage-sieve.connection-end" => EventType::ManageSieve(ManageSieveEvent::ConnectionEnd),
            b"manage-sieve.create-script" => EventType::ManageSieve(ManageSieveEvent::CreateScript),
            b"manage-sieve.update-script" => EventType::ManageSieve(ManageSieveEvent::UpdateScript),
            b"manage-sieve.get-script" => EventType::ManageSieve(ManageSieveEvent::GetScript),
            b"manage-sieve.delete-script" => EventType::ManageSieve(ManageSieveEvent::DeleteScript),
            b"manage-sieve.rename-script" => EventType::ManageSieve(ManageSieveEvent::RenameScript),
            b"manage-sieve.check-script" => EventType::ManageSieve(ManageSieveEvent::CheckScript),
            b"manage-sieve.have-space" => EventType::ManageSieve(ManageSieveEvent::HaveSpace),
            b"manage-sieve.list-scripts" => EventType::ManageSieve(ManageSieveEvent::ListScripts),
            b"manage-sieve.set-active" => EventType::ManageSieve(ManageSieveEvent::SetActive),
            b"manage-sieve.capabilities" => EventType::ManageSieve(ManageSieveEvent::Capabilities),
            b"manage-sieve.start-tls" => EventType::ManageSieve(ManageSieveEvent::StartTls),
            b"manage-sieve.unauthenticate" => EventType::ManageSieve(ManageSieveEvent::Unauthenticate),
            b"manage-sieve.logout" => EventType::ManageSieve(ManageSieveEvent::Logout),
            b"manage-sieve.noop" => EventType::ManageSieve(ManageSieveEvent::Noop),
            b"manage-sieve.error" => EventType::ManageSieve(ManageSieveEvent::Error),
            b"manage-sieve.raw-input" => EventType::ManageSieve(ManageSieveEvent::RawInput),
            b"manage-sieve.raw-output" => EventType::ManageSieve(ManageSieveEvent::RawOutput),
            b"message-ingest.ham" => EventType::MessageIngest(MessageIngestEvent::Ham),
            b"message-ingest.spam" => EventType::MessageIngest(MessageIngestEvent::Spam),
            b"message-ingest.imap-append" => EventType::MessageIngest(MessageIngestEvent::ImapAppend),
            b"message-ingest.jmap-append" => EventType::MessageIngest(MessageIngestEvent::JmapAppend),
            b"message-ingest.duplicate" => EventType::MessageIngest(MessageIngestEvent::Duplicate),
            b"message-ingest.error" => EventType::MessageIngest(MessageIngestEvent::Error),
            b"message-ingest.search-index" => EventType::MessageIngest(MessageIngestEvent::SearchIndex),
            b"milter.read" => EventType::Milter(MilterEvent::Read),
            b"milter.write" => EventType::Milter(MilterEvent::Write),
            b"milter.action-accept" => EventType::Milter(MilterEvent::ActionAccept),
            b"milter.action-discard" => EventType::Milter(MilterEvent::ActionDiscard),
            b"milter.action-reject" => EventType::Milter(MilterEvent::ActionReject),
            b"milter.action-temp-fail" => EventType::Milter(MilterEvent::ActionTempFail),
            b"milter.action-reply-code" => EventType::Milter(MilterEvent::ActionReplyCode),
            b"milter.action-connection-failure" => EventType::Milter(MilterEvent::ActionConnectionFailure),
            b"milter.action-shutdown" => EventType::Milter(MilterEvent::ActionShutdown),
            b"milter.io-error" => EventType::Milter(MilterEvent::IoError),
            b"milter.frame-too-large" => EventType::Milter(MilterEvent::FrameTooLarge),
            b"milter.frame-invalid" => EventType::Milter(MilterEvent::FrameInvalid),
            b"milter.unexpected-response" => EventType::Milter(MilterEvent::UnexpectedResponse),
            b"milter.timeout" => EventType::Milter(MilterEvent::Timeout),
            b"milter.tls-invalid-name" => EventType::Milter(MilterEvent::TlsInvalidName),
            b"milter.disconnected" => EventType::Milter(MilterEvent::Disconnected),
            b"milter.parse-error" => EventType::Milter(MilterEvent::ParseError),
            b"mta-hook.action-accept" => EventType::MtaHook(MtaHookEvent::ActionAccept),
            b"mta-hook.action-discard" => EventType::MtaHook(MtaHookEvent::ActionDiscard),
            b"mta-hook.action-reject" => EventType::MtaHook(MtaHookEvent::ActionReject),
            b"mta-hook.action-quarantine" => EventType::MtaHook(MtaHookEvent::ActionQuarantine),
            b"mta-hook.error" => EventType::MtaHook(MtaHookEvent::Error),
            b"mta-sts.authorized" => EventType::MtaSts(MtaStsEvent::Authorized),
            b"mta-sts.not-authorized" => EventType::MtaSts(MtaStsEvent::NotAuthorized),
            b"mta-sts.policy-fetch" => EventType::MtaSts(MtaStsEvent::PolicyFetch),
            b"mta-sts.policy-not-found" => EventType::MtaSts(MtaStsEvent::PolicyNotFound),
            b"mta-sts.policy-fetch-error" => EventType::MtaSts(MtaStsEvent::PolicyFetchError),
            b"mta-sts.invalid-policy" => EventType::MtaSts(MtaStsEvent::InvalidPolicy),
            b"network.listen-start" => EventType::Network(NetworkEvent::ListenStart),
            b"network.listen-stop" => EventType::Network(NetworkEvent::ListenStop),
            b"network.listen-error" => EventType::Network(NetworkEvent::ListenError),
            b"network.bind-error" => EventType::Network(NetworkEvent::BindError),
            b"network.read-error" => EventType::Network(NetworkEvent::ReadError),
            b"network.write-error" => EventType::Network(NetworkEvent::WriteError),
            b"network.flush-error" => EventType::Network(NetworkEvent::FlushError),
            b"network.accept-error" => EventType::Network(NetworkEvent::AcceptError),
            b"network.split-error" => EventType::Network(NetworkEvent::SplitError),
            b"network.timeout" => EventType::Network(NetworkEvent::Timeout),
            b"network.closed" => EventType::Network(NetworkEvent::Closed),
            b"network.proxy-error" => EventType::Network(NetworkEvent::ProxyError),
            b"network.set-opt-error" => EventType::Network(NetworkEvent::SetOptError),
            b"outgoing-report.spf-report" => EventType::OutgoingReport(OutgoingReportEvent::SpfReport),
            b"outgoing-report.spf-rate-limited" => EventType::OutgoingReport(OutgoingReportEvent::SpfRateLimited),
            b"outgoing-report.dkim-report" => EventType::OutgoingReport(OutgoingReportEvent::DkimReport),
            b"outgoing-report.dkim-rate-limited" => EventType::OutgoingReport(OutgoingReportEvent::DkimRateLimited),
            b"outgoing-report.dmarc-report" => EventType::OutgoingReport(OutgoingReportEvent::DmarcReport),
            b"outgoing-report.dmarc-rate-limited" => EventType::OutgoingReport(OutgoingReportEvent::DmarcRateLimited),
            b"outgoing-report.dmarc-aggregate-report" => EventType::OutgoingReport(OutgoingReportEvent::DmarcAggregateReport),
            b"outgoing-report.tls-aggregate" => EventType::OutgoingReport(OutgoingReportEvent::TlsAggregate),
            b"outgoing-report.http-submission" => EventType::OutgoingReport(OutgoingReportEvent::HttpSubmission),
            b"outgoing-report.unauthorized-reporting-address" => EventType::OutgoingReport(OutgoingReportEvent::UnauthorizedReportingAddress),
            b"outgoing-report.reporting-address-validation-error" => EventType::OutgoingReport(OutgoingReportEvent::ReportingAddressValidationError),
            b"outgoing-report.not-found" => EventType::OutgoingReport(OutgoingReportEvent::NotFound),
            b"outgoing-report.submission-error" => EventType::OutgoingReport(OutgoingReportEvent::SubmissionError),
            b"outgoing-report.no-recipients-found" => EventType::OutgoingReport(OutgoingReportEvent::NoRecipientsFound),
            b"outgoing-report.locked" => EventType::OutgoingReport(OutgoingReportEvent::Locked),
            b"outgoing-report.max-size-exceeded" => EventType::OutgoingReport(OutgoingReportEvent::MaxSizeExceeded),
            b"pop3.connection-start" => EventType::Pop3(Pop3Event::ConnectionStart),
            b"pop3.connection-end" => EventType::Pop3(Pop3Event::ConnectionEnd),
            b"pop3.delete" => EventType::Pop3(Pop3Event::Delete),
            b"pop3.reset" => EventType::Pop3(Pop3Event::Reset),
            b"pop3.quit" => EventType::Pop3(Pop3Event::Quit),
            b"pop3.fetch" => EventType::Pop3(Pop3Event::Fetch),
            b"pop3.list" => EventType::Pop3(Pop3Event::List),
            b"pop3.list-message" => EventType::Pop3(Pop3Event::ListMessage),
            b"pop3.uidl" => EventType::Pop3(Pop3Event::Uidl),
            b"pop3.uidl-message" => EventType::Pop3(Pop3Event::UidlMessage),
            b"pop3.stat" => EventType::Pop3(Pop3Event::Stat),
            b"pop3.noop" => EventType::Pop3(Pop3Event::Noop),
            b"pop3.capabilities" => EventType::Pop3(Pop3Event::Capabilities),
            b"pop3.start-tls" => EventType::Pop3(Pop3Event::StartTls),
            b"pop3.utf8" => EventType::Pop3(Pop3Event::Utf8),
            b"pop3.error" => EventType::Pop3(Pop3Event::Error),
            b"pop3.raw-input" => EventType::Pop3(Pop3Event::RawInput),
            b"pop3.raw-output" => EventType::Pop3(Pop3Event::RawOutput),
            b"push-subscription.success" => EventType::PushSubscription(PushSubscriptionEvent::Success),
            b"push-subscription.error" => EventType::PushSubscription(PushSubscriptionEvent::Error),
            b"push-subscription.not-found" => EventType::PushSubscription(PushSubscriptionEvent::NotFound),
            b"queue.started" => EventType::Queue(QueueEvent::Started),
            b"queue.message-queued" => EventType::Queue(QueueEvent::MessageQueued),
            b"queue.authenticated-message-queued" => EventType::Queue(QueueEvent::AuthenticatedMessageQueued),
            b"queue.report-queued" => EventType::Queue(QueueEvent::ReportQueued),
            b"queue.dsn-queued" => EventType::Queue(QueueEvent::DsnQueued),
            b"queue.autogenerated-queued" => EventType::Queue(QueueEvent::AutogeneratedQueued),
            b"queue.rescheduled" => EventType::Queue(QueueEvent::Rescheduled),
            b"queue.locked" => EventType::Queue(QueueEvent::Locked),
            b"queue.blob-not-found" => EventType::Queue(QueueEvent::BlobNotFound),
            b"queue.rate-limit-exceeded" => EventType::Queue(QueueEvent::RateLimitExceeded),
            b"queue.concurrency-limit-exceeded" => EventType::Queue(QueueEvent::ConcurrencyLimitExceeded),
            b"queue.quota-exceeded" => EventType::Queue(QueueEvent::QuotaExceeded),
            b"queue.back-pressure" => EventType::Queue(QueueEvent::BackPressure),
            b"registry.local-read-error" => EventType::Registry(RegistryEvent::LocalReadError),
            b"registry.local-write-error" => EventType::Registry(RegistryEvent::LocalWriteError),
            b"registry.local-parse-error" => EventType::Registry(RegistryEvent::LocalParseError),
            b"registry.read-error" => EventType::Registry(RegistryEvent::ReadError),
            b"registry.write-error" => EventType::Registry(RegistryEvent::WriteError),
            b"registry.deserialization-error" => EventType::Registry(RegistryEvent::DeserializationError),
            b"registry.build-error" => EventType::Registry(RegistryEvent::BuildError),
            b"registry.build-warning" => EventType::Registry(RegistryEvent::BuildWarning),
            b"registry.not-supported" => EventType::Registry(RegistryEvent::NotSupported),
            b"registry.validation-error" => EventType::Registry(RegistryEvent::ValidationError),
            b"resource.not-found" => EventType::Resource(ResourceEvent::NotFound),
            b"resource.bad-parameters" => EventType::Resource(ResourceEvent::BadParameters),
            b"resource.error" => EventType::Resource(ResourceEvent::Error),
            b"resource.download-external" => EventType::Resource(ResourceEvent::DownloadExternal),
            b"resource.application-updated" => EventType::Resource(ResourceEvent::ApplicationUpdated),
            b"resource.application-unpacked" => EventType::Resource(ResourceEvent::ApplicationUnpacked),
            b"security.authentication-ban" => EventType::Security(SecurityEvent::AuthenticationBan),
            b"security.abuse-ban" => EventType::Security(SecurityEvent::AbuseBan),
            b"security.scan-ban" => EventType::Security(SecurityEvent::ScanBan),
            b"security.loiter-ban" => EventType::Security(SecurityEvent::LoiterBan),
            b"security.ip-blocked" => EventType::Security(SecurityEvent::IpBlocked),
            b"security.ip-block-expired" => EventType::Security(SecurityEvent::IpBlockExpired),
            b"security.ip-allow-expired" => EventType::Security(SecurityEvent::IpAllowExpired),
            b"security.ip-unauthorized" => EventType::Security(SecurityEvent::IpUnauthorized),
            b"security.unauthorized" => EventType::Security(SecurityEvent::Unauthorized),
            b"server.startup" => EventType::Server(ServerEvent::Startup),
            b"server.shutdown" => EventType::Server(ServerEvent::Shutdown),
            b"server.startup-error" => EventType::Server(ServerEvent::StartupError),
            b"server.thread-error" => EventType::Server(ServerEvent::ThreadError),
            b"server.licensing" => EventType::Server(ServerEvent::Licensing),
            b"server.recovery-mode" => EventType::Server(ServerEvent::RecoveryMode),
            b"server.bootstrap-mode" => EventType::Server(ServerEvent::BootstrapMode),
            b"sieve.action-accept" => EventType::Sieve(SieveEvent::ActionAccept),
            b"sieve.action-accept-replace" => EventType::Sieve(SieveEvent::ActionAcceptReplace),
            b"sieve.action-discard" => EventType::Sieve(SieveEvent::ActionDiscard),
            b"sieve.action-reject" => EventType::Sieve(SieveEvent::ActionReject),
            b"sieve.send-message" => EventType::Sieve(SieveEvent::SendMessage),
            b"sieve.message-too-large" => EventType::Sieve(SieveEvent::MessageTooLarge),
            b"sieve.script-not-found" => EventType::Sieve(SieveEvent::ScriptNotFound),
            b"sieve.list-not-found" => EventType::Sieve(SieveEvent::ListNotFound),
            b"sieve.runtime-error" => EventType::Sieve(SieveEvent::RuntimeError),
            b"sieve.unexpected-error" => EventType::Sieve(SieveEvent::UnexpectedError),
            b"sieve.not-supported" => EventType::Sieve(SieveEvent::NotSupported),
            b"sieve.quota-exceeded" => EventType::Sieve(SieveEvent::QuotaExceeded),
            b"smtp.connection-start" => EventType::Smtp(SmtpEvent::ConnectionStart),
            b"smtp.connection-end" => EventType::Smtp(SmtpEvent::ConnectionEnd),
            b"smtp.error" => EventType::Smtp(SmtpEvent::Error),
            b"smtp.id-not-found" => EventType::Smtp(SmtpEvent::IdNotFound),
            b"smtp.concurrency-limit-exceeded" => EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded),
            b"smtp.transfer-limit-exceeded" => EventType::Smtp(SmtpEvent::TransferLimitExceeded),
            b"smtp.rate-limit-exceeded" => EventType::Smtp(SmtpEvent::RateLimitExceeded),
            b"smtp.time-limit-exceeded" => EventType::Smtp(SmtpEvent::TimeLimitExceeded),
            b"smtp.missing-auth-directory" => EventType::Smtp(SmtpEvent::MissingAuthDirectory),
            b"smtp.message-parse-failed" => EventType::Smtp(SmtpEvent::MessageParseFailed),
            b"smtp.message-too-large" => EventType::Smtp(SmtpEvent::MessageTooLarge),
            b"smtp.loop-detected" => EventType::Smtp(SmtpEvent::LoopDetected),
            b"smtp.dkim-pass" => EventType::Smtp(SmtpEvent::DkimPass),
            b"smtp.dkim-fail" => EventType::Smtp(SmtpEvent::DkimFail),
            b"smtp.arc-pass" => EventType::Smtp(SmtpEvent::ArcPass),
            b"smtp.arc-fail" => EventType::Smtp(SmtpEvent::ArcFail),
            b"smtp.spf-ehlo-pass" => EventType::Smtp(SmtpEvent::SpfEhloPass),
            b"smtp.spf-ehlo-fail" => EventType::Smtp(SmtpEvent::SpfEhloFail),
            b"smtp.spf-from-pass" => EventType::Smtp(SmtpEvent::SpfFromPass),
            b"smtp.spf-from-fail" => EventType::Smtp(SmtpEvent::SpfFromFail),
            b"smtp.dmarc-pass" => EventType::Smtp(SmtpEvent::DmarcPass),
            b"smtp.dmarc-fail" => EventType::Smtp(SmtpEvent::DmarcFail),
            b"smtp.iprev-pass" => EventType::Smtp(SmtpEvent::IprevPass),
            b"smtp.iprev-fail" => EventType::Smtp(SmtpEvent::IprevFail),
            b"smtp.too-many-messages" => EventType::Smtp(SmtpEvent::TooManyMessages),
            b"smtp.ehlo" => EventType::Smtp(SmtpEvent::Ehlo),
            b"smtp.invalid-ehlo" => EventType::Smtp(SmtpEvent::InvalidEhlo),
            b"smtp.did-not-say-ehlo" => EventType::Smtp(SmtpEvent::DidNotSayEhlo),
            b"smtp.ehlo-expected" => EventType::Smtp(SmtpEvent::EhloExpected),
            b"smtp.lhlo-expected" => EventType::Smtp(SmtpEvent::LhloExpected),
            b"smtp.mail-from-unauthenticated" => EventType::Smtp(SmtpEvent::MailFromUnauthenticated),
            b"smtp.mail-from-unauthorized" => EventType::Smtp(SmtpEvent::MailFromUnauthorized),
            b"smtp.mail-from-not-allowed" => EventType::Smtp(SmtpEvent::MailFromNotAllowed),
            b"smtp.mail-from-rewritten" => EventType::Smtp(SmtpEvent::MailFromRewritten),
            b"smtp.mail-from-missing" => EventType::Smtp(SmtpEvent::MailFromMissing),
            b"smtp.mail-from" => EventType::Smtp(SmtpEvent::MailFrom),
            b"smtp.multiple-mail-from" => EventType::Smtp(SmtpEvent::MultipleMailFrom),
            b"smtp.mailbox-does-not-exist" => EventType::Smtp(SmtpEvent::MailboxDoesNotExist),
            b"smtp.relay-not-allowed" => EventType::Smtp(SmtpEvent::RelayNotAllowed),
            b"smtp.rcpt-to" => EventType::Smtp(SmtpEvent::RcptTo),
            b"smtp.rcpt-to-duplicate" => EventType::Smtp(SmtpEvent::RcptToDuplicate),
            b"smtp.rcpt-to-rewritten" => EventType::Smtp(SmtpEvent::RcptToRewritten),
            b"smtp.rcpt-to-missing" => EventType::Smtp(SmtpEvent::RcptToMissing),
            b"smtp.rcpt-to-greylisted" => EventType::Smtp(SmtpEvent::RcptToGreylisted),
            b"smtp.too-many-recipients" => EventType::Smtp(SmtpEvent::TooManyRecipients),
            b"smtp.too-many-invalid-rcpt" => EventType::Smtp(SmtpEvent::TooManyInvalidRcpt),
            b"smtp.raw-input" => EventType::Smtp(SmtpEvent::RawInput),
            b"smtp.raw-output" => EventType::Smtp(SmtpEvent::RawOutput),
            b"smtp.missing-local-hostname" => EventType::Smtp(SmtpEvent::MissingLocalHostname),
            b"smtp.vrfy" => EventType::Smtp(SmtpEvent::Vrfy),
            b"smtp.vrfy-not-found" => EventType::Smtp(SmtpEvent::VrfyNotFound),
            b"smtp.vrfy-disabled" => EventType::Smtp(SmtpEvent::VrfyDisabled),
            b"smtp.expn" => EventType::Smtp(SmtpEvent::Expn),
            b"smtp.expn-not-found" => EventType::Smtp(SmtpEvent::ExpnNotFound),
            b"smtp.expn-disabled" => EventType::Smtp(SmtpEvent::ExpnDisabled),
            b"smtp.require-tls-disabled" => EventType::Smtp(SmtpEvent::RequireTlsDisabled),
            b"smtp.deliver-by-disabled" => EventType::Smtp(SmtpEvent::DeliverByDisabled),
            b"smtp.deliver-by-invalid" => EventType::Smtp(SmtpEvent::DeliverByInvalid),
            b"smtp.future-release-disabled" => EventType::Smtp(SmtpEvent::FutureReleaseDisabled),
            b"smtp.future-release-invalid" => EventType::Smtp(SmtpEvent::FutureReleaseInvalid),
            b"smtp.mt-priority-disabled" => EventType::Smtp(SmtpEvent::MtPriorityDisabled),
            b"smtp.mt-priority-invalid" => EventType::Smtp(SmtpEvent::MtPriorityInvalid),
            b"smtp.dsn-disabled" => EventType::Smtp(SmtpEvent::DsnDisabled),
            b"smtp.auth-not-allowed" => EventType::Smtp(SmtpEvent::AuthNotAllowed),
            b"smtp.auth-mechanism-not-supported" => EventType::Smtp(SmtpEvent::AuthMechanismNotSupported),
            b"smtp.auth-exchange-too-long" => EventType::Smtp(SmtpEvent::AuthExchangeTooLong),
            b"smtp.already-authenticated" => EventType::Smtp(SmtpEvent::AlreadyAuthenticated),
            b"smtp.noop" => EventType::Smtp(SmtpEvent::Noop),
            b"smtp.start-tls" => EventType::Smtp(SmtpEvent::StartTls),
            b"smtp.start-tls-unavailable" => EventType::Smtp(SmtpEvent::StartTlsUnavailable),
            b"smtp.start-tls-already" => EventType::Smtp(SmtpEvent::StartTlsAlready),
            b"smtp.rset" => EventType::Smtp(SmtpEvent::Rset),
            b"smtp.quit" => EventType::Smtp(SmtpEvent::Quit),
            b"smtp.help" => EventType::Smtp(SmtpEvent::Help),
            b"smtp.command-not-implemented" => EventType::Smtp(SmtpEvent::CommandNotImplemented),
            b"smtp.invalid-command" => EventType::Smtp(SmtpEvent::InvalidCommand),
            b"smtp.invalid-sender-address" => EventType::Smtp(SmtpEvent::InvalidSenderAddress),
            b"smtp.invalid-recipient-address" => EventType::Smtp(SmtpEvent::InvalidRecipientAddress),
            b"smtp.invalid-parameter" => EventType::Smtp(SmtpEvent::InvalidParameter),
            b"smtp.unsupported-parameter" => EventType::Smtp(SmtpEvent::UnsupportedParameter),
            b"smtp.syntax-error" => EventType::Smtp(SmtpEvent::SyntaxError),
            b"smtp.request-too-large" => EventType::Smtp(SmtpEvent::RequestTooLarge),
            b"spam.pyzor" => EventType::Spam(SpamEvent::Pyzor),
            b"spam.pyzor-error" => EventType::Spam(SpamEvent::PyzorError),
            b"spam.dnsbl" => EventType::Spam(SpamEvent::Dnsbl),
            b"spam.dnsbl-error" => EventType::Spam(SpamEvent::DnsblError),
            b"spam.train-started" => EventType::Spam(SpamEvent::TrainStarted),
            b"spam.train-completed" => EventType::Spam(SpamEvent::TrainCompleted),
            b"spam.train-sample-added" => EventType::Spam(SpamEvent::TrainSampleAdded),
            b"spam.train-sample-not-found" => EventType::Spam(SpamEvent::TrainSampleNotFound),
            b"spam.classify" => EventType::Spam(SpamEvent::Classify),
            b"spam.model-loaded" => EventType::Spam(SpamEvent::ModelLoaded),
            b"spam.model-not-ready" => EventType::Spam(SpamEvent::ModelNotReady),
            b"spam.model-not-found" => EventType::Spam(SpamEvent::ModelNotFound),
            b"spam.rules-updated" => EventType::Spam(SpamEvent::RulesUpdated),
            b"spf.pass" => EventType::Spf(SpfEvent::Pass),
            b"spf.fail" => EventType::Spf(SpfEvent::Fail),
            b"spf.soft-fail" => EventType::Spf(SpfEvent::SoftFail),
            b"spf.neutral" => EventType::Spf(SpfEvent::Neutral),
            b"spf.temp-error" => EventType::Spf(SpfEvent::TempError),
            b"spf.perm-error" => EventType::Spf(SpfEvent::PermError),
            b"spf.none" => EventType::Spf(SpfEvent::None),
            b"store.assert-value-failed" => EventType::Store(StoreEvent::AssertValueFailed),
            b"store.foundationdb-error" => EventType::Store(StoreEvent::FoundationdbError),
            b"store.mysql-error" => EventType::Store(StoreEvent::MysqlError),
            b"store.postgresql-error" => EventType::Store(StoreEvent::PostgresqlError),
            b"store.rocksdb-error" => EventType::Store(StoreEvent::RocksdbError),
            b"store.sqlite-error" => EventType::Store(StoreEvent::SqliteError),
            b"store.ldap-error" => EventType::Store(StoreEvent::LdapError),
            b"store.elasticsearch-error" => EventType::Store(StoreEvent::ElasticsearchError),
            b"store.meilisearch-error" => EventType::Store(StoreEvent::MeilisearchError),
            b"store.redis-error" => EventType::Store(StoreEvent::RedisError),
            b"store.s3-error" => EventType::Store(StoreEvent::S3Error),
            b"store.azure-error" => EventType::Store(StoreEvent::AzureError),
            b"store.filesystem-error" => EventType::Store(StoreEvent::FilesystemError),
            b"store.pool-error" => EventType::Store(StoreEvent::PoolError),
            b"store.data-corruption" => EventType::Store(StoreEvent::DataCorruption),
            b"store.decompress-error" => EventType::Store(StoreEvent::DecompressError),
            b"store.deserialize-error" => EventType::Store(StoreEvent::DeserializeError),
            b"store.not-found" => EventType::Store(StoreEvent::NotFound),
            b"store.not-configured" => EventType::Store(StoreEvent::NotConfigured),
            b"store.not-supported" => EventType::Store(StoreEvent::NotSupported),
            b"store.unexpected-error" => EventType::Store(StoreEvent::UnexpectedError),
            b"store.crypto-error" => EventType::Store(StoreEvent::CryptoError),
            b"store.http-store-error" => EventType::Store(StoreEvent::HttpStoreError),
            b"store.cache-miss" => EventType::Store(StoreEvent::CacheMiss),
            b"store.cache-hit" => EventType::Store(StoreEvent::CacheHit),
            b"store.cache-stale" => EventType::Store(StoreEvent::CacheStale),
            b"store.cache-update" => EventType::Store(StoreEvent::CacheUpdate),
            b"store.blob-missing-marker" => EventType::Store(StoreEvent::BlobMissingMarker),
            b"store.data-write" => EventType::Store(StoreEvent::DataWrite),
            b"store.data-iterate" => EventType::Store(StoreEvent::DataIterate),
            b"store.blob-read" => EventType::Store(StoreEvent::BlobRead),
            b"store.blob-write" => EventType::Store(StoreEvent::BlobWrite),
            b"store.blob-delete" => EventType::Store(StoreEvent::BlobDelete),
            b"store.sql-query" => EventType::Store(StoreEvent::SqlQuery),
            b"store.ldap-query" => EventType::Store(StoreEvent::LdapQuery),
            b"store.ldap-warning" => EventType::Store(StoreEvent::LdapWarning),
            b"store.http-store-fetch" => EventType::Store(StoreEvent::HttpStoreFetch),
            b"store.auto-expunge" => EventType::Store(StoreEvent::AutoExpunge),
            b"store.blob-store-purged" => EventType::Store(StoreEvent::BlobStorePurged),
            b"store.data-store-purged" => EventType::Store(StoreEvent::DataStorePurged),
            b"task-manager.task-acquired" => EventType::TaskManager(TaskManagerEvent::TaskAcquired),
            b"task-manager.task-queued" => EventType::TaskManager(TaskManagerEvent::TaskQueued),
            b"task-manager.task-scheduled" => EventType::TaskManager(TaskManagerEvent::TaskScheduled),
            b"task-manager.task-locked" => EventType::TaskManager(TaskManagerEvent::TaskLocked),
            b"task-manager.task-ignored" => EventType::TaskManager(TaskManagerEvent::TaskIgnored),
            b"task-manager.task-failed" => EventType::TaskManager(TaskManagerEvent::TaskFailed),
            b"task-manager.task-retry" => EventType::TaskManager(TaskManagerEvent::TaskRetry),
            b"task-manager.blob-not-found" => EventType::TaskManager(TaskManagerEvent::BlobNotFound),
            b"task-manager.metadata-not-found" => EventType::TaskManager(TaskManagerEvent::MetadataNotFound),
            b"task-manager.scheduler-started" => EventType::TaskManager(TaskManagerEvent::SchedulerStarted),
            b"task-manager.manager-started" => EventType::TaskManager(TaskManagerEvent::ManagerStarted),
            b"telemetry.alert-event" => EventType::Telemetry(TelemetryEvent::AlertEvent),
            b"telemetry.alert-message" => EventType::Telemetry(TelemetryEvent::AlertMessage),
            b"telemetry.log-error" => EventType::Telemetry(TelemetryEvent::LogError),
            b"telemetry.webhook-error" => EventType::Telemetry(TelemetryEvent::WebhookError),
            b"telemetry.otel-exporter-error" => EventType::Telemetry(TelemetryEvent::OtelExporterError),
            b"telemetry.otel-metrics-exporter-error" => EventType::Telemetry(TelemetryEvent::OtelMetricsExporterError),
            b"telemetry.prometheus-exporter-error" => EventType::Telemetry(TelemetryEvent::PrometheusExporterError),
            b"telemetry.journal-error" => EventType::Telemetry(TelemetryEvent::JournalError),
            b"telemetry.metrics-collected" => EventType::Telemetry(TelemetryEvent::MetricsCollected),
            b"telemetry.metrics-stored" => EventType::Telemetry(TelemetryEvent::MetricsStored),
            b"telemetry.metrics-pushed" => EventType::Telemetry(TelemetryEvent::MetricsPushed),
            b"tls.handshake" => EventType::Tls(TlsEvent::Handshake),
            b"tls.handshake-error" => EventType::Tls(TlsEvent::HandshakeError),
            b"tls.not-configured" => EventType::Tls(TlsEvent::NotConfigured),
            b"tls.certificate-not-found" => EventType::Tls(TlsEvent::CertificateNotFound),
            b"tls.no-certificates-available" => EventType::Tls(TlsEvent::NoCertificatesAvailable),
            b"tls.multiple-certificates-available" => EventType::Tls(TlsEvent::MultipleCertificatesAvailable),
            b"tls.expired-certificate-removed" => EventType::Tls(TlsEvent::ExpiredCertificateRemoved),
            b"tls-rpt.record-fetch" => EventType::TlsRpt(TlsRptEvent::RecordFetch),
            b"tls-rpt.record-fetch-error" => EventType::TlsRpt(TlsRptEvent::RecordFetchError),
            b"tls-rpt.record-not-found" => EventType::TlsRpt(TlsRptEvent::RecordNotFound),
            b"web-dav.propfind" => EventType::WebDav(WebDavEvent::Propfind),
            b"web-dav.proppatch" => EventType::WebDav(WebDavEvent::Proppatch),
            b"web-dav.get" => EventType::WebDav(WebDavEvent::Get),
            b"web-dav.head" => EventType::WebDav(WebDavEvent::Head),
            b"web-dav.report" => EventType::WebDav(WebDavEvent::Report),
            b"web-dav.mkcol" => EventType::WebDav(WebDavEvent::Mkcol),
            b"web-dav.mkcalendar" => EventType::WebDav(WebDavEvent::Mkcalendar),
            b"web-dav.delete" => EventType::WebDav(WebDavEvent::Delete),
            b"web-dav.put" => EventType::WebDav(WebDavEvent::Put),
            b"web-dav.post" => EventType::WebDav(WebDavEvent::Post),
            b"web-dav.patch" => EventType::WebDav(WebDavEvent::Patch),
            b"web-dav.copy" => EventType::WebDav(WebDavEvent::Copy),
            b"web-dav.move" => EventType::WebDav(WebDavEvent::Move),
            b"web-dav.lock" => EventType::WebDav(WebDavEvent::Lock),
            b"web-dav.unlock" => EventType::WebDav(WebDavEvent::Unlock),
            b"web-dav.acl" => EventType::WebDav(WebDavEvent::Acl),
            b"web-dav.options" => EventType::WebDav(WebDavEvent::Options),
            b"web-dav.error" => EventType::WebDav(WebDavEvent::Error),
        }
        .copied()
    }

    pub fn as_str(&self) -> &'static str {
        match self {
            EventType::Acme(AcmeEvent::AuthStart) => "acme.auth-start",
            EventType::Acme(AcmeEvent::AuthPending) => "acme.auth-pending",
            EventType::Acme(AcmeEvent::AuthValid) => "acme.auth-valid",
            EventType::Acme(AcmeEvent::AuthCompleted) => "acme.auth-completed",
            EventType::Acme(AcmeEvent::AuthError) => "acme.auth-error",
            EventType::Acme(AcmeEvent::AuthTooManyAttempts) => "acme.auth-too-many-attempts",
            EventType::Acme(AcmeEvent::ProcessCert) => "acme.process-cert",
            EventType::Acme(AcmeEvent::OrderStart) => "acme.order-start",
            EventType::Acme(AcmeEvent::OrderProcessing) => "acme.order-processing",
            EventType::Acme(AcmeEvent::OrderCompleted) => "acme.order-completed",
            EventType::Acme(AcmeEvent::OrderReady) => "acme.order-ready",
            EventType::Acme(AcmeEvent::OrderValid) => "acme.order-valid",
            EventType::Acme(AcmeEvent::OrderInvalid) => "acme.order-invalid",
            EventType::Acme(AcmeEvent::RenewBackoff) => "acme.renew-backoff",
            EventType::Acme(AcmeEvent::ClientSuppliedSni) => "acme.client-supplied-sni",
            EventType::Acme(AcmeEvent::ClientMissingSni) => "acme.client-missing-sni",
            EventType::Acme(AcmeEvent::TlsAlpnReceived) => "acme.tls-alpn-received",
            EventType::Acme(AcmeEvent::TlsAlpnError) => "acme.tls-alpn-error",
            EventType::Acme(AcmeEvent::TokenNotFound) => "acme.token-not-found",
            EventType::Acme(AcmeEvent::Error) => "acme.error",
            EventType::Ai(AiEvent::LlmResponse) => "ai.llm-response",
            EventType::Ai(AiEvent::ApiError) => "ai.api-error",
            EventType::Arc(ArcEvent::ChainTooLong) => "arc.chain-too-long",
            EventType::Arc(ArcEvent::InvalidInstance) => "arc.invalid-instance",
            EventType::Arc(ArcEvent::InvalidCv) => "arc.invalid-cv",
            EventType::Arc(ArcEvent::HasHeaderTag) => "arc.has-header-tag",
            EventType::Arc(ArcEvent::BrokenChain) => "arc.broken-chain",
            EventType::Arc(ArcEvent::SealerNotFound) => "arc.sealer-not-found",
            EventType::Auth(AuthEvent::Success) => "auth.success",
            EventType::Auth(AuthEvent::Failed) => "auth.failed",
            EventType::Auth(AuthEvent::TokenExpired) => "auth.token-expired",
            EventType::Auth(AuthEvent::MfaRequired) => "auth.mfa-required",
            EventType::Auth(AuthEvent::TooManyAttempts) => "auth.too-many-attempts",
            EventType::Auth(AuthEvent::ClientRegistration) => "auth.client-registration",
            EventType::Auth(AuthEvent::Error) => "auth.error",
            EventType::Auth(AuthEvent::Warning) => "auth.warning",
            EventType::Auth(AuthEvent::CredentialExpired) => "auth.credential-expired",
            EventType::Calendar(CalendarEvent::RuleExpansionError) => {
                "calendar.rule-expansion-error"
            }
            EventType::Calendar(CalendarEvent::AlarmSent) => "calendar.alarm-sent",
            EventType::Calendar(CalendarEvent::AlarmSkipped) => "calendar.alarm-skipped",
            EventType::Calendar(CalendarEvent::AlarmRecipientOverride) => {
                "calendar.alarm-recipient-override"
            }
            EventType::Calendar(CalendarEvent::AlarmFailed) => "calendar.alarm-failed",
            EventType::Calendar(CalendarEvent::ItipMessageSent) => "calendar.itip-message-sent",
            EventType::Calendar(CalendarEvent::ItipMessageReceived) => {
                "calendar.itip-message-received"
            }
            EventType::Calendar(CalendarEvent::ItipMessageError) => "calendar.itip-message-error",
            EventType::Cluster(ClusterEvent::Startup) => "cluster.startup",
            EventType::Cluster(ClusterEvent::SubscriberStart) => "cluster.subscriber-start",
            EventType::Cluster(ClusterEvent::SubscriberStop) => "cluster.subscriber-stop",
            EventType::Cluster(ClusterEvent::SubscriberError) => "cluster.subscriber-error",
            EventType::Cluster(ClusterEvent::SubscriberDisconnected) => {
                "cluster.subscriber-disconnected"
            }
            EventType::Cluster(ClusterEvent::PublisherStart) => "cluster.publisher-start",
            EventType::Cluster(ClusterEvent::PublisherStop) => "cluster.publisher-stop",
            EventType::Cluster(ClusterEvent::PublisherError) => "cluster.publisher-error",
            EventType::Cluster(ClusterEvent::MessageReceived) => "cluster.message-received",
            EventType::Cluster(ClusterEvent::MessageSkipped) => "cluster.message-skipped",
            EventType::Cluster(ClusterEvent::MessageInvalid) => "cluster.message-invalid",
            EventType::Cluster(ClusterEvent::NodeIdRenewed) => "cluster.node-id-renewed",
            EventType::Dane(DaneEvent::AuthenticationSuccess) => "dane.authentication-success",
            EventType::Dane(DaneEvent::AuthenticationFailure) => "dane.authentication-failure",
            EventType::Dane(DaneEvent::NoCertificatesFound) => "dane.no-certificates-found",
            EventType::Dane(DaneEvent::CertificateParseError) => "dane.certificate-parse-error",
            EventType::Dane(DaneEvent::TlsaRecordMatch) => "dane.tlsa-record-match",
            EventType::Dane(DaneEvent::TlsaRecordFetch) => "dane.tlsa-record-fetch",
            EventType::Dane(DaneEvent::TlsaRecordFetchError) => "dane.tlsa-record-fetch-error",
            EventType::Dane(DaneEvent::TlsaRecordNotFound) => "dane.tlsa-record-not-found",
            EventType::Dane(DaneEvent::TlsaRecordNotDnssecSigned) => {
                "dane.tlsa-record-not-dnssec-signed"
            }
            EventType::Dane(DaneEvent::TlsaRecordInvalid) => "dane.tlsa-record-invalid",
            EventType::Delivery(DeliveryEvent::AttemptStart) => "delivery.attempt-start",
            EventType::Delivery(DeliveryEvent::AttemptEnd) => "delivery.attempt-end",
            EventType::Delivery(DeliveryEvent::Completed) => "delivery.completed",
            EventType::Delivery(DeliveryEvent::Failed) => "delivery.failed",
            EventType::Delivery(DeliveryEvent::DomainDeliveryStart) => {
                "delivery.domain-delivery-start"
            }
            EventType::Delivery(DeliveryEvent::MxLookup) => "delivery.mx-lookup",
            EventType::Delivery(DeliveryEvent::MxLookupFailed) => "delivery.mx-lookup-failed",
            EventType::Delivery(DeliveryEvent::IpLookup) => "delivery.ip-lookup",
            EventType::Delivery(DeliveryEvent::IpLookupFailed) => "delivery.ip-lookup-failed",
            EventType::Delivery(DeliveryEvent::NullMx) => "delivery.null-mx",
            EventType::Delivery(DeliveryEvent::Connect) => "delivery.connect",
            EventType::Delivery(DeliveryEvent::ConnectError) => "delivery.connect-error",
            EventType::Delivery(DeliveryEvent::MissingOutboundHostname) => {
                "delivery.missing-outbound-hostname"
            }
            EventType::Delivery(DeliveryEvent::GreetingFailed) => "delivery.greeting-failed",
            EventType::Delivery(DeliveryEvent::Ehlo) => "delivery.ehlo",
            EventType::Delivery(DeliveryEvent::EhloRejected) => "delivery.ehlo-rejected",
            EventType::Delivery(DeliveryEvent::Auth) => "delivery.auth",
            EventType::Delivery(DeliveryEvent::AuthFailed) => "delivery.auth-failed",
            EventType::Delivery(DeliveryEvent::MailFrom) => "delivery.mail-from",
            EventType::Delivery(DeliveryEvent::MailFromRejected) => "delivery.mail-from-rejected",
            EventType::Delivery(DeliveryEvent::Delivered) => "delivery.delivered",
            EventType::Delivery(DeliveryEvent::RcptTo) => "delivery.rcpt-to",
            EventType::Delivery(DeliveryEvent::RcptToRejected) => "delivery.rcpt-to-rejected",
            EventType::Delivery(DeliveryEvent::RcptToFailed) => "delivery.rcpt-to-failed",
            EventType::Delivery(DeliveryEvent::MessageRejected) => "delivery.message-rejected",
            EventType::Delivery(DeliveryEvent::StartTls) => "delivery.start-tls",
            EventType::Delivery(DeliveryEvent::StartTlsUnavailable) => {
                "delivery.start-tls-unavailable"
            }
            EventType::Delivery(DeliveryEvent::StartTlsError) => "delivery.start-tls-error",
            EventType::Delivery(DeliveryEvent::StartTlsDisabled) => "delivery.start-tls-disabled",
            EventType::Delivery(DeliveryEvent::ImplicitTlsError) => "delivery.implicit-tls-error",
            EventType::Delivery(DeliveryEvent::ConcurrencyLimitExceeded) => {
                "delivery.concurrency-limit-exceeded"
            }
            EventType::Delivery(DeliveryEvent::RateLimitExceeded) => "delivery.rate-limit-exceeded",
            EventType::Delivery(DeliveryEvent::DoubleBounce) => "delivery.double-bounce",
            EventType::Delivery(DeliveryEvent::DsnSuccess) => "delivery.dsn-success",
            EventType::Delivery(DeliveryEvent::DsnTempFail) => "delivery.dsn-temp-fail",
            EventType::Delivery(DeliveryEvent::DsnPermFail) => "delivery.dsn-perm-fail",
            EventType::Delivery(DeliveryEvent::RawInput) => "delivery.raw-input",
            EventType::Delivery(DeliveryEvent::RawOutput) => "delivery.raw-output",
            EventType::Dkim(DkimEvent::Pass) => "dkim.pass",
            EventType::Dkim(DkimEvent::Neutral) => "dkim.neutral",
            EventType::Dkim(DkimEvent::Fail) => "dkim.fail",
            EventType::Dkim(DkimEvent::PermError) => "dkim.perm-error",
            EventType::Dkim(DkimEvent::TempError) => "dkim.temp-error",
            EventType::Dkim(DkimEvent::None) => "dkim.none",
            EventType::Dkim(DkimEvent::UnsupportedVersion) => "dkim.unsupported-version",
            EventType::Dkim(DkimEvent::UnsupportedAlgorithm) => "dkim.unsupported-algorithm",
            EventType::Dkim(DkimEvent::UnsupportedCanonicalization) => {
                "dkim.unsupported-canonicalization"
            }
            EventType::Dkim(DkimEvent::UnsupportedKeyType) => "dkim.unsupported-key-type",
            EventType::Dkim(DkimEvent::FailedBodyHashMatch) => "dkim.failed-body-hash-match",
            EventType::Dkim(DkimEvent::FailedVerification) => "dkim.failed-verification",
            EventType::Dkim(DkimEvent::FailedAuidMatch) => "dkim.failed-auid-match",
            EventType::Dkim(DkimEvent::RevokedPublicKey) => "dkim.revoked-public-key",
            EventType::Dkim(DkimEvent::IncompatibleAlgorithms) => "dkim.incompatible-algorithms",
            EventType::Dkim(DkimEvent::SignatureExpired) => "dkim.signature-expired",
            EventType::Dkim(DkimEvent::SignatureLength) => "dkim.signature-length",
            EventType::Dkim(DkimEvent::SignerNotFound) => "dkim.signer-not-found",
            EventType::Dkim(DkimEvent::BuildError) => "dkim.build-error",
            EventType::Dkim(DkimEvent::SignatureCreated) => "dkim.signature-created",
            EventType::Dkim(DkimEvent::SignaturePublished) => "dkim.signature-published",
            EventType::Dkim(DkimEvent::SignatureRetiring) => "dkim.signature-retiring",
            EventType::Dkim(DkimEvent::SignatureRetired) => "dkim.signature-retired",
            EventType::Dkim(DkimEvent::SignatureDeleted) => "dkim.signature-deleted",
            EventType::Dmarc(DmarcEvent::Pass) => "dmarc.pass",
            EventType::Dmarc(DmarcEvent::Fail) => "dmarc.fail",
            EventType::Dmarc(DmarcEvent::PermError) => "dmarc.perm-error",
            EventType::Dmarc(DmarcEvent::TempError) => "dmarc.temp-error",
            EventType::Dmarc(DmarcEvent::None) => "dmarc.none",
            EventType::Dns(DnsEvent::RecordCreated) => "dns.record-created",
            EventType::Dns(DnsEvent::RecordCreationFailed) => "dns.record-creation-failed",
            EventType::Dns(DnsEvent::RecordDeletionFailed) => "dns.record-deletion-failed",
            EventType::Dns(DnsEvent::RecordNotPropagated) => "dns.record-not-propagated",
            EventType::Dns(DnsEvent::RecordLookupFailed) => "dns.record-lookup-failed",
            EventType::Dns(DnsEvent::RecordPropagated) => "dns.record-propagated",
            EventType::Dns(DnsEvent::RecordPropagationTimeout) => "dns.record-propagation-timeout",
            EventType::Dns(DnsEvent::BuildError) => "dns.build-error",
            EventType::Eval(EvalEvent::Result) => "eval.result",
            EventType::Eval(EvalEvent::Error) => "eval.error",
            EventType::Eval(EvalEvent::DirectoryNotFound) => "eval.directory-not-found",
            EventType::Eval(EvalEvent::StoreNotFound) => "eval.store-not-found",
            EventType::Http(HttpEvent::ConnectionStart) => "http.connection-start",
            EventType::Http(HttpEvent::ConnectionEnd) => "http.connection-end",
            EventType::Http(HttpEvent::Error) => "http.error",
            EventType::Http(HttpEvent::RequestUrl) => "http.request-url",
            EventType::Http(HttpEvent::RequestBody) => "http.request-body",
            EventType::Http(HttpEvent::ResponseBody) => "http.response-body",
            EventType::Http(HttpEvent::XForwardedMissing) => "http.x-forwarded-missing",
            EventType::Imap(ImapEvent::ConnectionStart) => "imap.connection-start",
            EventType::Imap(ImapEvent::ConnectionEnd) => "imap.connection-end",
            EventType::Imap(ImapEvent::GetAcl) => "imap.get-acl",
            EventType::Imap(ImapEvent::SetAcl) => "imap.set-acl",
            EventType::Imap(ImapEvent::MyRights) => "imap.my-rights",
            EventType::Imap(ImapEvent::ListRights) => "imap.list-rights",
            EventType::Imap(ImapEvent::Append) => "imap.append",
            EventType::Imap(ImapEvent::Capabilities) => "imap.capabilities",
            EventType::Imap(ImapEvent::Id) => "imap.id",
            EventType::Imap(ImapEvent::Close) => "imap.close",
            EventType::Imap(ImapEvent::Copy) => "imap.copy",
            EventType::Imap(ImapEvent::Move) => "imap.move",
            EventType::Imap(ImapEvent::CreateMailbox) => "imap.create-mailbox",
            EventType::Imap(ImapEvent::DeleteMailbox) => "imap.delete-mailbox",
            EventType::Imap(ImapEvent::RenameMailbox) => "imap.rename-mailbox",
            EventType::Imap(ImapEvent::Enable) => "imap.enable",
            EventType::Imap(ImapEvent::Expunge) => "imap.expunge",
            EventType::Imap(ImapEvent::Fetch) => "imap.fetch",
            EventType::Imap(ImapEvent::IdleStart) => "imap.idle-start",
            EventType::Imap(ImapEvent::IdleStop) => "imap.idle-stop",
            EventType::Imap(ImapEvent::List) => "imap.list",
            EventType::Imap(ImapEvent::Lsub) => "imap.lsub",
            EventType::Imap(ImapEvent::Logout) => "imap.logout",
            EventType::Imap(ImapEvent::Namespace) => "imap.namespace",
            EventType::Imap(ImapEvent::Noop) => "imap.noop",
            EventType::Imap(ImapEvent::Search) => "imap.search",
            EventType::Imap(ImapEvent::Sort) => "imap.sort",
            EventType::Imap(ImapEvent::Select) => "imap.select",
            EventType::Imap(ImapEvent::Status) => "imap.status",
            EventType::Imap(ImapEvent::Store) => "imap.store",
            EventType::Imap(ImapEvent::Subscribe) => "imap.subscribe",
            EventType::Imap(ImapEvent::Unsubscribe) => "imap.unsubscribe",
            EventType::Imap(ImapEvent::Thread) => "imap.thread",
            EventType::Imap(ImapEvent::GetQuota) => "imap.get-quota",
            EventType::Imap(ImapEvent::Error) => "imap.error",
            EventType::Imap(ImapEvent::RawInput) => "imap.raw-input",
            EventType::Imap(ImapEvent::RawOutput) => "imap.raw-output",
            EventType::IncomingReport(IncomingReportEvent::DmarcReport) => {
                "incoming-report.dmarc-report"
            }
            EventType::IncomingReport(IncomingReportEvent::DmarcReportWithWarnings) => {
                "incoming-report.dmarc-report-with-warnings"
            }
            EventType::IncomingReport(IncomingReportEvent::TlsReport) => {
                "incoming-report.tls-report"
            }
            EventType::IncomingReport(IncomingReportEvent::TlsReportWithWarnings) => {
                "incoming-report.tls-report-with-warnings"
            }
            EventType::IncomingReport(IncomingReportEvent::AbuseReport) => {
                "incoming-report.abuse-report"
            }
            EventType::IncomingReport(IncomingReportEvent::AuthFailureReport) => {
                "incoming-report.auth-failure-report"
            }
            EventType::IncomingReport(IncomingReportEvent::FraudReport) => {
                "incoming-report.fraud-report"
            }
            EventType::IncomingReport(IncomingReportEvent::NotSpamReport) => {
                "incoming-report.not-spam-report"
            }
            EventType::IncomingReport(IncomingReportEvent::VirusReport) => {
                "incoming-report.virus-report"
            }
            EventType::IncomingReport(IncomingReportEvent::OtherReport) => {
                "incoming-report.other-report"
            }
            EventType::IncomingReport(IncomingReportEvent::MessageParseFailed) => {
                "incoming-report.message-parse-failed"
            }
            EventType::IncomingReport(IncomingReportEvent::DmarcParseFailed) => {
                "incoming-report.dmarc-parse-failed"
            }
            EventType::IncomingReport(IncomingReportEvent::TlsRpcParseFailed) => {
                "incoming-report.tls-rpc-parse-failed"
            }
            EventType::IncomingReport(IncomingReportEvent::ArfParseFailed) => {
                "incoming-report.arf-parse-failed"
            }
            EventType::IncomingReport(IncomingReportEvent::DecompressError) => {
                "incoming-report.decompress-error"
            }
            EventType::Iprev(IprevEvent::Pass) => "iprev.pass",
            EventType::Iprev(IprevEvent::Fail) => "iprev.fail",
            EventType::Iprev(IprevEvent::PermError) => "iprev.perm-error",
            EventType::Iprev(IprevEvent::TempError) => "iprev.temp-error",
            EventType::Iprev(IprevEvent::None) => "iprev.none",
            EventType::Jmap(JmapEvent::MethodCall) => "jmap.method-call",
            EventType::Jmap(JmapEvent::InvalidArguments) => "jmap.invalid-arguments",
            EventType::Jmap(JmapEvent::RequestTooLarge) => "jmap.request-too-large",
            EventType::Jmap(JmapEvent::StateMismatch) => "jmap.state-mismatch",
            EventType::Jmap(JmapEvent::AnchorNotFound) => "jmap.anchor-not-found",
            EventType::Jmap(JmapEvent::UnsupportedFilter) => "jmap.unsupported-filter",
            EventType::Jmap(JmapEvent::UnsupportedSort) => "jmap.unsupported-sort",
            EventType::Jmap(JmapEvent::UnknownMethod) => "jmap.unknown-method",
            EventType::Jmap(JmapEvent::InvalidResultReference) => "jmap.invalid-result-reference",
            EventType::Jmap(JmapEvent::Forbidden) => "jmap.forbidden",
            EventType::Jmap(JmapEvent::AccountNotFound) => "jmap.account-not-found",
            EventType::Jmap(JmapEvent::AccountNotSupportedByMethod) => {
                "jmap.account-not-supported-by-method"
            }
            EventType::Jmap(JmapEvent::AccountReadOnly) => "jmap.account-read-only",
            EventType::Jmap(JmapEvent::NotFound) => "jmap.not-found",
            EventType::Jmap(JmapEvent::CannotCalculateChanges) => "jmap.cannot-calculate-changes",
            EventType::Jmap(JmapEvent::UnknownDataType) => "jmap.unknown-data-type",
            EventType::Jmap(JmapEvent::UnknownCapability) => "jmap.unknown-capability",
            EventType::Jmap(JmapEvent::NotJson) => "jmap.not-json",
            EventType::Jmap(JmapEvent::NotRequest) => "jmap.not-request",
            EventType::Jmap(JmapEvent::WebsocketStart) => "jmap.websocket-start",
            EventType::Jmap(JmapEvent::WebsocketStop) => "jmap.websocket-stop",
            EventType::Jmap(JmapEvent::WebsocketError) => "jmap.websocket-error",
            EventType::Limit(LimitEvent::SizeRequest) => "limit.size-request",
            EventType::Limit(LimitEvent::SizeUpload) => "limit.size-upload",
            EventType::Limit(LimitEvent::CallsIn) => "limit.calls-in",
            EventType::Limit(LimitEvent::ConcurrentRequest) => "limit.concurrent-request",
            EventType::Limit(LimitEvent::ConcurrentUpload) => "limit.concurrent-upload",
            EventType::Limit(LimitEvent::ConcurrentConnection) => "limit.concurrent-connection",
            EventType::Limit(LimitEvent::Quota) => "limit.quota",
            EventType::Limit(LimitEvent::BlobQuota) => "limit.blob-quota",
            EventType::Limit(LimitEvent::TenantQuota) => "limit.tenant-quota",
            EventType::Limit(LimitEvent::TooManyRequests) => "limit.too-many-requests",
            EventType::MailAuth(MailAuthEvent::ParseError) => "mail-auth.parse-error",
            EventType::MailAuth(MailAuthEvent::MissingParameters) => "mail-auth.missing-parameters",
            EventType::MailAuth(MailAuthEvent::NoHeadersFound) => "mail-auth.no-headers-found",
            EventType::MailAuth(MailAuthEvent::Crypto) => "mail-auth.crypto",
            EventType::MailAuth(MailAuthEvent::Io) => "mail-auth.io",
            EventType::MailAuth(MailAuthEvent::Base64) => "mail-auth.base64",
            EventType::MailAuth(MailAuthEvent::DnsError) => "mail-auth.dns-error",
            EventType::MailAuth(MailAuthEvent::DnsRecordNotFound) => {
                "mail-auth.dns-record-not-found"
            }
            EventType::MailAuth(MailAuthEvent::DnsInvalidRecordType) => {
                "mail-auth.dns-invalid-record-type"
            }
            EventType::MailAuth(MailAuthEvent::PolicyNotAligned) => "mail-auth.policy-not-aligned",
            EventType::ManageSieve(ManageSieveEvent::ConnectionStart) => {
                "manage-sieve.connection-start"
            }
            EventType::ManageSieve(ManageSieveEvent::ConnectionEnd) => {
                "manage-sieve.connection-end"
            }
            EventType::ManageSieve(ManageSieveEvent::CreateScript) => "manage-sieve.create-script",
            EventType::ManageSieve(ManageSieveEvent::UpdateScript) => "manage-sieve.update-script",
            EventType::ManageSieve(ManageSieveEvent::GetScript) => "manage-sieve.get-script",
            EventType::ManageSieve(ManageSieveEvent::DeleteScript) => "manage-sieve.delete-script",
            EventType::ManageSieve(ManageSieveEvent::RenameScript) => "manage-sieve.rename-script",
            EventType::ManageSieve(ManageSieveEvent::CheckScript) => "manage-sieve.check-script",
            EventType::ManageSieve(ManageSieveEvent::HaveSpace) => "manage-sieve.have-space",
            EventType::ManageSieve(ManageSieveEvent::ListScripts) => "manage-sieve.list-scripts",
            EventType::ManageSieve(ManageSieveEvent::SetActive) => "manage-sieve.set-active",
            EventType::ManageSieve(ManageSieveEvent::Capabilities) => "manage-sieve.capabilities",
            EventType::ManageSieve(ManageSieveEvent::StartTls) => "manage-sieve.start-tls",
            EventType::ManageSieve(ManageSieveEvent::Unauthenticate) => {
                "manage-sieve.unauthenticate"
            }
            EventType::ManageSieve(ManageSieveEvent::Logout) => "manage-sieve.logout",
            EventType::ManageSieve(ManageSieveEvent::Noop) => "manage-sieve.noop",
            EventType::ManageSieve(ManageSieveEvent::Error) => "manage-sieve.error",
            EventType::ManageSieve(ManageSieveEvent::RawInput) => "manage-sieve.raw-input",
            EventType::ManageSieve(ManageSieveEvent::RawOutput) => "manage-sieve.raw-output",
            EventType::MessageIngest(MessageIngestEvent::Ham) => "message-ingest.ham",
            EventType::MessageIngest(MessageIngestEvent::Spam) => "message-ingest.spam",
            EventType::MessageIngest(MessageIngestEvent::ImapAppend) => {
                "message-ingest.imap-append"
            }
            EventType::MessageIngest(MessageIngestEvent::JmapAppend) => {
                "message-ingest.jmap-append"
            }
            EventType::MessageIngest(MessageIngestEvent::Duplicate) => "message-ingest.duplicate",
            EventType::MessageIngest(MessageIngestEvent::Error) => "message-ingest.error",
            EventType::MessageIngest(MessageIngestEvent::SearchIndex) => {
                "message-ingest.search-index"
            }
            EventType::Milter(MilterEvent::Read) => "milter.read",
            EventType::Milter(MilterEvent::Write) => "milter.write",
            EventType::Milter(MilterEvent::ActionAccept) => "milter.action-accept",
            EventType::Milter(MilterEvent::ActionDiscard) => "milter.action-discard",
            EventType::Milter(MilterEvent::ActionReject) => "milter.action-reject",
            EventType::Milter(MilterEvent::ActionTempFail) => "milter.action-temp-fail",
            EventType::Milter(MilterEvent::ActionReplyCode) => "milter.action-reply-code",
            EventType::Milter(MilterEvent::ActionConnectionFailure) => {
                "milter.action-connection-failure"
            }
            EventType::Milter(MilterEvent::ActionShutdown) => "milter.action-shutdown",
            EventType::Milter(MilterEvent::IoError) => "milter.io-error",
            EventType::Milter(MilterEvent::FrameTooLarge) => "milter.frame-too-large",
            EventType::Milter(MilterEvent::FrameInvalid) => "milter.frame-invalid",
            EventType::Milter(MilterEvent::UnexpectedResponse) => "milter.unexpected-response",
            EventType::Milter(MilterEvent::Timeout) => "milter.timeout",
            EventType::Milter(MilterEvent::TlsInvalidName) => "milter.tls-invalid-name",
            EventType::Milter(MilterEvent::Disconnected) => "milter.disconnected",
            EventType::Milter(MilterEvent::ParseError) => "milter.parse-error",
            EventType::MtaHook(MtaHookEvent::ActionAccept) => "mta-hook.action-accept",
            EventType::MtaHook(MtaHookEvent::ActionDiscard) => "mta-hook.action-discard",
            EventType::MtaHook(MtaHookEvent::ActionReject) => "mta-hook.action-reject",
            EventType::MtaHook(MtaHookEvent::ActionQuarantine) => "mta-hook.action-quarantine",
            EventType::MtaHook(MtaHookEvent::Error) => "mta-hook.error",
            EventType::MtaSts(MtaStsEvent::Authorized) => "mta-sts.authorized",
            EventType::MtaSts(MtaStsEvent::NotAuthorized) => "mta-sts.not-authorized",
            EventType::MtaSts(MtaStsEvent::PolicyFetch) => "mta-sts.policy-fetch",
            EventType::MtaSts(MtaStsEvent::PolicyNotFound) => "mta-sts.policy-not-found",
            EventType::MtaSts(MtaStsEvent::PolicyFetchError) => "mta-sts.policy-fetch-error",
            EventType::MtaSts(MtaStsEvent::InvalidPolicy) => "mta-sts.invalid-policy",
            EventType::Network(NetworkEvent::ListenStart) => "network.listen-start",
            EventType::Network(NetworkEvent::ListenStop) => "network.listen-stop",
            EventType::Network(NetworkEvent::ListenError) => "network.listen-error",
            EventType::Network(NetworkEvent::BindError) => "network.bind-error",
            EventType::Network(NetworkEvent::ReadError) => "network.read-error",
            EventType::Network(NetworkEvent::WriteError) => "network.write-error",
            EventType::Network(NetworkEvent::FlushError) => "network.flush-error",
            EventType::Network(NetworkEvent::AcceptError) => "network.accept-error",
            EventType::Network(NetworkEvent::SplitError) => "network.split-error",
            EventType::Network(NetworkEvent::Timeout) => "network.timeout",
            EventType::Network(NetworkEvent::Closed) => "network.closed",
            EventType::Network(NetworkEvent::ProxyError) => "network.proxy-error",
            EventType::Network(NetworkEvent::SetOptError) => "network.set-opt-error",
            EventType::OutgoingReport(OutgoingReportEvent::SpfReport) => {
                "outgoing-report.spf-report"
            }
            EventType::OutgoingReport(OutgoingReportEvent::SpfRateLimited) => {
                "outgoing-report.spf-rate-limited"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DkimReport) => {
                "outgoing-report.dkim-report"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DkimRateLimited) => {
                "outgoing-report.dkim-rate-limited"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DmarcReport) => {
                "outgoing-report.dmarc-report"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DmarcRateLimited) => {
                "outgoing-report.dmarc-rate-limited"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DmarcAggregateReport) => {
                "outgoing-report.dmarc-aggregate-report"
            }
            EventType::OutgoingReport(OutgoingReportEvent::TlsAggregate) => {
                "outgoing-report.tls-aggregate"
            }
            EventType::OutgoingReport(OutgoingReportEvent::HttpSubmission) => {
                "outgoing-report.http-submission"
            }
            EventType::OutgoingReport(OutgoingReportEvent::UnauthorizedReportingAddress) => {
                "outgoing-report.unauthorized-reporting-address"
            }
            EventType::OutgoingReport(OutgoingReportEvent::ReportingAddressValidationError) => {
                "outgoing-report.reporting-address-validation-error"
            }
            EventType::OutgoingReport(OutgoingReportEvent::NotFound) => "outgoing-report.not-found",
            EventType::OutgoingReport(OutgoingReportEvent::SubmissionError) => {
                "outgoing-report.submission-error"
            }
            EventType::OutgoingReport(OutgoingReportEvent::NoRecipientsFound) => {
                "outgoing-report.no-recipients-found"
            }
            EventType::OutgoingReport(OutgoingReportEvent::Locked) => "outgoing-report.locked",
            EventType::OutgoingReport(OutgoingReportEvent::MaxSizeExceeded) => {
                "outgoing-report.max-size-exceeded"
            }
            EventType::Pop3(Pop3Event::ConnectionStart) => "pop3.connection-start",
            EventType::Pop3(Pop3Event::ConnectionEnd) => "pop3.connection-end",
            EventType::Pop3(Pop3Event::Delete) => "pop3.delete",
            EventType::Pop3(Pop3Event::Reset) => "pop3.reset",
            EventType::Pop3(Pop3Event::Quit) => "pop3.quit",
            EventType::Pop3(Pop3Event::Fetch) => "pop3.fetch",
            EventType::Pop3(Pop3Event::List) => "pop3.list",
            EventType::Pop3(Pop3Event::ListMessage) => "pop3.list-message",
            EventType::Pop3(Pop3Event::Uidl) => "pop3.uidl",
            EventType::Pop3(Pop3Event::UidlMessage) => "pop3.uidl-message",
            EventType::Pop3(Pop3Event::Stat) => "pop3.stat",
            EventType::Pop3(Pop3Event::Noop) => "pop3.noop",
            EventType::Pop3(Pop3Event::Capabilities) => "pop3.capabilities",
            EventType::Pop3(Pop3Event::StartTls) => "pop3.start-tls",
            EventType::Pop3(Pop3Event::Utf8) => "pop3.utf8",
            EventType::Pop3(Pop3Event::Error) => "pop3.error",
            EventType::Pop3(Pop3Event::RawInput) => "pop3.raw-input",
            EventType::Pop3(Pop3Event::RawOutput) => "pop3.raw-output",
            EventType::PushSubscription(PushSubscriptionEvent::Success) => {
                "push-subscription.success"
            }
            EventType::PushSubscription(PushSubscriptionEvent::Error) => "push-subscription.error",
            EventType::PushSubscription(PushSubscriptionEvent::NotFound) => {
                "push-subscription.not-found"
            }
            EventType::Queue(QueueEvent::Started) => "queue.started",
            EventType::Queue(QueueEvent::MessageQueued) => "queue.message-queued",
            EventType::Queue(QueueEvent::AuthenticatedMessageQueued) => {
                "queue.authenticated-message-queued"
            }
            EventType::Queue(QueueEvent::ReportQueued) => "queue.report-queued",
            EventType::Queue(QueueEvent::DsnQueued) => "queue.dsn-queued",
            EventType::Queue(QueueEvent::AutogeneratedQueued) => "queue.autogenerated-queued",
            EventType::Queue(QueueEvent::Rescheduled) => "queue.rescheduled",
            EventType::Queue(QueueEvent::Locked) => "queue.locked",
            EventType::Queue(QueueEvent::BlobNotFound) => "queue.blob-not-found",
            EventType::Queue(QueueEvent::RateLimitExceeded) => "queue.rate-limit-exceeded",
            EventType::Queue(QueueEvent::ConcurrencyLimitExceeded) => {
                "queue.concurrency-limit-exceeded"
            }
            EventType::Queue(QueueEvent::QuotaExceeded) => "queue.quota-exceeded",
            EventType::Queue(QueueEvent::BackPressure) => "queue.back-pressure",
            EventType::Registry(RegistryEvent::LocalReadError) => "registry.local-read-error",
            EventType::Registry(RegistryEvent::LocalWriteError) => "registry.local-write-error",
            EventType::Registry(RegistryEvent::LocalParseError) => "registry.local-parse-error",
            EventType::Registry(RegistryEvent::ReadError) => "registry.read-error",
            EventType::Registry(RegistryEvent::WriteError) => "registry.write-error",
            EventType::Registry(RegistryEvent::DeserializationError) => {
                "registry.deserialization-error"
            }
            EventType::Registry(RegistryEvent::BuildError) => "registry.build-error",
            EventType::Registry(RegistryEvent::BuildWarning) => "registry.build-warning",
            EventType::Registry(RegistryEvent::NotSupported) => "registry.not-supported",
            EventType::Registry(RegistryEvent::ValidationError) => "registry.validation-error",
            EventType::Resource(ResourceEvent::NotFound) => "resource.not-found",
            EventType::Resource(ResourceEvent::BadParameters) => "resource.bad-parameters",
            EventType::Resource(ResourceEvent::Error) => "resource.error",
            EventType::Resource(ResourceEvent::DownloadExternal) => "resource.download-external",
            EventType::Resource(ResourceEvent::ApplicationUpdated) => {
                "resource.application-updated"
            }
            EventType::Resource(ResourceEvent::ApplicationUnpacked) => {
                "resource.application-unpacked"
            }
            EventType::Security(SecurityEvent::AuthenticationBan) => "security.authentication-ban",
            EventType::Security(SecurityEvent::AbuseBan) => "security.abuse-ban",
            EventType::Security(SecurityEvent::ScanBan) => "security.scan-ban",
            EventType::Security(SecurityEvent::LoiterBan) => "security.loiter-ban",
            EventType::Security(SecurityEvent::IpBlocked) => "security.ip-blocked",
            EventType::Security(SecurityEvent::IpBlockExpired) => "security.ip-block-expired",
            EventType::Security(SecurityEvent::IpAllowExpired) => "security.ip-allow-expired",
            EventType::Security(SecurityEvent::IpUnauthorized) => "security.ip-unauthorized",
            EventType::Security(SecurityEvent::Unauthorized) => "security.unauthorized",
            EventType::Server(ServerEvent::Startup) => "server.startup",
            EventType::Server(ServerEvent::Shutdown) => "server.shutdown",
            EventType::Server(ServerEvent::StartupError) => "server.startup-error",
            EventType::Server(ServerEvent::ThreadError) => "server.thread-error",
            EventType::Server(ServerEvent::Licensing) => "server.licensing",
            EventType::Server(ServerEvent::RecoveryMode) => "server.recovery-mode",
            EventType::Server(ServerEvent::BootstrapMode) => "server.bootstrap-mode",
            EventType::Sieve(SieveEvent::ActionAccept) => "sieve.action-accept",
            EventType::Sieve(SieveEvent::ActionAcceptReplace) => "sieve.action-accept-replace",
            EventType::Sieve(SieveEvent::ActionDiscard) => "sieve.action-discard",
            EventType::Sieve(SieveEvent::ActionReject) => "sieve.action-reject",
            EventType::Sieve(SieveEvent::SendMessage) => "sieve.send-message",
            EventType::Sieve(SieveEvent::MessageTooLarge) => "sieve.message-too-large",
            EventType::Sieve(SieveEvent::ScriptNotFound) => "sieve.script-not-found",
            EventType::Sieve(SieveEvent::ListNotFound) => "sieve.list-not-found",
            EventType::Sieve(SieveEvent::RuntimeError) => "sieve.runtime-error",
            EventType::Sieve(SieveEvent::UnexpectedError) => "sieve.unexpected-error",
            EventType::Sieve(SieveEvent::NotSupported) => "sieve.not-supported",
            EventType::Sieve(SieveEvent::QuotaExceeded) => "sieve.quota-exceeded",
            EventType::Smtp(SmtpEvent::ConnectionStart) => "smtp.connection-start",
            EventType::Smtp(SmtpEvent::ConnectionEnd) => "smtp.connection-end",
            EventType::Smtp(SmtpEvent::Error) => "smtp.error",
            EventType::Smtp(SmtpEvent::IdNotFound) => "smtp.id-not-found",
            EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded) => {
                "smtp.concurrency-limit-exceeded"
            }
            EventType::Smtp(SmtpEvent::TransferLimitExceeded) => "smtp.transfer-limit-exceeded",
            EventType::Smtp(SmtpEvent::RateLimitExceeded) => "smtp.rate-limit-exceeded",
            EventType::Smtp(SmtpEvent::TimeLimitExceeded) => "smtp.time-limit-exceeded",
            EventType::Smtp(SmtpEvent::MissingAuthDirectory) => "smtp.missing-auth-directory",
            EventType::Smtp(SmtpEvent::MessageParseFailed) => "smtp.message-parse-failed",
            EventType::Smtp(SmtpEvent::MessageTooLarge) => "smtp.message-too-large",
            EventType::Smtp(SmtpEvent::LoopDetected) => "smtp.loop-detected",
            EventType::Smtp(SmtpEvent::DkimPass) => "smtp.dkim-pass",
            EventType::Smtp(SmtpEvent::DkimFail) => "smtp.dkim-fail",
            EventType::Smtp(SmtpEvent::ArcPass) => "smtp.arc-pass",
            EventType::Smtp(SmtpEvent::ArcFail) => "smtp.arc-fail",
            EventType::Smtp(SmtpEvent::SpfEhloPass) => "smtp.spf-ehlo-pass",
            EventType::Smtp(SmtpEvent::SpfEhloFail) => "smtp.spf-ehlo-fail",
            EventType::Smtp(SmtpEvent::SpfFromPass) => "smtp.spf-from-pass",
            EventType::Smtp(SmtpEvent::SpfFromFail) => "smtp.spf-from-fail",
            EventType::Smtp(SmtpEvent::DmarcPass) => "smtp.dmarc-pass",
            EventType::Smtp(SmtpEvent::DmarcFail) => "smtp.dmarc-fail",
            EventType::Smtp(SmtpEvent::IprevPass) => "smtp.iprev-pass",
            EventType::Smtp(SmtpEvent::IprevFail) => "smtp.iprev-fail",
            EventType::Smtp(SmtpEvent::TooManyMessages) => "smtp.too-many-messages",
            EventType::Smtp(SmtpEvent::Ehlo) => "smtp.ehlo",
            EventType::Smtp(SmtpEvent::InvalidEhlo) => "smtp.invalid-ehlo",
            EventType::Smtp(SmtpEvent::DidNotSayEhlo) => "smtp.did-not-say-ehlo",
            EventType::Smtp(SmtpEvent::EhloExpected) => "smtp.ehlo-expected",
            EventType::Smtp(SmtpEvent::LhloExpected) => "smtp.lhlo-expected",
            EventType::Smtp(SmtpEvent::MailFromUnauthenticated) => "smtp.mail-from-unauthenticated",
            EventType::Smtp(SmtpEvent::MailFromUnauthorized) => "smtp.mail-from-unauthorized",
            EventType::Smtp(SmtpEvent::MailFromNotAllowed) => "smtp.mail-from-not-allowed",
            EventType::Smtp(SmtpEvent::MailFromRewritten) => "smtp.mail-from-rewritten",
            EventType::Smtp(SmtpEvent::MailFromMissing) => "smtp.mail-from-missing",
            EventType::Smtp(SmtpEvent::MailFrom) => "smtp.mail-from",
            EventType::Smtp(SmtpEvent::MultipleMailFrom) => "smtp.multiple-mail-from",
            EventType::Smtp(SmtpEvent::MailboxDoesNotExist) => "smtp.mailbox-does-not-exist",
            EventType::Smtp(SmtpEvent::RelayNotAllowed) => "smtp.relay-not-allowed",
            EventType::Smtp(SmtpEvent::RcptTo) => "smtp.rcpt-to",
            EventType::Smtp(SmtpEvent::RcptToDuplicate) => "smtp.rcpt-to-duplicate",
            EventType::Smtp(SmtpEvent::RcptToRewritten) => "smtp.rcpt-to-rewritten",
            EventType::Smtp(SmtpEvent::RcptToMissing) => "smtp.rcpt-to-missing",
            EventType::Smtp(SmtpEvent::RcptToGreylisted) => "smtp.rcpt-to-greylisted",
            EventType::Smtp(SmtpEvent::TooManyRecipients) => "smtp.too-many-recipients",
            EventType::Smtp(SmtpEvent::TooManyInvalidRcpt) => "smtp.too-many-invalid-rcpt",
            EventType::Smtp(SmtpEvent::RawInput) => "smtp.raw-input",
            EventType::Smtp(SmtpEvent::RawOutput) => "smtp.raw-output",
            EventType::Smtp(SmtpEvent::MissingLocalHostname) => "smtp.missing-local-hostname",
            EventType::Smtp(SmtpEvent::Vrfy) => "smtp.vrfy",
            EventType::Smtp(SmtpEvent::VrfyNotFound) => "smtp.vrfy-not-found",
            EventType::Smtp(SmtpEvent::VrfyDisabled) => "smtp.vrfy-disabled",
            EventType::Smtp(SmtpEvent::Expn) => "smtp.expn",
            EventType::Smtp(SmtpEvent::ExpnNotFound) => "smtp.expn-not-found",
            EventType::Smtp(SmtpEvent::ExpnDisabled) => "smtp.expn-disabled",
            EventType::Smtp(SmtpEvent::RequireTlsDisabled) => "smtp.require-tls-disabled",
            EventType::Smtp(SmtpEvent::DeliverByDisabled) => "smtp.deliver-by-disabled",
            EventType::Smtp(SmtpEvent::DeliverByInvalid) => "smtp.deliver-by-invalid",
            EventType::Smtp(SmtpEvent::FutureReleaseDisabled) => "smtp.future-release-disabled",
            EventType::Smtp(SmtpEvent::FutureReleaseInvalid) => "smtp.future-release-invalid",
            EventType::Smtp(SmtpEvent::MtPriorityDisabled) => "smtp.mt-priority-disabled",
            EventType::Smtp(SmtpEvent::MtPriorityInvalid) => "smtp.mt-priority-invalid",
            EventType::Smtp(SmtpEvent::DsnDisabled) => "smtp.dsn-disabled",
            EventType::Smtp(SmtpEvent::AuthNotAllowed) => "smtp.auth-not-allowed",
            EventType::Smtp(SmtpEvent::AuthMechanismNotSupported) => {
                "smtp.auth-mechanism-not-supported"
            }
            EventType::Smtp(SmtpEvent::AuthExchangeTooLong) => "smtp.auth-exchange-too-long",
            EventType::Smtp(SmtpEvent::AlreadyAuthenticated) => "smtp.already-authenticated",
            EventType::Smtp(SmtpEvent::Noop) => "smtp.noop",
            EventType::Smtp(SmtpEvent::StartTls) => "smtp.start-tls",
            EventType::Smtp(SmtpEvent::StartTlsUnavailable) => "smtp.start-tls-unavailable",
            EventType::Smtp(SmtpEvent::StartTlsAlready) => "smtp.start-tls-already",
            EventType::Smtp(SmtpEvent::Rset) => "smtp.rset",
            EventType::Smtp(SmtpEvent::Quit) => "smtp.quit",
            EventType::Smtp(SmtpEvent::Help) => "smtp.help",
            EventType::Smtp(SmtpEvent::CommandNotImplemented) => "smtp.command-not-implemented",
            EventType::Smtp(SmtpEvent::InvalidCommand) => "smtp.invalid-command",
            EventType::Smtp(SmtpEvent::InvalidSenderAddress) => "smtp.invalid-sender-address",
            EventType::Smtp(SmtpEvent::InvalidRecipientAddress) => "smtp.invalid-recipient-address",
            EventType::Smtp(SmtpEvent::InvalidParameter) => "smtp.invalid-parameter",
            EventType::Smtp(SmtpEvent::UnsupportedParameter) => "smtp.unsupported-parameter",
            EventType::Smtp(SmtpEvent::SyntaxError) => "smtp.syntax-error",
            EventType::Smtp(SmtpEvent::RequestTooLarge) => "smtp.request-too-large",
            EventType::Spam(SpamEvent::Pyzor) => "spam.pyzor",
            EventType::Spam(SpamEvent::PyzorError) => "spam.pyzor-error",
            EventType::Spam(SpamEvent::Dnsbl) => "spam.dnsbl",
            EventType::Spam(SpamEvent::DnsblError) => "spam.dnsbl-error",
            EventType::Spam(SpamEvent::TrainStarted) => "spam.train-started",
            EventType::Spam(SpamEvent::TrainCompleted) => "spam.train-completed",
            EventType::Spam(SpamEvent::TrainSampleAdded) => "spam.train-sample-added",
            EventType::Spam(SpamEvent::TrainSampleNotFound) => "spam.train-sample-not-found",
            EventType::Spam(SpamEvent::Classify) => "spam.classify",
            EventType::Spam(SpamEvent::ModelLoaded) => "spam.model-loaded",
            EventType::Spam(SpamEvent::ModelNotReady) => "spam.model-not-ready",
            EventType::Spam(SpamEvent::ModelNotFound) => "spam.model-not-found",
            EventType::Spam(SpamEvent::RulesUpdated) => "spam.rules-updated",
            EventType::Spf(SpfEvent::Pass) => "spf.pass",
            EventType::Spf(SpfEvent::Fail) => "spf.fail",
            EventType::Spf(SpfEvent::SoftFail) => "spf.soft-fail",
            EventType::Spf(SpfEvent::Neutral) => "spf.neutral",
            EventType::Spf(SpfEvent::TempError) => "spf.temp-error",
            EventType::Spf(SpfEvent::PermError) => "spf.perm-error",
            EventType::Spf(SpfEvent::None) => "spf.none",
            EventType::Store(StoreEvent::AssertValueFailed) => "store.assert-value-failed",
            EventType::Store(StoreEvent::FoundationdbError) => "store.foundationdb-error",
            EventType::Store(StoreEvent::MysqlError) => "store.mysql-error",
            EventType::Store(StoreEvent::PostgresqlError) => "store.postgresql-error",
            EventType::Store(StoreEvent::RocksdbError) => "store.rocksdb-error",
            EventType::Store(StoreEvent::SqliteError) => "store.sqlite-error",
            EventType::Store(StoreEvent::LdapError) => "store.ldap-error",
            EventType::Store(StoreEvent::ElasticsearchError) => "store.elasticsearch-error",
            EventType::Store(StoreEvent::MeilisearchError) => "store.meilisearch-error",
            EventType::Store(StoreEvent::RedisError) => "store.redis-error",
            EventType::Store(StoreEvent::S3Error) => "store.s3-error",
            EventType::Store(StoreEvent::AzureError) => "store.azure-error",
            EventType::Store(StoreEvent::FilesystemError) => "store.filesystem-error",
            EventType::Store(StoreEvent::PoolError) => "store.pool-error",
            EventType::Store(StoreEvent::DataCorruption) => "store.data-corruption",
            EventType::Store(StoreEvent::DecompressError) => "store.decompress-error",
            EventType::Store(StoreEvent::DeserializeError) => "store.deserialize-error",
            EventType::Store(StoreEvent::NotFound) => "store.not-found",
            EventType::Store(StoreEvent::NotConfigured) => "store.not-configured",
            EventType::Store(StoreEvent::NotSupported) => "store.not-supported",
            EventType::Store(StoreEvent::UnexpectedError) => "store.unexpected-error",
            EventType::Store(StoreEvent::CryptoError) => "store.crypto-error",
            EventType::Store(StoreEvent::HttpStoreError) => "store.http-store-error",
            EventType::Store(StoreEvent::CacheMiss) => "store.cache-miss",
            EventType::Store(StoreEvent::CacheHit) => "store.cache-hit",
            EventType::Store(StoreEvent::CacheStale) => "store.cache-stale",
            EventType::Store(StoreEvent::CacheUpdate) => "store.cache-update",
            EventType::Store(StoreEvent::BlobMissingMarker) => "store.blob-missing-marker",
            EventType::Store(StoreEvent::DataWrite) => "store.data-write",
            EventType::Store(StoreEvent::DataIterate) => "store.data-iterate",
            EventType::Store(StoreEvent::BlobRead) => "store.blob-read",
            EventType::Store(StoreEvent::BlobWrite) => "store.blob-write",
            EventType::Store(StoreEvent::BlobDelete) => "store.blob-delete",
            EventType::Store(StoreEvent::SqlQuery) => "store.sql-query",
            EventType::Store(StoreEvent::LdapQuery) => "store.ldap-query",
            EventType::Store(StoreEvent::LdapWarning) => "store.ldap-warning",
            EventType::Store(StoreEvent::HttpStoreFetch) => "store.http-store-fetch",
            EventType::Store(StoreEvent::AutoExpunge) => "store.auto-expunge",
            EventType::Store(StoreEvent::BlobStorePurged) => "store.blob-store-purged",
            EventType::Store(StoreEvent::DataStorePurged) => "store.data-store-purged",
            EventType::TaskManager(TaskManagerEvent::TaskAcquired) => "task-manager.task-acquired",
            EventType::TaskManager(TaskManagerEvent::TaskQueued) => "task-manager.task-queued",
            EventType::TaskManager(TaskManagerEvent::TaskScheduled) => {
                "task-manager.task-scheduled"
            }
            EventType::TaskManager(TaskManagerEvent::TaskLocked) => "task-manager.task-locked",
            EventType::TaskManager(TaskManagerEvent::TaskIgnored) => "task-manager.task-ignored",
            EventType::TaskManager(TaskManagerEvent::TaskFailed) => "task-manager.task-failed",
            EventType::TaskManager(TaskManagerEvent::TaskRetry) => "task-manager.task-retry",
            EventType::TaskManager(TaskManagerEvent::BlobNotFound) => "task-manager.blob-not-found",
            EventType::TaskManager(TaskManagerEvent::MetadataNotFound) => {
                "task-manager.metadata-not-found"
            }
            EventType::TaskManager(TaskManagerEvent::SchedulerStarted) => {
                "task-manager.scheduler-started"
            }
            EventType::TaskManager(TaskManagerEvent::ManagerStarted) => {
                "task-manager.manager-started"
            }
            EventType::Telemetry(TelemetryEvent::AlertEvent) => "telemetry.alert-event",
            EventType::Telemetry(TelemetryEvent::AlertMessage) => "telemetry.alert-message",
            EventType::Telemetry(TelemetryEvent::LogError) => "telemetry.log-error",
            EventType::Telemetry(TelemetryEvent::WebhookError) => "telemetry.webhook-error",
            EventType::Telemetry(TelemetryEvent::OtelExporterError) => {
                "telemetry.otel-exporter-error"
            }
            EventType::Telemetry(TelemetryEvent::OtelMetricsExporterError) => {
                "telemetry.otel-metrics-exporter-error"
            }
            EventType::Telemetry(TelemetryEvent::PrometheusExporterError) => {
                "telemetry.prometheus-exporter-error"
            }
            EventType::Telemetry(TelemetryEvent::JournalError) => "telemetry.journal-error",
            EventType::Telemetry(TelemetryEvent::MetricsCollected) => "telemetry.metrics-collected",
            EventType::Telemetry(TelemetryEvent::MetricsStored) => "telemetry.metrics-stored",
            EventType::Telemetry(TelemetryEvent::MetricsPushed) => "telemetry.metrics-pushed",
            EventType::Tls(TlsEvent::Handshake) => "tls.handshake",
            EventType::Tls(TlsEvent::HandshakeError) => "tls.handshake-error",
            EventType::Tls(TlsEvent::NotConfigured) => "tls.not-configured",
            EventType::Tls(TlsEvent::CertificateNotFound) => "tls.certificate-not-found",
            EventType::Tls(TlsEvent::NoCertificatesAvailable) => "tls.no-certificates-available",
            EventType::Tls(TlsEvent::MultipleCertificatesAvailable) => {
                "tls.multiple-certificates-available"
            }
            EventType::Tls(TlsEvent::ExpiredCertificateRemoved) => {
                "tls.expired-certificate-removed"
            }
            EventType::TlsRpt(TlsRptEvent::RecordFetch) => "tls-rpt.record-fetch",
            EventType::TlsRpt(TlsRptEvent::RecordFetchError) => "tls-rpt.record-fetch-error",
            EventType::TlsRpt(TlsRptEvent::RecordNotFound) => "tls-rpt.record-not-found",
            EventType::WebDav(WebDavEvent::Propfind) => "web-dav.propfind",
            EventType::WebDav(WebDavEvent::Proppatch) => "web-dav.proppatch",
            EventType::WebDav(WebDavEvent::Get) => "web-dav.get",
            EventType::WebDav(WebDavEvent::Head) => "web-dav.head",
            EventType::WebDav(WebDavEvent::Report) => "web-dav.report",
            EventType::WebDav(WebDavEvent::Mkcol) => "web-dav.mkcol",
            EventType::WebDav(WebDavEvent::Mkcalendar) => "web-dav.mkcalendar",
            EventType::WebDav(WebDavEvent::Delete) => "web-dav.delete",
            EventType::WebDav(WebDavEvent::Put) => "web-dav.put",
            EventType::WebDav(WebDavEvent::Post) => "web-dav.post",
            EventType::WebDav(WebDavEvent::Patch) => "web-dav.patch",
            EventType::WebDav(WebDavEvent::Copy) => "web-dav.copy",
            EventType::WebDav(WebDavEvent::Move) => "web-dav.move",
            EventType::WebDav(WebDavEvent::Lock) => "web-dav.lock",
            EventType::WebDav(WebDavEvent::Unlock) => "web-dav.unlock",
            EventType::WebDav(WebDavEvent::Acl) => "web-dav.acl",
            EventType::WebDav(WebDavEvent::Options) => "web-dav.options",
            EventType::WebDav(WebDavEvent::Error) => "web-dav.error",
        }
    }

    pub const fn to_id(&self) -> u16 {
        match self {
            EventType::Acme(AcmeEvent::AuthStart) => 3,
            EventType::Acme(AcmeEvent::AuthPending) => 2,
            EventType::Acme(AcmeEvent::AuthValid) => 5,
            EventType::Acme(AcmeEvent::AuthCompleted) => 0,
            EventType::Acme(AcmeEvent::AuthError) => 1,
            EventType::Acme(AcmeEvent::AuthTooManyAttempts) => 4,
            EventType::Acme(AcmeEvent::ProcessCert) => 22,
            EventType::Acme(AcmeEvent::OrderStart) => 20,
            EventType::Acme(AcmeEvent::OrderProcessing) => 18,
            EventType::Acme(AcmeEvent::OrderCompleted) => 16,
            EventType::Acme(AcmeEvent::OrderReady) => 19,
            EventType::Acme(AcmeEvent::OrderValid) => 21,
            EventType::Acme(AcmeEvent::OrderInvalid) => 17,
            EventType::Acme(AcmeEvent::RenewBackoff) => 23,
            EventType::Acme(AcmeEvent::ClientSuppliedSni) => 7,
            EventType::Acme(AcmeEvent::ClientMissingSni) => 6,
            EventType::Acme(AcmeEvent::TlsAlpnReceived) => 25,
            EventType::Acme(AcmeEvent::TlsAlpnError) => 24,
            EventType::Acme(AcmeEvent::TokenNotFound) => 26,
            EventType::Acme(AcmeEvent::Error) => 15,
            EventType::Ai(AiEvent::LlmResponse) => 556,
            EventType::Ai(AiEvent::ApiError) => 557,
            EventType::Arc(ArcEvent::ChainTooLong) => 28,
            EventType::Arc(ArcEvent::InvalidInstance) => 31,
            EventType::Arc(ArcEvent::InvalidCv) => 30,
            EventType::Arc(ArcEvent::HasHeaderTag) => 29,
            EventType::Arc(ArcEvent::BrokenChain) => 27,
            EventType::Arc(ArcEvent::SealerNotFound) => 32,
            EventType::Auth(AuthEvent::Success) => 37,
            EventType::Auth(AuthEvent::Failed) => 35,
            EventType::Auth(AuthEvent::TokenExpired) => 554,
            EventType::Auth(AuthEvent::MfaRequired) => 36,
            EventType::Auth(AuthEvent::TooManyAttempts) => 38,
            EventType::Auth(AuthEvent::ClientRegistration) => 555,
            EventType::Auth(AuthEvent::Error) => 34,
            EventType::Auth(AuthEvent::Warning) => 595,
            EventType::Auth(AuthEvent::CredentialExpired) => 276,
            EventType::Calendar(CalendarEvent::RuleExpansionError) => 576,
            EventType::Calendar(CalendarEvent::AlarmSent) => 579,
            EventType::Calendar(CalendarEvent::AlarmSkipped) => 580,
            EventType::Calendar(CalendarEvent::AlarmRecipientOverride) => 581,
            EventType::Calendar(CalendarEvent::AlarmFailed) => 582,
            EventType::Calendar(CalendarEvent::ItipMessageSent) => 583,
            EventType::Calendar(CalendarEvent::ItipMessageReceived) => 584,
            EventType::Calendar(CalendarEvent::ItipMessageError) => 585,
            EventType::Cluster(ClusterEvent::Startup) => 278,
            EventType::Cluster(ClusterEvent::SubscriberStart) => 39,
            EventType::Cluster(ClusterEvent::SubscriberStop) => 40,
            EventType::Cluster(ClusterEvent::SubscriberError) => 41,
            EventType::Cluster(ClusterEvent::SubscriberDisconnected) => 42,
            EventType::Cluster(ClusterEvent::PublisherStart) => 43,
            EventType::Cluster(ClusterEvent::PublisherStop) => 44,
            EventType::Cluster(ClusterEvent::PublisherError) => 45,
            EventType::Cluster(ClusterEvent::MessageReceived) => 46,
            EventType::Cluster(ClusterEvent::MessageSkipped) => 47,
            EventType::Cluster(ClusterEvent::MessageInvalid) => 49,
            EventType::Cluster(ClusterEvent::NodeIdRenewed) => 275,
            EventType::Dane(DaneEvent::AuthenticationSuccess) => 67,
            EventType::Dane(DaneEvent::AuthenticationFailure) => 66,
            EventType::Dane(DaneEvent::NoCertificatesFound) => 69,
            EventType::Dane(DaneEvent::CertificateParseError) => 68,
            EventType::Dane(DaneEvent::TlsaRecordMatch) => 73,
            EventType::Dane(DaneEvent::TlsaRecordFetch) => 70,
            EventType::Dane(DaneEvent::TlsaRecordFetchError) => 71,
            EventType::Dane(DaneEvent::TlsaRecordNotFound) => 75,
            EventType::Dane(DaneEvent::TlsaRecordNotDnssecSigned) => 74,
            EventType::Dane(DaneEvent::TlsaRecordInvalid) => 72,
            EventType::Delivery(DeliveryEvent::AttemptStart) => 77,
            EventType::Delivery(DeliveryEvent::AttemptEnd) => 76,
            EventType::Delivery(DeliveryEvent::Completed) => 80,
            EventType::Delivery(DeliveryEvent::Failed) => 92,
            EventType::Delivery(DeliveryEvent::DomainDeliveryStart) => 85,
            EventType::Delivery(DeliveryEvent::MxLookup) => 101,
            EventType::Delivery(DeliveryEvent::MxLookupFailed) => 102,
            EventType::Delivery(DeliveryEvent::IpLookup) => 95,
            EventType::Delivery(DeliveryEvent::IpLookupFailed) => 96,
            EventType::Delivery(DeliveryEvent::NullMx) => 103,
            EventType::Delivery(DeliveryEvent::Connect) => 82,
            EventType::Delivery(DeliveryEvent::ConnectError) => 83,
            EventType::Delivery(DeliveryEvent::MissingOutboundHostname) => 100,
            EventType::Delivery(DeliveryEvent::GreetingFailed) => 93,
            EventType::Delivery(DeliveryEvent::Ehlo) => 90,
            EventType::Delivery(DeliveryEvent::EhloRejected) => 91,
            EventType::Delivery(DeliveryEvent::Auth) => 78,
            EventType::Delivery(DeliveryEvent::AuthFailed) => 79,
            EventType::Delivery(DeliveryEvent::MailFrom) => 97,
            EventType::Delivery(DeliveryEvent::MailFromRejected) => 98,
            EventType::Delivery(DeliveryEvent::Delivered) => 84,
            EventType::Delivery(DeliveryEvent::RcptTo) => 107,
            EventType::Delivery(DeliveryEvent::RcptToRejected) => 109,
            EventType::Delivery(DeliveryEvent::RcptToFailed) => 108,
            EventType::Delivery(DeliveryEvent::MessageRejected) => 99,
            EventType::Delivery(DeliveryEvent::StartTls) => 110,
            EventType::Delivery(DeliveryEvent::StartTlsUnavailable) => 113,
            EventType::Delivery(DeliveryEvent::StartTlsError) => 112,
            EventType::Delivery(DeliveryEvent::StartTlsDisabled) => 111,
            EventType::Delivery(DeliveryEvent::ImplicitTlsError) => 94,
            EventType::Delivery(DeliveryEvent::ConcurrencyLimitExceeded) => 81,
            EventType::Delivery(DeliveryEvent::RateLimitExceeded) => 104,
            EventType::Delivery(DeliveryEvent::DoubleBounce) => 86,
            EventType::Delivery(DeliveryEvent::DsnSuccess) => 88,
            EventType::Delivery(DeliveryEvent::DsnTempFail) => 89,
            EventType::Delivery(DeliveryEvent::DsnPermFail) => 87,
            EventType::Delivery(DeliveryEvent::RawInput) => 105,
            EventType::Delivery(DeliveryEvent::RawOutput) => 106,
            EventType::Dkim(DkimEvent::Pass) => 121,
            EventType::Dkim(DkimEvent::Neutral) => 119,
            EventType::Dkim(DkimEvent::Fail) => 114,
            EventType::Dkim(DkimEvent::PermError) => 122,
            EventType::Dkim(DkimEvent::TempError) => 127,
            EventType::Dkim(DkimEvent::None) => 120,
            EventType::Dkim(DkimEvent::UnsupportedVersion) => 131,
            EventType::Dkim(DkimEvent::UnsupportedAlgorithm) => 128,
            EventType::Dkim(DkimEvent::UnsupportedCanonicalization) => 129,
            EventType::Dkim(DkimEvent::UnsupportedKeyType) => 130,
            EventType::Dkim(DkimEvent::FailedBodyHashMatch) => 116,
            EventType::Dkim(DkimEvent::FailedVerification) => 117,
            EventType::Dkim(DkimEvent::FailedAuidMatch) => 115,
            EventType::Dkim(DkimEvent::RevokedPublicKey) => 123,
            EventType::Dkim(DkimEvent::IncompatibleAlgorithms) => 118,
            EventType::Dkim(DkimEvent::SignatureExpired) => 124,
            EventType::Dkim(DkimEvent::SignatureLength) => 125,
            EventType::Dkim(DkimEvent::SignerNotFound) => 126,
            EventType::Dkim(DkimEvent::BuildError) => 592,
            EventType::Dkim(DkimEvent::SignatureCreated) => 596,
            EventType::Dkim(DkimEvent::SignaturePublished) => 597,
            EventType::Dkim(DkimEvent::SignatureRetiring) => 598,
            EventType::Dkim(DkimEvent::SignatureRetired) => 599,
            EventType::Dkim(DkimEvent::SignatureDeleted) => 600,
            EventType::Dmarc(DmarcEvent::Pass) => 134,
            EventType::Dmarc(DmarcEvent::Fail) => 132,
            EventType::Dmarc(DmarcEvent::PermError) => 135,
            EventType::Dmarc(DmarcEvent::TempError) => 136,
            EventType::Dmarc(DmarcEvent::None) => 133,
            EventType::Dns(DnsEvent::RecordCreated) => 8,
            EventType::Dns(DnsEvent::RecordCreationFailed) => 9,
            EventType::Dns(DnsEvent::RecordDeletionFailed) => 10,
            EventType::Dns(DnsEvent::RecordNotPropagated) => 12,
            EventType::Dns(DnsEvent::RecordLookupFailed) => 11,
            EventType::Dns(DnsEvent::RecordPropagated) => 13,
            EventType::Dns(DnsEvent::RecordPropagationTimeout) => 14,
            EventType::Dns(DnsEvent::BuildError) => 591,
            EventType::Eval(EvalEvent::Result) => 139,
            EventType::Eval(EvalEvent::Error) => 138,
            EventType::Eval(EvalEvent::DirectoryNotFound) => 137,
            EventType::Eval(EvalEvent::StoreNotFound) => 140,
            EventType::Http(HttpEvent::ConnectionStart) => 153,
            EventType::Http(HttpEvent::ConnectionEnd) => 152,
            EventType::Http(HttpEvent::Error) => 154,
            EventType::Http(HttpEvent::RequestUrl) => 156,
            EventType::Http(HttpEvent::RequestBody) => 155,
            EventType::Http(HttpEvent::ResponseBody) => 157,
            EventType::Http(HttpEvent::XForwardedMissing) => 158,
            EventType::Imap(ImapEvent::ConnectionStart) => 163,
            EventType::Imap(ImapEvent::ConnectionEnd) => 162,
            EventType::Imap(ImapEvent::GetAcl) => 171,
            EventType::Imap(ImapEvent::SetAcl) => 188,
            EventType::Imap(ImapEvent::MyRights) => 180,
            EventType::Imap(ImapEvent::ListRights) => 176,
            EventType::Imap(ImapEvent::Append) => 159,
            EventType::Imap(ImapEvent::Capabilities) => 160,
            EventType::Imap(ImapEvent::Id) => 172,
            EventType::Imap(ImapEvent::Close) => 161,
            EventType::Imap(ImapEvent::Copy) => 164,
            EventType::Imap(ImapEvent::Move) => 179,
            EventType::Imap(ImapEvent::CreateMailbox) => 165,
            EventType::Imap(ImapEvent::DeleteMailbox) => 166,
            EventType::Imap(ImapEvent::RenameMailbox) => 185,
            EventType::Imap(ImapEvent::Enable) => 167,
            EventType::Imap(ImapEvent::Expunge) => 169,
            EventType::Imap(ImapEvent::Fetch) => 170,
            EventType::Imap(ImapEvent::IdleStart) => 173,
            EventType::Imap(ImapEvent::IdleStop) => 174,
            EventType::Imap(ImapEvent::List) => 175,
            EventType::Imap(ImapEvent::Lsub) => 178,
            EventType::Imap(ImapEvent::Logout) => 177,
            EventType::Imap(ImapEvent::Namespace) => 181,
            EventType::Imap(ImapEvent::Noop) => 182,
            EventType::Imap(ImapEvent::Search) => 186,
            EventType::Imap(ImapEvent::Sort) => 189,
            EventType::Imap(ImapEvent::Select) => 187,
            EventType::Imap(ImapEvent::Status) => 190,
            EventType::Imap(ImapEvent::Store) => 191,
            EventType::Imap(ImapEvent::Subscribe) => 192,
            EventType::Imap(ImapEvent::Unsubscribe) => 194,
            EventType::Imap(ImapEvent::Thread) => 193,
            EventType::Imap(ImapEvent::GetQuota) => 57,
            EventType::Imap(ImapEvent::Error) => 168,
            EventType::Imap(ImapEvent::RawInput) => 183,
            EventType::Imap(ImapEvent::RawOutput) => 184,
            EventType::IncomingReport(IncomingReportEvent::DmarcReport) => 200,
            EventType::IncomingReport(IncomingReportEvent::DmarcReportWithWarnings) => 201,
            EventType::IncomingReport(IncomingReportEvent::TlsReport) => 206,
            EventType::IncomingReport(IncomingReportEvent::TlsReportWithWarnings) => 207,
            EventType::IncomingReport(IncomingReportEvent::AbuseReport) => 195,
            EventType::IncomingReport(IncomingReportEvent::AuthFailureReport) => 197,
            EventType::IncomingReport(IncomingReportEvent::FraudReport) => 202,
            EventType::IncomingReport(IncomingReportEvent::NotSpamReport) => 204,
            EventType::IncomingReport(IncomingReportEvent::VirusReport) => 209,
            EventType::IncomingReport(IncomingReportEvent::OtherReport) => 205,
            EventType::IncomingReport(IncomingReportEvent::MessageParseFailed) => 203,
            EventType::IncomingReport(IncomingReportEvent::DmarcParseFailed) => 199,
            EventType::IncomingReport(IncomingReportEvent::TlsRpcParseFailed) => 208,
            EventType::IncomingReport(IncomingReportEvent::ArfParseFailed) => 196,
            EventType::IncomingReport(IncomingReportEvent::DecompressError) => 198,
            EventType::Iprev(IprevEvent::Pass) => 212,
            EventType::Iprev(IprevEvent::Fail) => 210,
            EventType::Iprev(IprevEvent::PermError) => 213,
            EventType::Iprev(IprevEvent::TempError) => 214,
            EventType::Iprev(IprevEvent::None) => 211,
            EventType::Jmap(JmapEvent::MethodCall) => 223,
            EventType::Jmap(JmapEvent::InvalidArguments) => 221,
            EventType::Jmap(JmapEvent::RequestTooLarge) => 227,
            EventType::Jmap(JmapEvent::StateMismatch) => 228,
            EventType::Jmap(JmapEvent::AnchorNotFound) => 218,
            EventType::Jmap(JmapEvent::UnsupportedFilter) => 232,
            EventType::Jmap(JmapEvent::UnsupportedSort) => 233,
            EventType::Jmap(JmapEvent::UnknownMethod) => 231,
            EventType::Jmap(JmapEvent::InvalidResultReference) => 222,
            EventType::Jmap(JmapEvent::Forbidden) => 220,
            EventType::Jmap(JmapEvent::AccountNotFound) => 215,
            EventType::Jmap(JmapEvent::AccountNotSupportedByMethod) => 216,
            EventType::Jmap(JmapEvent::AccountReadOnly) => 217,
            EventType::Jmap(JmapEvent::NotFound) => 224,
            EventType::Jmap(JmapEvent::CannotCalculateChanges) => 219,
            EventType::Jmap(JmapEvent::UnknownDataType) => 230,
            EventType::Jmap(JmapEvent::UnknownCapability) => 229,
            EventType::Jmap(JmapEvent::NotJson) => 225,
            EventType::Jmap(JmapEvent::NotRequest) => 226,
            EventType::Jmap(JmapEvent::WebsocketStart) => 235,
            EventType::Jmap(JmapEvent::WebsocketStop) => 236,
            EventType::Jmap(JmapEvent::WebsocketError) => 234,
            EventType::Limit(LimitEvent::SizeRequest) => 243,
            EventType::Limit(LimitEvent::SizeUpload) => 244,
            EventType::Limit(LimitEvent::CallsIn) => 238,
            EventType::Limit(LimitEvent::ConcurrentRequest) => 240,
            EventType::Limit(LimitEvent::ConcurrentUpload) => 241,
            EventType::Limit(LimitEvent::ConcurrentConnection) => 239,
            EventType::Limit(LimitEvent::Quota) => 242,
            EventType::Limit(LimitEvent::BlobQuota) => 237,
            EventType::Limit(LimitEvent::TenantQuota) => 553,
            EventType::Limit(LimitEvent::TooManyRequests) => 245,
            EventType::MailAuth(MailAuthEvent::ParseError) => 254,
            EventType::MailAuth(MailAuthEvent::MissingParameters) => 252,
            EventType::MailAuth(MailAuthEvent::NoHeadersFound) => 253,
            EventType::MailAuth(MailAuthEvent::Crypto) => 247,
            EventType::MailAuth(MailAuthEvent::Io) => 251,
            EventType::MailAuth(MailAuthEvent::Base64) => 246,
            EventType::MailAuth(MailAuthEvent::DnsError) => 248,
            EventType::MailAuth(MailAuthEvent::DnsRecordNotFound) => 250,
            EventType::MailAuth(MailAuthEvent::DnsInvalidRecordType) => 249,
            EventType::MailAuth(MailAuthEvent::PolicyNotAligned) => 255,
            EventType::ManageSieve(ManageSieveEvent::ConnectionStart) => 259,
            EventType::ManageSieve(ManageSieveEvent::ConnectionEnd) => 258,
            EventType::ManageSieve(ManageSieveEvent::CreateScript) => 260,
            EventType::ManageSieve(ManageSieveEvent::UpdateScript) => 274,
            EventType::ManageSieve(ManageSieveEvent::GetScript) => 263,
            EventType::ManageSieve(ManageSieveEvent::DeleteScript) => 261,
            EventType::ManageSieve(ManageSieveEvent::RenameScript) => 270,
            EventType::ManageSieve(ManageSieveEvent::CheckScript) => 257,
            EventType::ManageSieve(ManageSieveEvent::HaveSpace) => 264,
            EventType::ManageSieve(ManageSieveEvent::ListScripts) => 265,
            EventType::ManageSieve(ManageSieveEvent::SetActive) => 271,
            EventType::ManageSieve(ManageSieveEvent::Capabilities) => 256,
            EventType::ManageSieve(ManageSieveEvent::StartTls) => 272,
            EventType::ManageSieve(ManageSieveEvent::Unauthenticate) => 273,
            EventType::ManageSieve(ManageSieveEvent::Logout) => 266,
            EventType::ManageSieve(ManageSieveEvent::Noop) => 267,
            EventType::ManageSieve(ManageSieveEvent::Error) => 262,
            EventType::ManageSieve(ManageSieveEvent::RawInput) => 268,
            EventType::ManageSieve(ManageSieveEvent::RawOutput) => 269,
            EventType::MessageIngest(MessageIngestEvent::Ham) => 283,
            EventType::MessageIngest(MessageIngestEvent::Spam) => 286,
            EventType::MessageIngest(MessageIngestEvent::ImapAppend) => 284,
            EventType::MessageIngest(MessageIngestEvent::JmapAppend) => 285,
            EventType::MessageIngest(MessageIngestEvent::Duplicate) => 281,
            EventType::MessageIngest(MessageIngestEvent::Error) => 282,
            EventType::MessageIngest(MessageIngestEvent::SearchIndex) => 142,
            EventType::Milter(MilterEvent::Read) => 299,
            EventType::Milter(MilterEvent::Write) => 303,
            EventType::Milter(MilterEvent::ActionAccept) => 287,
            EventType::Milter(MilterEvent::ActionDiscard) => 289,
            EventType::Milter(MilterEvent::ActionReject) => 290,
            EventType::Milter(MilterEvent::ActionTempFail) => 293,
            EventType::Milter(MilterEvent::ActionReplyCode) => 291,
            EventType::Milter(MilterEvent::ActionConnectionFailure) => 288,
            EventType::Milter(MilterEvent::ActionShutdown) => 292,
            EventType::Milter(MilterEvent::IoError) => 297,
            EventType::Milter(MilterEvent::FrameTooLarge) => 296,
            EventType::Milter(MilterEvent::FrameInvalid) => 295,
            EventType::Milter(MilterEvent::UnexpectedResponse) => 302,
            EventType::Milter(MilterEvent::Timeout) => 300,
            EventType::Milter(MilterEvent::TlsInvalidName) => 301,
            EventType::Milter(MilterEvent::Disconnected) => 294,
            EventType::Milter(MilterEvent::ParseError) => 298,
            EventType::MtaHook(MtaHookEvent::ActionAccept) => 304,
            EventType::MtaHook(MtaHookEvent::ActionDiscard) => 305,
            EventType::MtaHook(MtaHookEvent::ActionReject) => 307,
            EventType::MtaHook(MtaHookEvent::ActionQuarantine) => 306,
            EventType::MtaHook(MtaHookEvent::Error) => 308,
            EventType::MtaSts(MtaStsEvent::Authorized) => 309,
            EventType::MtaSts(MtaStsEvent::NotAuthorized) => 311,
            EventType::MtaSts(MtaStsEvent::PolicyFetch) => 312,
            EventType::MtaSts(MtaStsEvent::PolicyNotFound) => 314,
            EventType::MtaSts(MtaStsEvent::PolicyFetchError) => 313,
            EventType::MtaSts(MtaStsEvent::InvalidPolicy) => 310,
            EventType::Network(NetworkEvent::ListenStart) => 321,
            EventType::Network(NetworkEvent::ListenStop) => 322,
            EventType::Network(NetworkEvent::ListenError) => 320,
            EventType::Network(NetworkEvent::BindError) => 316,
            EventType::Network(NetworkEvent::ReadError) => 324,
            EventType::Network(NetworkEvent::WriteError) => 328,
            EventType::Network(NetworkEvent::FlushError) => 319,
            EventType::Network(NetworkEvent::AcceptError) => 315,
            EventType::Network(NetworkEvent::SplitError) => 326,
            EventType::Network(NetworkEvent::Timeout) => 327,
            EventType::Network(NetworkEvent::Closed) => 317,
            EventType::Network(NetworkEvent::ProxyError) => 323,
            EventType::Network(NetworkEvent::SetOptError) => 325,
            EventType::OutgoingReport(OutgoingReportEvent::SpfReport) => 342,
            EventType::OutgoingReport(OutgoingReportEvent::SpfRateLimited) => 341,
            EventType::OutgoingReport(OutgoingReportEvent::DkimReport) => 330,
            EventType::OutgoingReport(OutgoingReportEvent::DkimRateLimited) => 329,
            EventType::OutgoingReport(OutgoingReportEvent::DmarcReport) => 333,
            EventType::OutgoingReport(OutgoingReportEvent::DmarcRateLimited) => 332,
            EventType::OutgoingReport(OutgoingReportEvent::DmarcAggregateReport) => 331,
            EventType::OutgoingReport(OutgoingReportEvent::TlsAggregate) => 344,
            EventType::OutgoingReport(OutgoingReportEvent::HttpSubmission) => 334,
            EventType::OutgoingReport(OutgoingReportEvent::UnauthorizedReportingAddress) => 345,
            EventType::OutgoingReport(OutgoingReportEvent::ReportingAddressValidationError) => 340,
            EventType::OutgoingReport(OutgoingReportEvent::NotFound) => 339,
            EventType::OutgoingReport(OutgoingReportEvent::SubmissionError) => 343,
            EventType::OutgoingReport(OutgoingReportEvent::NoRecipientsFound) => 338,
            EventType::OutgoingReport(OutgoingReportEvent::Locked) => 337,
            EventType::OutgoingReport(OutgoingReportEvent::MaxSizeExceeded) => 59,
            EventType::Pop3(Pop3Event::ConnectionStart) => 348,
            EventType::Pop3(Pop3Event::ConnectionEnd) => 347,
            EventType::Pop3(Pop3Event::Delete) => 349,
            EventType::Pop3(Pop3Event::Reset) => 358,
            EventType::Pop3(Pop3Event::Quit) => 355,
            EventType::Pop3(Pop3Event::Fetch) => 351,
            EventType::Pop3(Pop3Event::List) => 352,
            EventType::Pop3(Pop3Event::ListMessage) => 353,
            EventType::Pop3(Pop3Event::Uidl) => 361,
            EventType::Pop3(Pop3Event::UidlMessage) => 362,
            EventType::Pop3(Pop3Event::Stat) => 360,
            EventType::Pop3(Pop3Event::Noop) => 354,
            EventType::Pop3(Pop3Event::Capabilities) => 346,
            EventType::Pop3(Pop3Event::StartTls) => 359,
            EventType::Pop3(Pop3Event::Utf8) => 363,
            EventType::Pop3(Pop3Event::Error) => 350,
            EventType::Pop3(Pop3Event::RawInput) => 356,
            EventType::Pop3(Pop3Event::RawOutput) => 357,
            EventType::PushSubscription(PushSubscriptionEvent::Success) => 373,
            EventType::PushSubscription(PushSubscriptionEvent::Error) => 371,
            EventType::PushSubscription(PushSubscriptionEvent::NotFound) => 372,
            EventType::Queue(QueueEvent::Started) => 390,
            EventType::Queue(QueueEvent::MessageQueued) => 380,
            EventType::Queue(QueueEvent::AuthenticatedMessageQueued) => 381,
            EventType::Queue(QueueEvent::ReportQueued) => 382,
            EventType::Queue(QueueEvent::DsnQueued) => 379,
            EventType::Queue(QueueEvent::AutogeneratedQueued) => 378,
            EventType::Queue(QueueEvent::Rescheduled) => 385,
            EventType::Queue(QueueEvent::Locked) => 377,
            EventType::Queue(QueueEvent::BlobNotFound) => 374,
            EventType::Queue(QueueEvent::RateLimitExceeded) => 384,
            EventType::Queue(QueueEvent::ConcurrencyLimitExceeded) => 375,
            EventType::Queue(QueueEvent::QuotaExceeded) => 383,
            EventType::Queue(QueueEvent::BackPressure) => 48,
            EventType::Registry(RegistryEvent::LocalReadError) => 62,
            EventType::Registry(RegistryEvent::LocalWriteError) => 54,
            EventType::Registry(RegistryEvent::LocalParseError) => 60,
            EventType::Registry(RegistryEvent::ReadError) => 65,
            EventType::Registry(RegistryEvent::WriteError) => 58,
            EventType::Registry(RegistryEvent::DeserializationError) => 56,
            EventType::Registry(RegistryEvent::BuildError) => 61,
            EventType::Registry(RegistryEvent::BuildWarning) => 55,
            EventType::Registry(RegistryEvent::NotSupported) => 64,
            EventType::Registry(RegistryEvent::ValidationError) => 63,
            EventType::Resource(ResourceEvent::NotFound) => 389,
            EventType::Resource(ResourceEvent::BadParameters) => 386,
            EventType::Resource(ResourceEvent::Error) => 388,
            EventType::Resource(ResourceEvent::DownloadExternal) => 387,
            EventType::Resource(ResourceEvent::ApplicationUpdated) => 601,
            EventType::Resource(ResourceEvent::ApplicationUnpacked) => 602,
            EventType::Security(SecurityEvent::AuthenticationBan) => 33,
            EventType::Security(SecurityEvent::AbuseBan) => 549,
            EventType::Security(SecurityEvent::ScanBan) => 558,
            EventType::Security(SecurityEvent::LoiterBan) => 550,
            EventType::Security(SecurityEvent::IpBlocked) => 318,
            EventType::Security(SecurityEvent::IpBlockExpired) => 593,
            EventType::Security(SecurityEvent::IpAllowExpired) => 594,
            EventType::Security(SecurityEvent::IpUnauthorized) => 279,
            EventType::Security(SecurityEvent::Unauthorized) => 552,
            EventType::Server(ServerEvent::Startup) => 393,
            EventType::Server(ServerEvent::Shutdown) => 392,
            EventType::Server(ServerEvent::StartupError) => 394,
            EventType::Server(ServerEvent::ThreadError) => 395,
            EventType::Server(ServerEvent::Licensing) => 391,
            EventType::Server(ServerEvent::RecoveryMode) => 603,
            EventType::Server(ServerEvent::BootstrapMode) => 604,
            EventType::Sieve(SieveEvent::ActionAccept) => 396,
            EventType::Sieve(SieveEvent::ActionAcceptReplace) => 397,
            EventType::Sieve(SieveEvent::ActionDiscard) => 398,
            EventType::Sieve(SieveEvent::ActionReject) => 399,
            EventType::Sieve(SieveEvent::SendMessage) => 406,
            EventType::Sieve(SieveEvent::MessageTooLarge) => 401,
            EventType::Sieve(SieveEvent::ScriptNotFound) => 405,
            EventType::Sieve(SieveEvent::ListNotFound) => 400,
            EventType::Sieve(SieveEvent::RuntimeError) => 404,
            EventType::Sieve(SieveEvent::UnexpectedError) => 407,
            EventType::Sieve(SieveEvent::NotSupported) => 402,
            EventType::Sieve(SieveEvent::QuotaExceeded) => 403,
            EventType::Smtp(SmtpEvent::ConnectionStart) => 417,
            EventType::Smtp(SmtpEvent::ConnectionEnd) => 416,
            EventType::Smtp(SmtpEvent::Error) => 428,
            EventType::Smtp(SmtpEvent::IdNotFound) => 469,
            EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded) => 415,
            EventType::Smtp(SmtpEvent::TransferLimitExceeded) => 485,
            EventType::Smtp(SmtpEvent::RateLimitExceeded) => 461,
            EventType::Smtp(SmtpEvent::TimeLimitExceeded) => 481,
            EventType::Smtp(SmtpEvent::MissingAuthDirectory) => 452,
            EventType::Smtp(SmtpEvent::MessageParseFailed) => 450,
            EventType::Smtp(SmtpEvent::MessageTooLarge) => 451,
            EventType::Smtp(SmtpEvent::LoopDetected) => 443,
            EventType::Smtp(SmtpEvent::DkimPass) => 422,
            EventType::Smtp(SmtpEvent::DkimFail) => 421,
            EventType::Smtp(SmtpEvent::ArcPass) => 410,
            EventType::Smtp(SmtpEvent::ArcFail) => 409,
            EventType::Smtp(SmtpEvent::SpfEhloPass) => 474,
            EventType::Smtp(SmtpEvent::SpfEhloFail) => 473,
            EventType::Smtp(SmtpEvent::SpfFromPass) => 476,
            EventType::Smtp(SmtpEvent::SpfFromFail) => 475,
            EventType::Smtp(SmtpEvent::DmarcPass) => 424,
            EventType::Smtp(SmtpEvent::DmarcFail) => 423,
            EventType::Smtp(SmtpEvent::IprevPass) => 441,
            EventType::Smtp(SmtpEvent::IprevFail) => 440,
            EventType::Smtp(SmtpEvent::TooManyMessages) => 483,
            EventType::Smtp(SmtpEvent::Ehlo) => 426,
            EventType::Smtp(SmtpEvent::InvalidEhlo) => 436,
            EventType::Smtp(SmtpEvent::DidNotSayEhlo) => 420,
            EventType::Smtp(SmtpEvent::EhloExpected) => 427,
            EventType::Smtp(SmtpEvent::LhloExpected) => 442,
            EventType::Smtp(SmtpEvent::MailFromUnauthenticated) => 447,
            EventType::Smtp(SmtpEvent::MailFromUnauthorized) => 448,
            EventType::Smtp(SmtpEvent::MailFromNotAllowed) => 551,
            EventType::Smtp(SmtpEvent::MailFromRewritten) => 446,
            EventType::Smtp(SmtpEvent::MailFromMissing) => 445,
            EventType::Smtp(SmtpEvent::MailFrom) => 444,
            EventType::Smtp(SmtpEvent::MultipleMailFrom) => 456,
            EventType::Smtp(SmtpEvent::MailboxDoesNotExist) => 449,
            EventType::Smtp(SmtpEvent::RelayNotAllowed) => 468,
            EventType::Smtp(SmtpEvent::RcptTo) => 464,
            EventType::Smtp(SmtpEvent::RcptToDuplicate) => 465,
            EventType::Smtp(SmtpEvent::RcptToRewritten) => 467,
            EventType::Smtp(SmtpEvent::RcptToMissing) => 466,
            EventType::Smtp(SmtpEvent::RcptToGreylisted) => 561,
            EventType::Smtp(SmtpEvent::TooManyRecipients) => 484,
            EventType::Smtp(SmtpEvent::TooManyInvalidRcpt) => 482,
            EventType::Smtp(SmtpEvent::RawInput) => 462,
            EventType::Smtp(SmtpEvent::RawOutput) => 463,
            EventType::Smtp(SmtpEvent::MissingLocalHostname) => 453,
            EventType::Smtp(SmtpEvent::Vrfy) => 487,
            EventType::Smtp(SmtpEvent::VrfyNotFound) => 489,
            EventType::Smtp(SmtpEvent::VrfyDisabled) => 488,
            EventType::Smtp(SmtpEvent::Expn) => 429,
            EventType::Smtp(SmtpEvent::ExpnNotFound) => 431,
            EventType::Smtp(SmtpEvent::ExpnDisabled) => 430,
            EventType::Smtp(SmtpEvent::RequireTlsDisabled) => 471,
            EventType::Smtp(SmtpEvent::DeliverByDisabled) => 418,
            EventType::Smtp(SmtpEvent::DeliverByInvalid) => 419,
            EventType::Smtp(SmtpEvent::FutureReleaseDisabled) => 432,
            EventType::Smtp(SmtpEvent::FutureReleaseInvalid) => 433,
            EventType::Smtp(SmtpEvent::MtPriorityDisabled) => 454,
            EventType::Smtp(SmtpEvent::MtPriorityInvalid) => 455,
            EventType::Smtp(SmtpEvent::DsnDisabled) => 425,
            EventType::Smtp(SmtpEvent::AuthNotAllowed) => 413,
            EventType::Smtp(SmtpEvent::AuthMechanismNotSupported) => 412,
            EventType::Smtp(SmtpEvent::AuthExchangeTooLong) => 411,
            EventType::Smtp(SmtpEvent::AlreadyAuthenticated) => 408,
            EventType::Smtp(SmtpEvent::Noop) => 457,
            EventType::Smtp(SmtpEvent::StartTls) => 477,
            EventType::Smtp(SmtpEvent::StartTlsUnavailable) => 479,
            EventType::Smtp(SmtpEvent::StartTlsAlready) => 478,
            EventType::Smtp(SmtpEvent::Rset) => 472,
            EventType::Smtp(SmtpEvent::Quit) => 460,
            EventType::Smtp(SmtpEvent::Help) => 434,
            EventType::Smtp(SmtpEvent::CommandNotImplemented) => 414,
            EventType::Smtp(SmtpEvent::InvalidCommand) => 435,
            EventType::Smtp(SmtpEvent::InvalidSenderAddress) => 439,
            EventType::Smtp(SmtpEvent::InvalidRecipientAddress) => 438,
            EventType::Smtp(SmtpEvent::InvalidParameter) => 437,
            EventType::Smtp(SmtpEvent::UnsupportedParameter) => 486,
            EventType::Smtp(SmtpEvent::SyntaxError) => 480,
            EventType::Smtp(SmtpEvent::RequestTooLarge) => 470,
            EventType::Spam(SpamEvent::Pyzor) => 564,
            EventType::Spam(SpamEvent::PyzorError) => 494,
            EventType::Spam(SpamEvent::Dnsbl) => 562,
            EventType::Spam(SpamEvent::DnsblError) => 563,
            EventType::Spam(SpamEvent::TrainStarted) => 588,
            EventType::Spam(SpamEvent::TrainCompleted) => 495,
            EventType::Spam(SpamEvent::TrainSampleAdded) => 143,
            EventType::Spam(SpamEvent::TrainSampleNotFound) => 491,
            EventType::Spam(SpamEvent::Classify) => 490,
            EventType::Spam(SpamEvent::ModelLoaded) => 589,
            EventType::Spam(SpamEvent::ModelNotReady) => 496,
            EventType::Spam(SpamEvent::ModelNotFound) => 497,
            EventType::Spam(SpamEvent::RulesUpdated) => 280,
            EventType::Spf(SpfEvent::Pass) => 501,
            EventType::Spf(SpfEvent::Fail) => 498,
            EventType::Spf(SpfEvent::SoftFail) => 503,
            EventType::Spf(SpfEvent::Neutral) => 499,
            EventType::Spf(SpfEvent::TempError) => 504,
            EventType::Spf(SpfEvent::PermError) => 502,
            EventType::Spf(SpfEvent::None) => 500,
            EventType::Store(StoreEvent::AssertValueFailed) => 505,
            EventType::Store(StoreEvent::FoundationdbError) => 518,
            EventType::Store(StoreEvent::MysqlError) => 522,
            EventType::Store(StoreEvent::PostgresqlError) => 527,
            EventType::Store(StoreEvent::RocksdbError) => 529,
            EventType::Store(StoreEvent::SqliteError) => 532,
            EventType::Store(StoreEvent::LdapError) => 520,
            EventType::Store(StoreEvent::ElasticsearchError) => 516,
            EventType::Store(StoreEvent::MeilisearchError) => 590,
            EventType::Store(StoreEvent::RedisError) => 528,
            EventType::Store(StoreEvent::S3Error) => 530,
            EventType::Store(StoreEvent::AzureError) => 559,
            EventType::Store(StoreEvent::FilesystemError) => 517,
            EventType::Store(StoreEvent::PoolError) => 526,
            EventType::Store(StoreEvent::DataCorruption) => 511,
            EventType::Store(StoreEvent::DecompressError) => 514,
            EventType::Store(StoreEvent::DeserializeError) => 515,
            EventType::Store(StoreEvent::NotFound) => 524,
            EventType::Store(StoreEvent::NotConfigured) => 523,
            EventType::Store(StoreEvent::NotSupported) => 525,
            EventType::Store(StoreEvent::UnexpectedError) => 533,
            EventType::Store(StoreEvent::CryptoError) => 510,
            EventType::Store(StoreEvent::HttpStoreError) => 493,
            EventType::Store(StoreEvent::CacheMiss) => 50,
            EventType::Store(StoreEvent::CacheHit) => 51,
            EventType::Store(StoreEvent::CacheStale) => 52,
            EventType::Store(StoreEvent::CacheUpdate) => 577,
            EventType::Store(StoreEvent::BlobMissingMarker) => 507,
            EventType::Store(StoreEvent::DataWrite) => 513,
            EventType::Store(StoreEvent::DataIterate) => 512,
            EventType::Store(StoreEvent::BlobRead) => 508,
            EventType::Store(StoreEvent::BlobWrite) => 509,
            EventType::Store(StoreEvent::BlobDelete) => 506,
            EventType::Store(StoreEvent::SqlQuery) => 531,
            EventType::Store(StoreEvent::LdapQuery) => 521,
            EventType::Store(StoreEvent::LdapWarning) => 519,
            EventType::Store(StoreEvent::HttpStoreFetch) => 492,
            EventType::Store(StoreEvent::AutoExpunge) => 364,
            EventType::Store(StoreEvent::BlobStorePurged) => 369,
            EventType::Store(StoreEvent::DataStorePurged) => 368,
            EventType::TaskManager(TaskManagerEvent::TaskAcquired) => 578,
            EventType::TaskManager(TaskManagerEvent::TaskQueued) => 149,
            EventType::TaskManager(TaskManagerEvent::TaskScheduled) => 370,
            EventType::TaskManager(TaskManagerEvent::TaskLocked) => 144,
            EventType::TaskManager(TaskManagerEvent::TaskIgnored) => 586,
            EventType::TaskManager(TaskManagerEvent::TaskFailed) => 587,
            EventType::TaskManager(TaskManagerEvent::TaskRetry) => 53,
            EventType::TaskManager(TaskManagerEvent::BlobNotFound) => 141,
            EventType::TaskManager(TaskManagerEvent::MetadataNotFound) => 145,
            EventType::TaskManager(TaskManagerEvent::SchedulerStarted) => 150,
            EventType::TaskManager(TaskManagerEvent::ManagerStarted) => 367,
            EventType::Telemetry(TelemetryEvent::AlertEvent) => 548,
            EventType::Telemetry(TelemetryEvent::AlertMessage) => 365,
            EventType::Telemetry(TelemetryEvent::LogError) => 535,
            EventType::Telemetry(TelemetryEvent::WebhookError) => 539,
            EventType::Telemetry(TelemetryEvent::OtelExporterError) => 536,
            EventType::Telemetry(TelemetryEvent::OtelMetricsExporterError) => 537,
            EventType::Telemetry(TelemetryEvent::PrometheusExporterError) => 538,
            EventType::Telemetry(TelemetryEvent::JournalError) => 534,
            EventType::Telemetry(TelemetryEvent::MetricsCollected) => 151,
            EventType::Telemetry(TelemetryEvent::MetricsStored) => 366,
            EventType::Telemetry(TelemetryEvent::MetricsPushed) => 146,
            EventType::Tls(TlsEvent::Handshake) => 543,
            EventType::Tls(TlsEvent::HandshakeError) => 544,
            EventType::Tls(TlsEvent::NotConfigured) => 547,
            EventType::Tls(TlsEvent::CertificateNotFound) => 542,
            EventType::Tls(TlsEvent::NoCertificatesAvailable) => 546,
            EventType::Tls(TlsEvent::MultipleCertificatesAvailable) => 545,
            EventType::Tls(TlsEvent::ExpiredCertificateRemoved) => 277,
            EventType::TlsRpt(TlsRptEvent::RecordFetch) => 540,
            EventType::TlsRpt(TlsRptEvent::RecordFetchError) => 541,
            EventType::TlsRpt(TlsRptEvent::RecordNotFound) => 560,
            EventType::WebDav(WebDavEvent::Propfind) => 147,
            EventType::WebDav(WebDavEvent::Proppatch) => 148,
            EventType::WebDav(WebDavEvent::Get) => 335,
            EventType::WebDav(WebDavEvent::Head) => 574,
            EventType::WebDav(WebDavEvent::Report) => 336,
            EventType::WebDav(WebDavEvent::Mkcol) => 376,
            EventType::WebDav(WebDavEvent::Mkcalendar) => 575,
            EventType::WebDav(WebDavEvent::Delete) => 458,
            EventType::WebDav(WebDavEvent::Put) => 459,
            EventType::WebDav(WebDavEvent::Post) => 565,
            EventType::WebDav(WebDavEvent::Patch) => 566,
            EventType::WebDav(WebDavEvent::Copy) => 567,
            EventType::WebDav(WebDavEvent::Move) => 568,
            EventType::WebDav(WebDavEvent::Lock) => 569,
            EventType::WebDav(WebDavEvent::Unlock) => 570,
            EventType::WebDav(WebDavEvent::Acl) => 571,
            EventType::WebDav(WebDavEvent::Options) => 573,
            EventType::WebDav(WebDavEvent::Error) => 572,
        }
    }

    pub fn from_id(id: u16) -> Option<Self> {
        match id {
            3 => Some(EventType::Acme(AcmeEvent::AuthStart)),
            2 => Some(EventType::Acme(AcmeEvent::AuthPending)),
            5 => Some(EventType::Acme(AcmeEvent::AuthValid)),
            0 => Some(EventType::Acme(AcmeEvent::AuthCompleted)),
            1 => Some(EventType::Acme(AcmeEvent::AuthError)),
            4 => Some(EventType::Acme(AcmeEvent::AuthTooManyAttempts)),
            22 => Some(EventType::Acme(AcmeEvent::ProcessCert)),
            20 => Some(EventType::Acme(AcmeEvent::OrderStart)),
            18 => Some(EventType::Acme(AcmeEvent::OrderProcessing)),
            16 => Some(EventType::Acme(AcmeEvent::OrderCompleted)),
            19 => Some(EventType::Acme(AcmeEvent::OrderReady)),
            21 => Some(EventType::Acme(AcmeEvent::OrderValid)),
            17 => Some(EventType::Acme(AcmeEvent::OrderInvalid)),
            23 => Some(EventType::Acme(AcmeEvent::RenewBackoff)),
            7 => Some(EventType::Acme(AcmeEvent::ClientSuppliedSni)),
            6 => Some(EventType::Acme(AcmeEvent::ClientMissingSni)),
            25 => Some(EventType::Acme(AcmeEvent::TlsAlpnReceived)),
            24 => Some(EventType::Acme(AcmeEvent::TlsAlpnError)),
            26 => Some(EventType::Acme(AcmeEvent::TokenNotFound)),
            15 => Some(EventType::Acme(AcmeEvent::Error)),
            556 => Some(EventType::Ai(AiEvent::LlmResponse)),
            557 => Some(EventType::Ai(AiEvent::ApiError)),
            28 => Some(EventType::Arc(ArcEvent::ChainTooLong)),
            31 => Some(EventType::Arc(ArcEvent::InvalidInstance)),
            30 => Some(EventType::Arc(ArcEvent::InvalidCv)),
            29 => Some(EventType::Arc(ArcEvent::HasHeaderTag)),
            27 => Some(EventType::Arc(ArcEvent::BrokenChain)),
            32 => Some(EventType::Arc(ArcEvent::SealerNotFound)),
            37 => Some(EventType::Auth(AuthEvent::Success)),
            35 => Some(EventType::Auth(AuthEvent::Failed)),
            554 => Some(EventType::Auth(AuthEvent::TokenExpired)),
            36 => Some(EventType::Auth(AuthEvent::MfaRequired)),
            38 => Some(EventType::Auth(AuthEvent::TooManyAttempts)),
            555 => Some(EventType::Auth(AuthEvent::ClientRegistration)),
            34 => Some(EventType::Auth(AuthEvent::Error)),
            595 => Some(EventType::Auth(AuthEvent::Warning)),
            276 => Some(EventType::Auth(AuthEvent::CredentialExpired)),
            576 => Some(EventType::Calendar(CalendarEvent::RuleExpansionError)),
            579 => Some(EventType::Calendar(CalendarEvent::AlarmSent)),
            580 => Some(EventType::Calendar(CalendarEvent::AlarmSkipped)),
            581 => Some(EventType::Calendar(CalendarEvent::AlarmRecipientOverride)),
            582 => Some(EventType::Calendar(CalendarEvent::AlarmFailed)),
            583 => Some(EventType::Calendar(CalendarEvent::ItipMessageSent)),
            584 => Some(EventType::Calendar(CalendarEvent::ItipMessageReceived)),
            585 => Some(EventType::Calendar(CalendarEvent::ItipMessageError)),
            278 => Some(EventType::Cluster(ClusterEvent::Startup)),
            39 => Some(EventType::Cluster(ClusterEvent::SubscriberStart)),
            40 => Some(EventType::Cluster(ClusterEvent::SubscriberStop)),
            41 => Some(EventType::Cluster(ClusterEvent::SubscriberError)),
            42 => Some(EventType::Cluster(ClusterEvent::SubscriberDisconnected)),
            43 => Some(EventType::Cluster(ClusterEvent::PublisherStart)),
            44 => Some(EventType::Cluster(ClusterEvent::PublisherStop)),
            45 => Some(EventType::Cluster(ClusterEvent::PublisherError)),
            46 => Some(EventType::Cluster(ClusterEvent::MessageReceived)),
            47 => Some(EventType::Cluster(ClusterEvent::MessageSkipped)),
            49 => Some(EventType::Cluster(ClusterEvent::MessageInvalid)),
            275 => Some(EventType::Cluster(ClusterEvent::NodeIdRenewed)),
            67 => Some(EventType::Dane(DaneEvent::AuthenticationSuccess)),
            66 => Some(EventType::Dane(DaneEvent::AuthenticationFailure)),
            69 => Some(EventType::Dane(DaneEvent::NoCertificatesFound)),
            68 => Some(EventType::Dane(DaneEvent::CertificateParseError)),
            73 => Some(EventType::Dane(DaneEvent::TlsaRecordMatch)),
            70 => Some(EventType::Dane(DaneEvent::TlsaRecordFetch)),
            71 => Some(EventType::Dane(DaneEvent::TlsaRecordFetchError)),
            75 => Some(EventType::Dane(DaneEvent::TlsaRecordNotFound)),
            74 => Some(EventType::Dane(DaneEvent::TlsaRecordNotDnssecSigned)),
            72 => Some(EventType::Dane(DaneEvent::TlsaRecordInvalid)),
            77 => Some(EventType::Delivery(DeliveryEvent::AttemptStart)),
            76 => Some(EventType::Delivery(DeliveryEvent::AttemptEnd)),
            80 => Some(EventType::Delivery(DeliveryEvent::Completed)),
            92 => Some(EventType::Delivery(DeliveryEvent::Failed)),
            85 => Some(EventType::Delivery(DeliveryEvent::DomainDeliveryStart)),
            101 => Some(EventType::Delivery(DeliveryEvent::MxLookup)),
            102 => Some(EventType::Delivery(DeliveryEvent::MxLookupFailed)),
            95 => Some(EventType::Delivery(DeliveryEvent::IpLookup)),
            96 => Some(EventType::Delivery(DeliveryEvent::IpLookupFailed)),
            103 => Some(EventType::Delivery(DeliveryEvent::NullMx)),
            82 => Some(EventType::Delivery(DeliveryEvent::Connect)),
            83 => Some(EventType::Delivery(DeliveryEvent::ConnectError)),
            100 => Some(EventType::Delivery(DeliveryEvent::MissingOutboundHostname)),
            93 => Some(EventType::Delivery(DeliveryEvent::GreetingFailed)),
            90 => Some(EventType::Delivery(DeliveryEvent::Ehlo)),
            91 => Some(EventType::Delivery(DeliveryEvent::EhloRejected)),
            78 => Some(EventType::Delivery(DeliveryEvent::Auth)),
            79 => Some(EventType::Delivery(DeliveryEvent::AuthFailed)),
            97 => Some(EventType::Delivery(DeliveryEvent::MailFrom)),
            98 => Some(EventType::Delivery(DeliveryEvent::MailFromRejected)),
            84 => Some(EventType::Delivery(DeliveryEvent::Delivered)),
            107 => Some(EventType::Delivery(DeliveryEvent::RcptTo)),
            109 => Some(EventType::Delivery(DeliveryEvent::RcptToRejected)),
            108 => Some(EventType::Delivery(DeliveryEvent::RcptToFailed)),
            99 => Some(EventType::Delivery(DeliveryEvent::MessageRejected)),
            110 => Some(EventType::Delivery(DeliveryEvent::StartTls)),
            113 => Some(EventType::Delivery(DeliveryEvent::StartTlsUnavailable)),
            112 => Some(EventType::Delivery(DeliveryEvent::StartTlsError)),
            111 => Some(EventType::Delivery(DeliveryEvent::StartTlsDisabled)),
            94 => Some(EventType::Delivery(DeliveryEvent::ImplicitTlsError)),
            81 => Some(EventType::Delivery(DeliveryEvent::ConcurrencyLimitExceeded)),
            104 => Some(EventType::Delivery(DeliveryEvent::RateLimitExceeded)),
            86 => Some(EventType::Delivery(DeliveryEvent::DoubleBounce)),
            88 => Some(EventType::Delivery(DeliveryEvent::DsnSuccess)),
            89 => Some(EventType::Delivery(DeliveryEvent::DsnTempFail)),
            87 => Some(EventType::Delivery(DeliveryEvent::DsnPermFail)),
            105 => Some(EventType::Delivery(DeliveryEvent::RawInput)),
            106 => Some(EventType::Delivery(DeliveryEvent::RawOutput)),
            121 => Some(EventType::Dkim(DkimEvent::Pass)),
            119 => Some(EventType::Dkim(DkimEvent::Neutral)),
            114 => Some(EventType::Dkim(DkimEvent::Fail)),
            122 => Some(EventType::Dkim(DkimEvent::PermError)),
            127 => Some(EventType::Dkim(DkimEvent::TempError)),
            120 => Some(EventType::Dkim(DkimEvent::None)),
            131 => Some(EventType::Dkim(DkimEvent::UnsupportedVersion)),
            128 => Some(EventType::Dkim(DkimEvent::UnsupportedAlgorithm)),
            129 => Some(EventType::Dkim(DkimEvent::UnsupportedCanonicalization)),
            130 => Some(EventType::Dkim(DkimEvent::UnsupportedKeyType)),
            116 => Some(EventType::Dkim(DkimEvent::FailedBodyHashMatch)),
            117 => Some(EventType::Dkim(DkimEvent::FailedVerification)),
            115 => Some(EventType::Dkim(DkimEvent::FailedAuidMatch)),
            123 => Some(EventType::Dkim(DkimEvent::RevokedPublicKey)),
            118 => Some(EventType::Dkim(DkimEvent::IncompatibleAlgorithms)),
            124 => Some(EventType::Dkim(DkimEvent::SignatureExpired)),
            125 => Some(EventType::Dkim(DkimEvent::SignatureLength)),
            126 => Some(EventType::Dkim(DkimEvent::SignerNotFound)),
            592 => Some(EventType::Dkim(DkimEvent::BuildError)),
            596 => Some(EventType::Dkim(DkimEvent::SignatureCreated)),
            597 => Some(EventType::Dkim(DkimEvent::SignaturePublished)),
            598 => Some(EventType::Dkim(DkimEvent::SignatureRetiring)),
            599 => Some(EventType::Dkim(DkimEvent::SignatureRetired)),
            600 => Some(EventType::Dkim(DkimEvent::SignatureDeleted)),
            134 => Some(EventType::Dmarc(DmarcEvent::Pass)),
            132 => Some(EventType::Dmarc(DmarcEvent::Fail)),
            135 => Some(EventType::Dmarc(DmarcEvent::PermError)),
            136 => Some(EventType::Dmarc(DmarcEvent::TempError)),
            133 => Some(EventType::Dmarc(DmarcEvent::None)),
            8 => Some(EventType::Dns(DnsEvent::RecordCreated)),
            9 => Some(EventType::Dns(DnsEvent::RecordCreationFailed)),
            10 => Some(EventType::Dns(DnsEvent::RecordDeletionFailed)),
            12 => Some(EventType::Dns(DnsEvent::RecordNotPropagated)),
            11 => Some(EventType::Dns(DnsEvent::RecordLookupFailed)),
            13 => Some(EventType::Dns(DnsEvent::RecordPropagated)),
            14 => Some(EventType::Dns(DnsEvent::RecordPropagationTimeout)),
            591 => Some(EventType::Dns(DnsEvent::BuildError)),
            139 => Some(EventType::Eval(EvalEvent::Result)),
            138 => Some(EventType::Eval(EvalEvent::Error)),
            137 => Some(EventType::Eval(EvalEvent::DirectoryNotFound)),
            140 => Some(EventType::Eval(EvalEvent::StoreNotFound)),
            153 => Some(EventType::Http(HttpEvent::ConnectionStart)),
            152 => Some(EventType::Http(HttpEvent::ConnectionEnd)),
            154 => Some(EventType::Http(HttpEvent::Error)),
            156 => Some(EventType::Http(HttpEvent::RequestUrl)),
            155 => Some(EventType::Http(HttpEvent::RequestBody)),
            157 => Some(EventType::Http(HttpEvent::ResponseBody)),
            158 => Some(EventType::Http(HttpEvent::XForwardedMissing)),
            163 => Some(EventType::Imap(ImapEvent::ConnectionStart)),
            162 => Some(EventType::Imap(ImapEvent::ConnectionEnd)),
            171 => Some(EventType::Imap(ImapEvent::GetAcl)),
            188 => Some(EventType::Imap(ImapEvent::SetAcl)),
            180 => Some(EventType::Imap(ImapEvent::MyRights)),
            176 => Some(EventType::Imap(ImapEvent::ListRights)),
            159 => Some(EventType::Imap(ImapEvent::Append)),
            160 => Some(EventType::Imap(ImapEvent::Capabilities)),
            172 => Some(EventType::Imap(ImapEvent::Id)),
            161 => Some(EventType::Imap(ImapEvent::Close)),
            164 => Some(EventType::Imap(ImapEvent::Copy)),
            179 => Some(EventType::Imap(ImapEvent::Move)),
            165 => Some(EventType::Imap(ImapEvent::CreateMailbox)),
            166 => Some(EventType::Imap(ImapEvent::DeleteMailbox)),
            185 => Some(EventType::Imap(ImapEvent::RenameMailbox)),
            167 => Some(EventType::Imap(ImapEvent::Enable)),
            169 => Some(EventType::Imap(ImapEvent::Expunge)),
            170 => Some(EventType::Imap(ImapEvent::Fetch)),
            173 => Some(EventType::Imap(ImapEvent::IdleStart)),
            174 => Some(EventType::Imap(ImapEvent::IdleStop)),
            175 => Some(EventType::Imap(ImapEvent::List)),
            178 => Some(EventType::Imap(ImapEvent::Lsub)),
            177 => Some(EventType::Imap(ImapEvent::Logout)),
            181 => Some(EventType::Imap(ImapEvent::Namespace)),
            182 => Some(EventType::Imap(ImapEvent::Noop)),
            186 => Some(EventType::Imap(ImapEvent::Search)),
            189 => Some(EventType::Imap(ImapEvent::Sort)),
            187 => Some(EventType::Imap(ImapEvent::Select)),
            190 => Some(EventType::Imap(ImapEvent::Status)),
            191 => Some(EventType::Imap(ImapEvent::Store)),
            192 => Some(EventType::Imap(ImapEvent::Subscribe)),
            194 => Some(EventType::Imap(ImapEvent::Unsubscribe)),
            193 => Some(EventType::Imap(ImapEvent::Thread)),
            57 => Some(EventType::Imap(ImapEvent::GetQuota)),
            168 => Some(EventType::Imap(ImapEvent::Error)),
            183 => Some(EventType::Imap(ImapEvent::RawInput)),
            184 => Some(EventType::Imap(ImapEvent::RawOutput)),
            200 => Some(EventType::IncomingReport(IncomingReportEvent::DmarcReport)),
            201 => Some(EventType::IncomingReport(
                IncomingReportEvent::DmarcReportWithWarnings,
            )),
            206 => Some(EventType::IncomingReport(IncomingReportEvent::TlsReport)),
            207 => Some(EventType::IncomingReport(
                IncomingReportEvent::TlsReportWithWarnings,
            )),
            195 => Some(EventType::IncomingReport(IncomingReportEvent::AbuseReport)),
            197 => Some(EventType::IncomingReport(
                IncomingReportEvent::AuthFailureReport,
            )),
            202 => Some(EventType::IncomingReport(IncomingReportEvent::FraudReport)),
            204 => Some(EventType::IncomingReport(
                IncomingReportEvent::NotSpamReport,
            )),
            209 => Some(EventType::IncomingReport(IncomingReportEvent::VirusReport)),
            205 => Some(EventType::IncomingReport(IncomingReportEvent::OtherReport)),
            203 => Some(EventType::IncomingReport(
                IncomingReportEvent::MessageParseFailed,
            )),
            199 => Some(EventType::IncomingReport(
                IncomingReportEvent::DmarcParseFailed,
            )),
            208 => Some(EventType::IncomingReport(
                IncomingReportEvent::TlsRpcParseFailed,
            )),
            196 => Some(EventType::IncomingReport(
                IncomingReportEvent::ArfParseFailed,
            )),
            198 => Some(EventType::IncomingReport(
                IncomingReportEvent::DecompressError,
            )),
            212 => Some(EventType::Iprev(IprevEvent::Pass)),
            210 => Some(EventType::Iprev(IprevEvent::Fail)),
            213 => Some(EventType::Iprev(IprevEvent::PermError)),
            214 => Some(EventType::Iprev(IprevEvent::TempError)),
            211 => Some(EventType::Iprev(IprevEvent::None)),
            223 => Some(EventType::Jmap(JmapEvent::MethodCall)),
            221 => Some(EventType::Jmap(JmapEvent::InvalidArguments)),
            227 => Some(EventType::Jmap(JmapEvent::RequestTooLarge)),
            228 => Some(EventType::Jmap(JmapEvent::StateMismatch)),
            218 => Some(EventType::Jmap(JmapEvent::AnchorNotFound)),
            232 => Some(EventType::Jmap(JmapEvent::UnsupportedFilter)),
            233 => Some(EventType::Jmap(JmapEvent::UnsupportedSort)),
            231 => Some(EventType::Jmap(JmapEvent::UnknownMethod)),
            222 => Some(EventType::Jmap(JmapEvent::InvalidResultReference)),
            220 => Some(EventType::Jmap(JmapEvent::Forbidden)),
            215 => Some(EventType::Jmap(JmapEvent::AccountNotFound)),
            216 => Some(EventType::Jmap(JmapEvent::AccountNotSupportedByMethod)),
            217 => Some(EventType::Jmap(JmapEvent::AccountReadOnly)),
            224 => Some(EventType::Jmap(JmapEvent::NotFound)),
            219 => Some(EventType::Jmap(JmapEvent::CannotCalculateChanges)),
            230 => Some(EventType::Jmap(JmapEvent::UnknownDataType)),
            229 => Some(EventType::Jmap(JmapEvent::UnknownCapability)),
            225 => Some(EventType::Jmap(JmapEvent::NotJson)),
            226 => Some(EventType::Jmap(JmapEvent::NotRequest)),
            235 => Some(EventType::Jmap(JmapEvent::WebsocketStart)),
            236 => Some(EventType::Jmap(JmapEvent::WebsocketStop)),
            234 => Some(EventType::Jmap(JmapEvent::WebsocketError)),
            243 => Some(EventType::Limit(LimitEvent::SizeRequest)),
            244 => Some(EventType::Limit(LimitEvent::SizeUpload)),
            238 => Some(EventType::Limit(LimitEvent::CallsIn)),
            240 => Some(EventType::Limit(LimitEvent::ConcurrentRequest)),
            241 => Some(EventType::Limit(LimitEvent::ConcurrentUpload)),
            239 => Some(EventType::Limit(LimitEvent::ConcurrentConnection)),
            242 => Some(EventType::Limit(LimitEvent::Quota)),
            237 => Some(EventType::Limit(LimitEvent::BlobQuota)),
            553 => Some(EventType::Limit(LimitEvent::TenantQuota)),
            245 => Some(EventType::Limit(LimitEvent::TooManyRequests)),
            254 => Some(EventType::MailAuth(MailAuthEvent::ParseError)),
            252 => Some(EventType::MailAuth(MailAuthEvent::MissingParameters)),
            253 => Some(EventType::MailAuth(MailAuthEvent::NoHeadersFound)),
            247 => Some(EventType::MailAuth(MailAuthEvent::Crypto)),
            251 => Some(EventType::MailAuth(MailAuthEvent::Io)),
            246 => Some(EventType::MailAuth(MailAuthEvent::Base64)),
            248 => Some(EventType::MailAuth(MailAuthEvent::DnsError)),
            250 => Some(EventType::MailAuth(MailAuthEvent::DnsRecordNotFound)),
            249 => Some(EventType::MailAuth(MailAuthEvent::DnsInvalidRecordType)),
            255 => Some(EventType::MailAuth(MailAuthEvent::PolicyNotAligned)),
            259 => Some(EventType::ManageSieve(ManageSieveEvent::ConnectionStart)),
            258 => Some(EventType::ManageSieve(ManageSieveEvent::ConnectionEnd)),
            260 => Some(EventType::ManageSieve(ManageSieveEvent::CreateScript)),
            274 => Some(EventType::ManageSieve(ManageSieveEvent::UpdateScript)),
            263 => Some(EventType::ManageSieve(ManageSieveEvent::GetScript)),
            261 => Some(EventType::ManageSieve(ManageSieveEvent::DeleteScript)),
            270 => Some(EventType::ManageSieve(ManageSieveEvent::RenameScript)),
            257 => Some(EventType::ManageSieve(ManageSieveEvent::CheckScript)),
            264 => Some(EventType::ManageSieve(ManageSieveEvent::HaveSpace)),
            265 => Some(EventType::ManageSieve(ManageSieveEvent::ListScripts)),
            271 => Some(EventType::ManageSieve(ManageSieveEvent::SetActive)),
            256 => Some(EventType::ManageSieve(ManageSieveEvent::Capabilities)),
            272 => Some(EventType::ManageSieve(ManageSieveEvent::StartTls)),
            273 => Some(EventType::ManageSieve(ManageSieveEvent::Unauthenticate)),
            266 => Some(EventType::ManageSieve(ManageSieveEvent::Logout)),
            267 => Some(EventType::ManageSieve(ManageSieveEvent::Noop)),
            262 => Some(EventType::ManageSieve(ManageSieveEvent::Error)),
            268 => Some(EventType::ManageSieve(ManageSieveEvent::RawInput)),
            269 => Some(EventType::ManageSieve(ManageSieveEvent::RawOutput)),
            283 => Some(EventType::MessageIngest(MessageIngestEvent::Ham)),
            286 => Some(EventType::MessageIngest(MessageIngestEvent::Spam)),
            284 => Some(EventType::MessageIngest(MessageIngestEvent::ImapAppend)),
            285 => Some(EventType::MessageIngest(MessageIngestEvent::JmapAppend)),
            281 => Some(EventType::MessageIngest(MessageIngestEvent::Duplicate)),
            282 => Some(EventType::MessageIngest(MessageIngestEvent::Error)),
            142 => Some(EventType::MessageIngest(MessageIngestEvent::SearchIndex)),
            299 => Some(EventType::Milter(MilterEvent::Read)),
            303 => Some(EventType::Milter(MilterEvent::Write)),
            287 => Some(EventType::Milter(MilterEvent::ActionAccept)),
            289 => Some(EventType::Milter(MilterEvent::ActionDiscard)),
            290 => Some(EventType::Milter(MilterEvent::ActionReject)),
            293 => Some(EventType::Milter(MilterEvent::ActionTempFail)),
            291 => Some(EventType::Milter(MilterEvent::ActionReplyCode)),
            288 => Some(EventType::Milter(MilterEvent::ActionConnectionFailure)),
            292 => Some(EventType::Milter(MilterEvent::ActionShutdown)),
            297 => Some(EventType::Milter(MilterEvent::IoError)),
            296 => Some(EventType::Milter(MilterEvent::FrameTooLarge)),
            295 => Some(EventType::Milter(MilterEvent::FrameInvalid)),
            302 => Some(EventType::Milter(MilterEvent::UnexpectedResponse)),
            300 => Some(EventType::Milter(MilterEvent::Timeout)),
            301 => Some(EventType::Milter(MilterEvent::TlsInvalidName)),
            294 => Some(EventType::Milter(MilterEvent::Disconnected)),
            298 => Some(EventType::Milter(MilterEvent::ParseError)),
            304 => Some(EventType::MtaHook(MtaHookEvent::ActionAccept)),
            305 => Some(EventType::MtaHook(MtaHookEvent::ActionDiscard)),
            307 => Some(EventType::MtaHook(MtaHookEvent::ActionReject)),
            306 => Some(EventType::MtaHook(MtaHookEvent::ActionQuarantine)),
            308 => Some(EventType::MtaHook(MtaHookEvent::Error)),
            309 => Some(EventType::MtaSts(MtaStsEvent::Authorized)),
            311 => Some(EventType::MtaSts(MtaStsEvent::NotAuthorized)),
            312 => Some(EventType::MtaSts(MtaStsEvent::PolicyFetch)),
            314 => Some(EventType::MtaSts(MtaStsEvent::PolicyNotFound)),
            313 => Some(EventType::MtaSts(MtaStsEvent::PolicyFetchError)),
            310 => Some(EventType::MtaSts(MtaStsEvent::InvalidPolicy)),
            321 => Some(EventType::Network(NetworkEvent::ListenStart)),
            322 => Some(EventType::Network(NetworkEvent::ListenStop)),
            320 => Some(EventType::Network(NetworkEvent::ListenError)),
            316 => Some(EventType::Network(NetworkEvent::BindError)),
            324 => Some(EventType::Network(NetworkEvent::ReadError)),
            328 => Some(EventType::Network(NetworkEvent::WriteError)),
            319 => Some(EventType::Network(NetworkEvent::FlushError)),
            315 => Some(EventType::Network(NetworkEvent::AcceptError)),
            326 => Some(EventType::Network(NetworkEvent::SplitError)),
            327 => Some(EventType::Network(NetworkEvent::Timeout)),
            317 => Some(EventType::Network(NetworkEvent::Closed)),
            323 => Some(EventType::Network(NetworkEvent::ProxyError)),
            325 => Some(EventType::Network(NetworkEvent::SetOptError)),
            342 => Some(EventType::OutgoingReport(OutgoingReportEvent::SpfReport)),
            341 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::SpfRateLimited,
            )),
            330 => Some(EventType::OutgoingReport(OutgoingReportEvent::DkimReport)),
            329 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::DkimRateLimited,
            )),
            333 => Some(EventType::OutgoingReport(OutgoingReportEvent::DmarcReport)),
            332 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::DmarcRateLimited,
            )),
            331 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::DmarcAggregateReport,
            )),
            344 => Some(EventType::OutgoingReport(OutgoingReportEvent::TlsAggregate)),
            334 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::HttpSubmission,
            )),
            345 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::UnauthorizedReportingAddress,
            )),
            340 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::ReportingAddressValidationError,
            )),
            339 => Some(EventType::OutgoingReport(OutgoingReportEvent::NotFound)),
            343 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::SubmissionError,
            )),
            338 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::NoRecipientsFound,
            )),
            337 => Some(EventType::OutgoingReport(OutgoingReportEvent::Locked)),
            59 => Some(EventType::OutgoingReport(
                OutgoingReportEvent::MaxSizeExceeded,
            )),
            348 => Some(EventType::Pop3(Pop3Event::ConnectionStart)),
            347 => Some(EventType::Pop3(Pop3Event::ConnectionEnd)),
            349 => Some(EventType::Pop3(Pop3Event::Delete)),
            358 => Some(EventType::Pop3(Pop3Event::Reset)),
            355 => Some(EventType::Pop3(Pop3Event::Quit)),
            351 => Some(EventType::Pop3(Pop3Event::Fetch)),
            352 => Some(EventType::Pop3(Pop3Event::List)),
            353 => Some(EventType::Pop3(Pop3Event::ListMessage)),
            361 => Some(EventType::Pop3(Pop3Event::Uidl)),
            362 => Some(EventType::Pop3(Pop3Event::UidlMessage)),
            360 => Some(EventType::Pop3(Pop3Event::Stat)),
            354 => Some(EventType::Pop3(Pop3Event::Noop)),
            346 => Some(EventType::Pop3(Pop3Event::Capabilities)),
            359 => Some(EventType::Pop3(Pop3Event::StartTls)),
            363 => Some(EventType::Pop3(Pop3Event::Utf8)),
            350 => Some(EventType::Pop3(Pop3Event::Error)),
            356 => Some(EventType::Pop3(Pop3Event::RawInput)),
            357 => Some(EventType::Pop3(Pop3Event::RawOutput)),
            373 => Some(EventType::PushSubscription(PushSubscriptionEvent::Success)),
            371 => Some(EventType::PushSubscription(PushSubscriptionEvent::Error)),
            372 => Some(EventType::PushSubscription(PushSubscriptionEvent::NotFound)),
            390 => Some(EventType::Queue(QueueEvent::Started)),
            380 => Some(EventType::Queue(QueueEvent::MessageQueued)),
            381 => Some(EventType::Queue(QueueEvent::AuthenticatedMessageQueued)),
            382 => Some(EventType::Queue(QueueEvent::ReportQueued)),
            379 => Some(EventType::Queue(QueueEvent::DsnQueued)),
            378 => Some(EventType::Queue(QueueEvent::AutogeneratedQueued)),
            385 => Some(EventType::Queue(QueueEvent::Rescheduled)),
            377 => Some(EventType::Queue(QueueEvent::Locked)),
            374 => Some(EventType::Queue(QueueEvent::BlobNotFound)),
            384 => Some(EventType::Queue(QueueEvent::RateLimitExceeded)),
            375 => Some(EventType::Queue(QueueEvent::ConcurrencyLimitExceeded)),
            383 => Some(EventType::Queue(QueueEvent::QuotaExceeded)),
            48 => Some(EventType::Queue(QueueEvent::BackPressure)),
            62 => Some(EventType::Registry(RegistryEvent::LocalReadError)),
            54 => Some(EventType::Registry(RegistryEvent::LocalWriteError)),
            60 => Some(EventType::Registry(RegistryEvent::LocalParseError)),
            65 => Some(EventType::Registry(RegistryEvent::ReadError)),
            58 => Some(EventType::Registry(RegistryEvent::WriteError)),
            56 => Some(EventType::Registry(RegistryEvent::DeserializationError)),
            61 => Some(EventType::Registry(RegistryEvent::BuildError)),
            55 => Some(EventType::Registry(RegistryEvent::BuildWarning)),
            64 => Some(EventType::Registry(RegistryEvent::NotSupported)),
            63 => Some(EventType::Registry(RegistryEvent::ValidationError)),
            389 => Some(EventType::Resource(ResourceEvent::NotFound)),
            386 => Some(EventType::Resource(ResourceEvent::BadParameters)),
            388 => Some(EventType::Resource(ResourceEvent::Error)),
            387 => Some(EventType::Resource(ResourceEvent::DownloadExternal)),
            601 => Some(EventType::Resource(ResourceEvent::ApplicationUpdated)),
            602 => Some(EventType::Resource(ResourceEvent::ApplicationUnpacked)),
            33 => Some(EventType::Security(SecurityEvent::AuthenticationBan)),
            549 => Some(EventType::Security(SecurityEvent::AbuseBan)),
            558 => Some(EventType::Security(SecurityEvent::ScanBan)),
            550 => Some(EventType::Security(SecurityEvent::LoiterBan)),
            318 => Some(EventType::Security(SecurityEvent::IpBlocked)),
            593 => Some(EventType::Security(SecurityEvent::IpBlockExpired)),
            594 => Some(EventType::Security(SecurityEvent::IpAllowExpired)),
            279 => Some(EventType::Security(SecurityEvent::IpUnauthorized)),
            552 => Some(EventType::Security(SecurityEvent::Unauthorized)),
            393 => Some(EventType::Server(ServerEvent::Startup)),
            392 => Some(EventType::Server(ServerEvent::Shutdown)),
            394 => Some(EventType::Server(ServerEvent::StartupError)),
            395 => Some(EventType::Server(ServerEvent::ThreadError)),
            391 => Some(EventType::Server(ServerEvent::Licensing)),
            603 => Some(EventType::Server(ServerEvent::RecoveryMode)),
            604 => Some(EventType::Server(ServerEvent::BootstrapMode)),
            396 => Some(EventType::Sieve(SieveEvent::ActionAccept)),
            397 => Some(EventType::Sieve(SieveEvent::ActionAcceptReplace)),
            398 => Some(EventType::Sieve(SieveEvent::ActionDiscard)),
            399 => Some(EventType::Sieve(SieveEvent::ActionReject)),
            406 => Some(EventType::Sieve(SieveEvent::SendMessage)),
            401 => Some(EventType::Sieve(SieveEvent::MessageTooLarge)),
            405 => Some(EventType::Sieve(SieveEvent::ScriptNotFound)),
            400 => Some(EventType::Sieve(SieveEvent::ListNotFound)),
            404 => Some(EventType::Sieve(SieveEvent::RuntimeError)),
            407 => Some(EventType::Sieve(SieveEvent::UnexpectedError)),
            402 => Some(EventType::Sieve(SieveEvent::NotSupported)),
            403 => Some(EventType::Sieve(SieveEvent::QuotaExceeded)),
            417 => Some(EventType::Smtp(SmtpEvent::ConnectionStart)),
            416 => Some(EventType::Smtp(SmtpEvent::ConnectionEnd)),
            428 => Some(EventType::Smtp(SmtpEvent::Error)),
            469 => Some(EventType::Smtp(SmtpEvent::IdNotFound)),
            415 => Some(EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded)),
            485 => Some(EventType::Smtp(SmtpEvent::TransferLimitExceeded)),
            461 => Some(EventType::Smtp(SmtpEvent::RateLimitExceeded)),
            481 => Some(EventType::Smtp(SmtpEvent::TimeLimitExceeded)),
            452 => Some(EventType::Smtp(SmtpEvent::MissingAuthDirectory)),
            450 => Some(EventType::Smtp(SmtpEvent::MessageParseFailed)),
            451 => Some(EventType::Smtp(SmtpEvent::MessageTooLarge)),
            443 => Some(EventType::Smtp(SmtpEvent::LoopDetected)),
            422 => Some(EventType::Smtp(SmtpEvent::DkimPass)),
            421 => Some(EventType::Smtp(SmtpEvent::DkimFail)),
            410 => Some(EventType::Smtp(SmtpEvent::ArcPass)),
            409 => Some(EventType::Smtp(SmtpEvent::ArcFail)),
            474 => Some(EventType::Smtp(SmtpEvent::SpfEhloPass)),
            473 => Some(EventType::Smtp(SmtpEvent::SpfEhloFail)),
            476 => Some(EventType::Smtp(SmtpEvent::SpfFromPass)),
            475 => Some(EventType::Smtp(SmtpEvent::SpfFromFail)),
            424 => Some(EventType::Smtp(SmtpEvent::DmarcPass)),
            423 => Some(EventType::Smtp(SmtpEvent::DmarcFail)),
            441 => Some(EventType::Smtp(SmtpEvent::IprevPass)),
            440 => Some(EventType::Smtp(SmtpEvent::IprevFail)),
            483 => Some(EventType::Smtp(SmtpEvent::TooManyMessages)),
            426 => Some(EventType::Smtp(SmtpEvent::Ehlo)),
            436 => Some(EventType::Smtp(SmtpEvent::InvalidEhlo)),
            420 => Some(EventType::Smtp(SmtpEvent::DidNotSayEhlo)),
            427 => Some(EventType::Smtp(SmtpEvent::EhloExpected)),
            442 => Some(EventType::Smtp(SmtpEvent::LhloExpected)),
            447 => Some(EventType::Smtp(SmtpEvent::MailFromUnauthenticated)),
            448 => Some(EventType::Smtp(SmtpEvent::MailFromUnauthorized)),
            551 => Some(EventType::Smtp(SmtpEvent::MailFromNotAllowed)),
            446 => Some(EventType::Smtp(SmtpEvent::MailFromRewritten)),
            445 => Some(EventType::Smtp(SmtpEvent::MailFromMissing)),
            444 => Some(EventType::Smtp(SmtpEvent::MailFrom)),
            456 => Some(EventType::Smtp(SmtpEvent::MultipleMailFrom)),
            449 => Some(EventType::Smtp(SmtpEvent::MailboxDoesNotExist)),
            468 => Some(EventType::Smtp(SmtpEvent::RelayNotAllowed)),
            464 => Some(EventType::Smtp(SmtpEvent::RcptTo)),
            465 => Some(EventType::Smtp(SmtpEvent::RcptToDuplicate)),
            467 => Some(EventType::Smtp(SmtpEvent::RcptToRewritten)),
            466 => Some(EventType::Smtp(SmtpEvent::RcptToMissing)),
            561 => Some(EventType::Smtp(SmtpEvent::RcptToGreylisted)),
            484 => Some(EventType::Smtp(SmtpEvent::TooManyRecipients)),
            482 => Some(EventType::Smtp(SmtpEvent::TooManyInvalidRcpt)),
            462 => Some(EventType::Smtp(SmtpEvent::RawInput)),
            463 => Some(EventType::Smtp(SmtpEvent::RawOutput)),
            453 => Some(EventType::Smtp(SmtpEvent::MissingLocalHostname)),
            487 => Some(EventType::Smtp(SmtpEvent::Vrfy)),
            489 => Some(EventType::Smtp(SmtpEvent::VrfyNotFound)),
            488 => Some(EventType::Smtp(SmtpEvent::VrfyDisabled)),
            429 => Some(EventType::Smtp(SmtpEvent::Expn)),
            431 => Some(EventType::Smtp(SmtpEvent::ExpnNotFound)),
            430 => Some(EventType::Smtp(SmtpEvent::ExpnDisabled)),
            471 => Some(EventType::Smtp(SmtpEvent::RequireTlsDisabled)),
            418 => Some(EventType::Smtp(SmtpEvent::DeliverByDisabled)),
            419 => Some(EventType::Smtp(SmtpEvent::DeliverByInvalid)),
            432 => Some(EventType::Smtp(SmtpEvent::FutureReleaseDisabled)),
            433 => Some(EventType::Smtp(SmtpEvent::FutureReleaseInvalid)),
            454 => Some(EventType::Smtp(SmtpEvent::MtPriorityDisabled)),
            455 => Some(EventType::Smtp(SmtpEvent::MtPriorityInvalid)),
            425 => Some(EventType::Smtp(SmtpEvent::DsnDisabled)),
            413 => Some(EventType::Smtp(SmtpEvent::AuthNotAllowed)),
            412 => Some(EventType::Smtp(SmtpEvent::AuthMechanismNotSupported)),
            411 => Some(EventType::Smtp(SmtpEvent::AuthExchangeTooLong)),
            408 => Some(EventType::Smtp(SmtpEvent::AlreadyAuthenticated)),
            457 => Some(EventType::Smtp(SmtpEvent::Noop)),
            477 => Some(EventType::Smtp(SmtpEvent::StartTls)),
            479 => Some(EventType::Smtp(SmtpEvent::StartTlsUnavailable)),
            478 => Some(EventType::Smtp(SmtpEvent::StartTlsAlready)),
            472 => Some(EventType::Smtp(SmtpEvent::Rset)),
            460 => Some(EventType::Smtp(SmtpEvent::Quit)),
            434 => Some(EventType::Smtp(SmtpEvent::Help)),
            414 => Some(EventType::Smtp(SmtpEvent::CommandNotImplemented)),
            435 => Some(EventType::Smtp(SmtpEvent::InvalidCommand)),
            439 => Some(EventType::Smtp(SmtpEvent::InvalidSenderAddress)),
            438 => Some(EventType::Smtp(SmtpEvent::InvalidRecipientAddress)),
            437 => Some(EventType::Smtp(SmtpEvent::InvalidParameter)),
            486 => Some(EventType::Smtp(SmtpEvent::UnsupportedParameter)),
            480 => Some(EventType::Smtp(SmtpEvent::SyntaxError)),
            470 => Some(EventType::Smtp(SmtpEvent::RequestTooLarge)),
            564 => Some(EventType::Spam(SpamEvent::Pyzor)),
            494 => Some(EventType::Spam(SpamEvent::PyzorError)),
            562 => Some(EventType::Spam(SpamEvent::Dnsbl)),
            563 => Some(EventType::Spam(SpamEvent::DnsblError)),
            588 => Some(EventType::Spam(SpamEvent::TrainStarted)),
            495 => Some(EventType::Spam(SpamEvent::TrainCompleted)),
            143 => Some(EventType::Spam(SpamEvent::TrainSampleAdded)),
            491 => Some(EventType::Spam(SpamEvent::TrainSampleNotFound)),
            490 => Some(EventType::Spam(SpamEvent::Classify)),
            589 => Some(EventType::Spam(SpamEvent::ModelLoaded)),
            496 => Some(EventType::Spam(SpamEvent::ModelNotReady)),
            497 => Some(EventType::Spam(SpamEvent::ModelNotFound)),
            280 => Some(EventType::Spam(SpamEvent::RulesUpdated)),
            501 => Some(EventType::Spf(SpfEvent::Pass)),
            498 => Some(EventType::Spf(SpfEvent::Fail)),
            503 => Some(EventType::Spf(SpfEvent::SoftFail)),
            499 => Some(EventType::Spf(SpfEvent::Neutral)),
            504 => Some(EventType::Spf(SpfEvent::TempError)),
            502 => Some(EventType::Spf(SpfEvent::PermError)),
            500 => Some(EventType::Spf(SpfEvent::None)),
            505 => Some(EventType::Store(StoreEvent::AssertValueFailed)),
            518 => Some(EventType::Store(StoreEvent::FoundationdbError)),
            522 => Some(EventType::Store(StoreEvent::MysqlError)),
            527 => Some(EventType::Store(StoreEvent::PostgresqlError)),
            529 => Some(EventType::Store(StoreEvent::RocksdbError)),
            532 => Some(EventType::Store(StoreEvent::SqliteError)),
            520 => Some(EventType::Store(StoreEvent::LdapError)),
            516 => Some(EventType::Store(StoreEvent::ElasticsearchError)),
            590 => Some(EventType::Store(StoreEvent::MeilisearchError)),
            528 => Some(EventType::Store(StoreEvent::RedisError)),
            530 => Some(EventType::Store(StoreEvent::S3Error)),
            559 => Some(EventType::Store(StoreEvent::AzureError)),
            517 => Some(EventType::Store(StoreEvent::FilesystemError)),
            526 => Some(EventType::Store(StoreEvent::PoolError)),
            511 => Some(EventType::Store(StoreEvent::DataCorruption)),
            514 => Some(EventType::Store(StoreEvent::DecompressError)),
            515 => Some(EventType::Store(StoreEvent::DeserializeError)),
            524 => Some(EventType::Store(StoreEvent::NotFound)),
            523 => Some(EventType::Store(StoreEvent::NotConfigured)),
            525 => Some(EventType::Store(StoreEvent::NotSupported)),
            533 => Some(EventType::Store(StoreEvent::UnexpectedError)),
            510 => Some(EventType::Store(StoreEvent::CryptoError)),
            493 => Some(EventType::Store(StoreEvent::HttpStoreError)),
            50 => Some(EventType::Store(StoreEvent::CacheMiss)),
            51 => Some(EventType::Store(StoreEvent::CacheHit)),
            52 => Some(EventType::Store(StoreEvent::CacheStale)),
            577 => Some(EventType::Store(StoreEvent::CacheUpdate)),
            507 => Some(EventType::Store(StoreEvent::BlobMissingMarker)),
            513 => Some(EventType::Store(StoreEvent::DataWrite)),
            512 => Some(EventType::Store(StoreEvent::DataIterate)),
            508 => Some(EventType::Store(StoreEvent::BlobRead)),
            509 => Some(EventType::Store(StoreEvent::BlobWrite)),
            506 => Some(EventType::Store(StoreEvent::BlobDelete)),
            531 => Some(EventType::Store(StoreEvent::SqlQuery)),
            521 => Some(EventType::Store(StoreEvent::LdapQuery)),
            519 => Some(EventType::Store(StoreEvent::LdapWarning)),
            492 => Some(EventType::Store(StoreEvent::HttpStoreFetch)),
            364 => Some(EventType::Store(StoreEvent::AutoExpunge)),
            369 => Some(EventType::Store(StoreEvent::BlobStorePurged)),
            368 => Some(EventType::Store(StoreEvent::DataStorePurged)),
            578 => Some(EventType::TaskManager(TaskManagerEvent::TaskAcquired)),
            149 => Some(EventType::TaskManager(TaskManagerEvent::TaskQueued)),
            370 => Some(EventType::TaskManager(TaskManagerEvent::TaskScheduled)),
            144 => Some(EventType::TaskManager(TaskManagerEvent::TaskLocked)),
            586 => Some(EventType::TaskManager(TaskManagerEvent::TaskIgnored)),
            587 => Some(EventType::TaskManager(TaskManagerEvent::TaskFailed)),
            53 => Some(EventType::TaskManager(TaskManagerEvent::TaskRetry)),
            141 => Some(EventType::TaskManager(TaskManagerEvent::BlobNotFound)),
            145 => Some(EventType::TaskManager(TaskManagerEvent::MetadataNotFound)),
            150 => Some(EventType::TaskManager(TaskManagerEvent::SchedulerStarted)),
            367 => Some(EventType::TaskManager(TaskManagerEvent::ManagerStarted)),
            548 => Some(EventType::Telemetry(TelemetryEvent::AlertEvent)),
            365 => Some(EventType::Telemetry(TelemetryEvent::AlertMessage)),
            535 => Some(EventType::Telemetry(TelemetryEvent::LogError)),
            539 => Some(EventType::Telemetry(TelemetryEvent::WebhookError)),
            536 => Some(EventType::Telemetry(TelemetryEvent::OtelExporterError)),
            537 => Some(EventType::Telemetry(
                TelemetryEvent::OtelMetricsExporterError,
            )),
            538 => Some(EventType::Telemetry(
                TelemetryEvent::PrometheusExporterError,
            )),
            534 => Some(EventType::Telemetry(TelemetryEvent::JournalError)),
            151 => Some(EventType::Telemetry(TelemetryEvent::MetricsCollected)),
            366 => Some(EventType::Telemetry(TelemetryEvent::MetricsStored)),
            146 => Some(EventType::Telemetry(TelemetryEvent::MetricsPushed)),
            543 => Some(EventType::Tls(TlsEvent::Handshake)),
            544 => Some(EventType::Tls(TlsEvent::HandshakeError)),
            547 => Some(EventType::Tls(TlsEvent::NotConfigured)),
            542 => Some(EventType::Tls(TlsEvent::CertificateNotFound)),
            546 => Some(EventType::Tls(TlsEvent::NoCertificatesAvailable)),
            545 => Some(EventType::Tls(TlsEvent::MultipleCertificatesAvailable)),
            277 => Some(EventType::Tls(TlsEvent::ExpiredCertificateRemoved)),
            540 => Some(EventType::TlsRpt(TlsRptEvent::RecordFetch)),
            541 => Some(EventType::TlsRpt(TlsRptEvent::RecordFetchError)),
            560 => Some(EventType::TlsRpt(TlsRptEvent::RecordNotFound)),
            147 => Some(EventType::WebDav(WebDavEvent::Propfind)),
            148 => Some(EventType::WebDav(WebDavEvent::Proppatch)),
            335 => Some(EventType::WebDav(WebDavEvent::Get)),
            574 => Some(EventType::WebDav(WebDavEvent::Head)),
            336 => Some(EventType::WebDav(WebDavEvent::Report)),
            376 => Some(EventType::WebDav(WebDavEvent::Mkcol)),
            575 => Some(EventType::WebDav(WebDavEvent::Mkcalendar)),
            458 => Some(EventType::WebDav(WebDavEvent::Delete)),
            459 => Some(EventType::WebDav(WebDavEvent::Put)),
            565 => Some(EventType::WebDav(WebDavEvent::Post)),
            566 => Some(EventType::WebDav(WebDavEvent::Patch)),
            567 => Some(EventType::WebDav(WebDavEvent::Copy)),
            568 => Some(EventType::WebDav(WebDavEvent::Move)),
            569 => Some(EventType::WebDav(WebDavEvent::Lock)),
            570 => Some(EventType::WebDav(WebDavEvent::Unlock)),
            571 => Some(EventType::WebDav(WebDavEvent::Acl)),
            573 => Some(EventType::WebDav(WebDavEvent::Options)),
            572 => Some(EventType::WebDav(WebDavEvent::Error)),
            _ => None,
        }
    }

    pub fn level(&self) -> Level {
        match self {
            EventType::Acme(AcmeEvent::Error) => Level::Error,
            EventType::Auth(AuthEvent::Error) => Level::Error,
            EventType::Cluster(ClusterEvent::SubscriberError) => Level::Error,
            EventType::Cluster(ClusterEvent::PublisherError) => Level::Error,
            EventType::Cluster(ClusterEvent::MessageInvalid) => Level::Error,
            EventType::Dkim(DkimEvent::BuildError) => Level::Error,
            EventType::Dns(DnsEvent::BuildError) => Level::Error,
            EventType::MessageIngest(MessageIngestEvent::Error) => Level::Error,
            EventType::Network(NetworkEvent::ListenError) => Level::Error,
            EventType::Network(NetworkEvent::BindError) => Level::Error,
            EventType::Network(NetworkEvent::SplitError) => Level::Error,
            EventType::Network(NetworkEvent::SetOptError) => Level::Error,
            EventType::Registry(RegistryEvent::LocalReadError) => Level::Error,
            EventType::Registry(RegistryEvent::LocalWriteError) => Level::Error,
            EventType::Registry(RegistryEvent::LocalParseError) => Level::Error,
            EventType::Registry(RegistryEvent::ReadError) => Level::Error,
            EventType::Registry(RegistryEvent::WriteError) => Level::Error,
            EventType::Registry(RegistryEvent::DeserializationError) => Level::Error,
            EventType::Registry(RegistryEvent::BuildError) => Level::Error,
            EventType::Registry(RegistryEvent::ValidationError) => Level::Error,
            EventType::Resource(ResourceEvent::BadParameters) => Level::Error,
            EventType::Resource(ResourceEvent::Error) => Level::Error,
            EventType::Server(ServerEvent::StartupError) => Level::Error,
            EventType::Server(ServerEvent::ThreadError) => Level::Error,
            EventType::Sieve(SieveEvent::UnexpectedError) => Level::Error,
            EventType::Store(StoreEvent::AssertValueFailed) => Level::Error,
            EventType::Store(StoreEvent::FoundationdbError) => Level::Error,
            EventType::Store(StoreEvent::MysqlError) => Level::Error,
            EventType::Store(StoreEvent::PostgresqlError) => Level::Error,
            EventType::Store(StoreEvent::RocksdbError) => Level::Error,
            EventType::Store(StoreEvent::SqliteError) => Level::Error,
            EventType::Store(StoreEvent::LdapError) => Level::Error,
            EventType::Store(StoreEvent::ElasticsearchError) => Level::Error,
            EventType::Store(StoreEvent::MeilisearchError) => Level::Error,
            EventType::Store(StoreEvent::RedisError) => Level::Error,
            EventType::Store(StoreEvent::S3Error) => Level::Error,
            EventType::Store(StoreEvent::AzureError) => Level::Error,
            EventType::Store(StoreEvent::FilesystemError) => Level::Error,
            EventType::Store(StoreEvent::PoolError) => Level::Error,
            EventType::Store(StoreEvent::DataCorruption) => Level::Error,
            EventType::Store(StoreEvent::DecompressError) => Level::Error,
            EventType::Store(StoreEvent::DeserializeError) => Level::Error,
            EventType::Store(StoreEvent::NotConfigured) => Level::Error,
            EventType::Store(StoreEvent::NotSupported) => Level::Error,
            EventType::Store(StoreEvent::UnexpectedError) => Level::Error,
            EventType::Store(StoreEvent::CryptoError) => Level::Error,
            EventType::Tls(TlsEvent::NotConfigured) => Level::Error,
            EventType::Acme(AcmeEvent::AuthStart) => Level::Info,
            EventType::Acme(AcmeEvent::AuthPending) => Level::Info,
            EventType::Acme(AcmeEvent::AuthValid) => Level::Info,
            EventType::Acme(AcmeEvent::AuthCompleted) => Level::Info,
            EventType::Acme(AcmeEvent::ProcessCert) => Level::Info,
            EventType::Acme(AcmeEvent::OrderStart) => Level::Info,
            EventType::Acme(AcmeEvent::OrderProcessing) => Level::Info,
            EventType::Acme(AcmeEvent::OrderCompleted) => Level::Info,
            EventType::Acme(AcmeEvent::OrderReady) => Level::Info,
            EventType::Acme(AcmeEvent::OrderValid) => Level::Info,
            EventType::Acme(AcmeEvent::TlsAlpnReceived) => Level::Info,
            EventType::Auth(AuthEvent::Success) => Level::Info,
            EventType::Auth(AuthEvent::ClientRegistration) => Level::Info,
            EventType::Calendar(CalendarEvent::AlarmSent) => Level::Info,
            EventType::Calendar(CalendarEvent::ItipMessageSent) => Level::Info,
            EventType::Calendar(CalendarEvent::ItipMessageReceived) => Level::Info,
            EventType::Cluster(ClusterEvent::Startup) => Level::Info,
            EventType::Cluster(ClusterEvent::SubscriberStart) => Level::Info,
            EventType::Cluster(ClusterEvent::SubscriberStop) => Level::Info,
            EventType::Cluster(ClusterEvent::PublisherStart) => Level::Info,
            EventType::Cluster(ClusterEvent::PublisherStop) => Level::Info,
            EventType::Dane(DaneEvent::AuthenticationSuccess) => Level::Info,
            EventType::Dane(DaneEvent::AuthenticationFailure) => Level::Info,
            EventType::Dane(DaneEvent::NoCertificatesFound) => Level::Info,
            EventType::Dane(DaneEvent::CertificateParseError) => Level::Info,
            EventType::Dane(DaneEvent::TlsaRecordMatch) => Level::Info,
            EventType::Dane(DaneEvent::TlsaRecordFetch) => Level::Info,
            EventType::Dane(DaneEvent::TlsaRecordFetchError) => Level::Info,
            EventType::Dane(DaneEvent::TlsaRecordNotFound) => Level::Info,
            EventType::Dane(DaneEvent::TlsaRecordNotDnssecSigned) => Level::Info,
            EventType::Dane(DaneEvent::TlsaRecordInvalid) => Level::Info,
            EventType::Delivery(DeliveryEvent::AttemptStart) => Level::Info,
            EventType::Delivery(DeliveryEvent::AttemptEnd) => Level::Info,
            EventType::Delivery(DeliveryEvent::Completed) => Level::Info,
            EventType::Delivery(DeliveryEvent::Failed) => Level::Info,
            EventType::Delivery(DeliveryEvent::DomainDeliveryStart) => Level::Info,
            EventType::Delivery(DeliveryEvent::MxLookupFailed) => Level::Info,
            EventType::Delivery(DeliveryEvent::IpLookupFailed) => Level::Info,
            EventType::Delivery(DeliveryEvent::NullMx) => Level::Info,
            EventType::Delivery(DeliveryEvent::Connect) => Level::Info,
            EventType::Delivery(DeliveryEvent::ConnectError) => Level::Info,
            EventType::Delivery(DeliveryEvent::GreetingFailed) => Level::Info,
            EventType::Delivery(DeliveryEvent::EhloRejected) => Level::Info,
            EventType::Delivery(DeliveryEvent::AuthFailed) => Level::Info,
            EventType::Delivery(DeliveryEvent::MailFromRejected) => Level::Info,
            EventType::Delivery(DeliveryEvent::Delivered) => Level::Info,
            EventType::Delivery(DeliveryEvent::RcptToRejected) => Level::Info,
            EventType::Delivery(DeliveryEvent::RcptToFailed) => Level::Info,
            EventType::Delivery(DeliveryEvent::MessageRejected) => Level::Info,
            EventType::Delivery(DeliveryEvent::StartTls) => Level::Info,
            EventType::Delivery(DeliveryEvent::StartTlsUnavailable) => Level::Info,
            EventType::Delivery(DeliveryEvent::StartTlsError) => Level::Info,
            EventType::Delivery(DeliveryEvent::StartTlsDisabled) => Level::Info,
            EventType::Delivery(DeliveryEvent::ImplicitTlsError) => Level::Info,
            EventType::Delivery(DeliveryEvent::DoubleBounce) => Level::Info,
            EventType::Delivery(DeliveryEvent::DsnSuccess) => Level::Info,
            EventType::Delivery(DeliveryEvent::DsnTempFail) => Level::Info,
            EventType::Delivery(DeliveryEvent::DsnPermFail) => Level::Info,
            EventType::Dkim(DkimEvent::SignatureCreated) => Level::Info,
            EventType::Dkim(DkimEvent::SignaturePublished) => Level::Info,
            EventType::Dkim(DkimEvent::SignatureRetiring) => Level::Info,
            EventType::Dkim(DkimEvent::SignatureRetired) => Level::Info,
            EventType::Dkim(DkimEvent::SignatureDeleted) => Level::Info,
            EventType::Dns(DnsEvent::RecordCreated) => Level::Info,
            EventType::Dns(DnsEvent::RecordPropagated) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::DmarcReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::TlsReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::AbuseReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::AuthFailureReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::FraudReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::NotSpamReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::VirusReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::OtherReport) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::MessageParseFailed) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::DmarcParseFailed) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::TlsRpcParseFailed) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::ArfParseFailed) => Level::Info,
            EventType::IncomingReport(IncomingReportEvent::DecompressError) => Level::Info,
            EventType::Limit(LimitEvent::TenantQuota) => Level::Info,
            EventType::MessageIngest(MessageIngestEvent::Ham) => Level::Info,
            EventType::MessageIngest(MessageIngestEvent::Spam) => Level::Info,
            EventType::MessageIngest(MessageIngestEvent::ImapAppend) => Level::Info,
            EventType::MessageIngest(MessageIngestEvent::JmapAppend) => Level::Info,
            EventType::MessageIngest(MessageIngestEvent::Duplicate) => Level::Info,
            EventType::MessageIngest(MessageIngestEvent::SearchIndex) => Level::Info,
            EventType::Milter(MilterEvent::ActionAccept) => Level::Info,
            EventType::Milter(MilterEvent::ActionDiscard) => Level::Info,
            EventType::Milter(MilterEvent::ActionReject) => Level::Info,
            EventType::Milter(MilterEvent::ActionTempFail) => Level::Info,
            EventType::Milter(MilterEvent::ActionReplyCode) => Level::Info,
            EventType::Milter(MilterEvent::ActionConnectionFailure) => Level::Info,
            EventType::Milter(MilterEvent::ActionShutdown) => Level::Info,
            EventType::MtaHook(MtaHookEvent::ActionAccept) => Level::Info,
            EventType::MtaHook(MtaHookEvent::ActionDiscard) => Level::Info,
            EventType::MtaHook(MtaHookEvent::ActionReject) => Level::Info,
            EventType::MtaHook(MtaHookEvent::ActionQuarantine) => Level::Info,
            EventType::MtaSts(MtaStsEvent::Authorized) => Level::Info,
            EventType::MtaSts(MtaStsEvent::NotAuthorized) => Level::Info,
            EventType::MtaSts(MtaStsEvent::PolicyFetch) => Level::Info,
            EventType::MtaSts(MtaStsEvent::PolicyNotFound) => Level::Info,
            EventType::MtaSts(MtaStsEvent::PolicyFetchError) => Level::Info,
            EventType::MtaSts(MtaStsEvent::InvalidPolicy) => Level::Info,
            EventType::Network(NetworkEvent::ListenStart) => Level::Info,
            EventType::Network(NetworkEvent::ListenStop) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::SpfReport) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::SpfRateLimited) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::DkimReport) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::DkimRateLimited) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::DmarcReport) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::DmarcRateLimited) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::DmarcAggregateReport) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::TlsAggregate) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::HttpSubmission) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::UnauthorizedReportingAddress) => {
                Level::Info
            }
            EventType::OutgoingReport(OutgoingReportEvent::ReportingAddressValidationError) => {
                Level::Info
            }
            EventType::OutgoingReport(OutgoingReportEvent::NotFound) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::SubmissionError) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::NoRecipientsFound) => Level::Info,
            EventType::OutgoingReport(OutgoingReportEvent::Locked) => Level::Info,
            EventType::Queue(QueueEvent::Started) => Level::Info,
            EventType::Queue(QueueEvent::MessageQueued) => Level::Info,
            EventType::Queue(QueueEvent::AuthenticatedMessageQueued) => Level::Info,
            EventType::Queue(QueueEvent::ReportQueued) => Level::Info,
            EventType::Queue(QueueEvent::DsnQueued) => Level::Info,
            EventType::Queue(QueueEvent::AutogeneratedQueued) => Level::Info,
            EventType::Queue(QueueEvent::Rescheduled) => Level::Info,
            EventType::Queue(QueueEvent::RateLimitExceeded) => Level::Info,
            EventType::Queue(QueueEvent::ConcurrencyLimitExceeded) => Level::Info,
            EventType::Queue(QueueEvent::QuotaExceeded) => Level::Info,
            EventType::Resource(ResourceEvent::DownloadExternal) => Level::Info,
            EventType::Resource(ResourceEvent::ApplicationUpdated) => Level::Info,
            EventType::Security(SecurityEvent::AuthenticationBan) => Level::Info,
            EventType::Security(SecurityEvent::AbuseBan) => Level::Info,
            EventType::Security(SecurityEvent::ScanBan) => Level::Info,
            EventType::Security(SecurityEvent::LoiterBan) => Level::Info,
            EventType::Security(SecurityEvent::IpBlocked) => Level::Info,
            EventType::Security(SecurityEvent::IpBlockExpired) => Level::Info,
            EventType::Security(SecurityEvent::IpAllowExpired) => Level::Info,
            EventType::Security(SecurityEvent::IpUnauthorized) => Level::Info,
            EventType::Security(SecurityEvent::Unauthorized) => Level::Info,
            EventType::Server(ServerEvent::Startup) => Level::Info,
            EventType::Server(ServerEvent::Shutdown) => Level::Info,
            EventType::Server(ServerEvent::Licensing) => Level::Info,
            EventType::Sieve(SieveEvent::SendMessage) => Level::Info,
            EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded) => Level::Info,
            EventType::Smtp(SmtpEvent::TransferLimitExceeded) => Level::Info,
            EventType::Smtp(SmtpEvent::RateLimitExceeded) => Level::Info,
            EventType::Smtp(SmtpEvent::TimeLimitExceeded) => Level::Info,
            EventType::Smtp(SmtpEvent::MissingAuthDirectory) => Level::Info,
            EventType::Smtp(SmtpEvent::MessageParseFailed) => Level::Info,
            EventType::Smtp(SmtpEvent::MessageTooLarge) => Level::Info,
            EventType::Smtp(SmtpEvent::LoopDetected) => Level::Info,
            EventType::Smtp(SmtpEvent::DkimPass) => Level::Info,
            EventType::Smtp(SmtpEvent::DkimFail) => Level::Info,
            EventType::Smtp(SmtpEvent::ArcPass) => Level::Info,
            EventType::Smtp(SmtpEvent::ArcFail) => Level::Info,
            EventType::Smtp(SmtpEvent::SpfEhloPass) => Level::Info,
            EventType::Smtp(SmtpEvent::SpfEhloFail) => Level::Info,
            EventType::Smtp(SmtpEvent::SpfFromPass) => Level::Info,
            EventType::Smtp(SmtpEvent::SpfFromFail) => Level::Info,
            EventType::Smtp(SmtpEvent::DmarcPass) => Level::Info,
            EventType::Smtp(SmtpEvent::DmarcFail) => Level::Info,
            EventType::Smtp(SmtpEvent::IprevPass) => Level::Info,
            EventType::Smtp(SmtpEvent::IprevFail) => Level::Info,
            EventType::Smtp(SmtpEvent::TooManyMessages) => Level::Info,
            EventType::Smtp(SmtpEvent::Ehlo) => Level::Info,
            EventType::Smtp(SmtpEvent::InvalidEhlo) => Level::Info,
            EventType::Smtp(SmtpEvent::MailFrom) => Level::Info,
            EventType::Smtp(SmtpEvent::MailboxDoesNotExist) => Level::Info,
            EventType::Smtp(SmtpEvent::RelayNotAllowed) => Level::Info,
            EventType::Smtp(SmtpEvent::RcptTo) => Level::Info,
            EventType::Smtp(SmtpEvent::RcptToGreylisted) => Level::Info,
            EventType::Smtp(SmtpEvent::TooManyRecipients) => Level::Info,
            EventType::Smtp(SmtpEvent::TooManyInvalidRcpt) => Level::Info,
            EventType::Smtp(SmtpEvent::Vrfy) => Level::Info,
            EventType::Smtp(SmtpEvent::VrfyNotFound) => Level::Info,
            EventType::Smtp(SmtpEvent::VrfyDisabled) => Level::Info,
            EventType::Smtp(SmtpEvent::Expn) => Level::Info,
            EventType::Smtp(SmtpEvent::ExpnNotFound) => Level::Info,
            EventType::Smtp(SmtpEvent::ExpnDisabled) => Level::Info,
            EventType::Smtp(SmtpEvent::AuthNotAllowed) => Level::Info,
            EventType::Smtp(SmtpEvent::AuthMechanismNotSupported) => Level::Info,
            EventType::Smtp(SmtpEvent::RequestTooLarge) => Level::Info,
            EventType::Spam(SpamEvent::TrainStarted) => Level::Info,
            EventType::Spam(SpamEvent::TrainCompleted) => Level::Info,
            EventType::Spam(SpamEvent::ModelLoaded) => Level::Info,
            EventType::Spam(SpamEvent::ModelNotReady) => Level::Info,
            EventType::Spam(SpamEvent::ModelNotFound) => Level::Info,
            EventType::Spam(SpamEvent::RulesUpdated) => Level::Info,
            EventType::Store(StoreEvent::BlobStorePurged) => Level::Info,
            EventType::Store(StoreEvent::DataStorePurged) => Level::Info,
            EventType::TaskManager(TaskManagerEvent::TaskQueued) => Level::Info,
            EventType::TaskManager(TaskManagerEvent::TaskScheduled) => Level::Info,
            EventType::TaskManager(TaskManagerEvent::SchedulerStarted) => Level::Info,
            EventType::TaskManager(TaskManagerEvent::ManagerStarted) => Level::Info,
            EventType::Telemetry(TelemetryEvent::AlertMessage) => Level::Info,
            EventType::Telemetry(TelemetryEvent::MetricsCollected) => Level::Info,
            EventType::Tls(TlsEvent::Handshake) => Level::Info,
            EventType::Tls(TlsEvent::ExpiredCertificateRemoved) => Level::Info,
            EventType::TlsRpt(TlsRptEvent::RecordFetch) => Level::Info,
            EventType::TlsRpt(TlsRptEvent::RecordFetchError) => Level::Info,
            EventType::TlsRpt(TlsRptEvent::RecordNotFound) => Level::Info,
            EventType::Ai(AiEvent::LlmResponse) => Level::Trace,
            EventType::Auth(AuthEvent::MfaRequired) => Level::Trace,
            EventType::Cluster(ClusterEvent::MessageReceived) => Level::Trace,
            EventType::Cluster(ClusterEvent::MessageSkipped) => Level::Trace,
            EventType::Delivery(DeliveryEvent::RawInput) => Level::Trace,
            EventType::Delivery(DeliveryEvent::RawOutput) => Level::Trace,
            EventType::Eval(EvalEvent::Result) => Level::Trace,
            EventType::Http(HttpEvent::RequestBody) => Level::Trace,
            EventType::Http(HttpEvent::ResponseBody) => Level::Trace,
            EventType::Imap(ImapEvent::RawInput) => Level::Trace,
            EventType::Imap(ImapEvent::RawOutput) => Level::Trace,
            EventType::ManageSieve(ManageSieveEvent::RawInput) => Level::Trace,
            EventType::ManageSieve(ManageSieveEvent::RawOutput) => Level::Trace,
            EventType::Milter(MilterEvent::Read) => Level::Trace,
            EventType::Milter(MilterEvent::Write) => Level::Trace,
            EventType::Network(NetworkEvent::ReadError) => Level::Trace,
            EventType::Network(NetworkEvent::WriteError) => Level::Trace,
            EventType::Network(NetworkEvent::FlushError) => Level::Trace,
            EventType::Network(NetworkEvent::Closed) => Level::Trace,
            EventType::Pop3(Pop3Event::RawInput) => Level::Trace,
            EventType::Pop3(Pop3Event::RawOutput) => Level::Trace,
            EventType::PushSubscription(PushSubscriptionEvent::Success) => Level::Trace,
            EventType::Smtp(SmtpEvent::RawInput) => Level::Trace,
            EventType::Smtp(SmtpEvent::RawOutput) => Level::Trace,
            EventType::Store(StoreEvent::DataWrite) => Level::Trace,
            EventType::Store(StoreEvent::DataIterate) => Level::Trace,
            EventType::Store(StoreEvent::BlobRead) => Level::Trace,
            EventType::Store(StoreEvent::BlobWrite) => Level::Trace,
            EventType::Store(StoreEvent::BlobDelete) => Level::Trace,
            EventType::Store(StoreEvent::SqlQuery) => Level::Trace,
            EventType::Store(StoreEvent::LdapQuery) => Level::Trace,
            EventType::Acme(AcmeEvent::AuthError) => Level::Warn,
            EventType::Acme(AcmeEvent::AuthTooManyAttempts) => Level::Warn,
            EventType::Acme(AcmeEvent::OrderInvalid) => Level::Warn,
            EventType::Acme(AcmeEvent::TlsAlpnError) => Level::Warn,
            EventType::Acme(AcmeEvent::TokenNotFound) => Level::Warn,
            EventType::Ai(AiEvent::ApiError) => Level::Warn,
            EventType::Arc(ArcEvent::SealerNotFound) => Level::Warn,
            EventType::Auth(AuthEvent::TooManyAttempts) => Level::Warn,
            EventType::Calendar(CalendarEvent::AlarmFailed) => Level::Warn,
            EventType::Cluster(ClusterEvent::SubscriberDisconnected) => Level::Warn,
            EventType::Delivery(DeliveryEvent::MissingOutboundHostname) => Level::Warn,
            EventType::Delivery(DeliveryEvent::ConcurrencyLimitExceeded) => Level::Warn,
            EventType::Delivery(DeliveryEvent::RateLimitExceeded) => Level::Warn,
            EventType::Dkim(DkimEvent::SignerNotFound) => Level::Warn,
            EventType::Dns(DnsEvent::RecordCreationFailed) => Level::Warn,
            EventType::Dns(DnsEvent::RecordPropagationTimeout) => Level::Warn,
            EventType::Eval(EvalEvent::DirectoryNotFound) => Level::Warn,
            EventType::Http(HttpEvent::XForwardedMissing) => Level::Warn,
            EventType::IncomingReport(IncomingReportEvent::DmarcReportWithWarnings) => Level::Warn,
            EventType::IncomingReport(IncomingReportEvent::TlsReportWithWarnings) => Level::Warn,
            EventType::Limit(LimitEvent::ConcurrentConnection) => Level::Warn,
            EventType::Limit(LimitEvent::TooManyRequests) => Level::Warn,
            EventType::Milter(MilterEvent::IoError) => Level::Warn,
            EventType::Milter(MilterEvent::FrameTooLarge) => Level::Warn,
            EventType::Milter(MilterEvent::FrameInvalid) => Level::Warn,
            EventType::Milter(MilterEvent::UnexpectedResponse) => Level::Warn,
            EventType::Milter(MilterEvent::Timeout) => Level::Warn,
            EventType::Milter(MilterEvent::TlsInvalidName) => Level::Warn,
            EventType::Milter(MilterEvent::Disconnected) => Level::Warn,
            EventType::Milter(MilterEvent::ParseError) => Level::Warn,
            EventType::MtaHook(MtaHookEvent::Error) => Level::Warn,
            EventType::Network(NetworkEvent::ProxyError) => Level::Warn,
            EventType::Queue(QueueEvent::BackPressure) => Level::Warn,
            EventType::Registry(RegistryEvent::BuildWarning) => Level::Warn,
            EventType::Server(ServerEvent::RecoveryMode) => Level::Warn,
            EventType::Server(ServerEvent::BootstrapMode) => Level::Warn,
            EventType::Sieve(SieveEvent::MessageTooLarge) => Level::Warn,
            EventType::Sieve(SieveEvent::ScriptNotFound) => Level::Warn,
            EventType::Sieve(SieveEvent::ListNotFound) => Level::Warn,
            EventType::Sieve(SieveEvent::NotSupported) => Level::Warn,
            EventType::Sieve(SieveEvent::QuotaExceeded) => Level::Warn,
            EventType::Smtp(SmtpEvent::IdNotFound) => Level::Warn,
            EventType::Smtp(SmtpEvent::MissingLocalHostname) => Level::Warn,
            EventType::Spam(SpamEvent::TrainSampleNotFound) => Level::Warn,
            EventType::Store(StoreEvent::HttpStoreError) => Level::Warn,
            EventType::Store(StoreEvent::BlobMissingMarker) => Level::Warn,
            EventType::TaskManager(TaskManagerEvent::TaskFailed) => Level::Warn,
            EventType::Telemetry(TelemetryEvent::AlertEvent) => Level::Warn,
            EventType::Telemetry(TelemetryEvent::LogError) => Level::Warn,
            EventType::Telemetry(TelemetryEvent::WebhookError) => Level::Warn,
            EventType::Telemetry(TelemetryEvent::OtelExporterError) => Level::Warn,
            EventType::Telemetry(TelemetryEvent::OtelMetricsExporterError) => Level::Warn,
            EventType::Telemetry(TelemetryEvent::PrometheusExporterError) => Level::Warn,
            EventType::Telemetry(TelemetryEvent::JournalError) => Level::Warn,
            EventType::Tls(TlsEvent::NoCertificatesAvailable) => Level::Warn,
            EventType::Tls(TlsEvent::MultipleCertificatesAvailable) => Level::Warn,
            _ => Level::Debug,
        }
    }

    pub fn description(&self) -> &'static str {
        match self {
            EventType::Acme(AcmeEvent::AuthStart) => "ACME authentication started",
            EventType::Acme(AcmeEvent::AuthPending) => "ACME authentication pending",
            EventType::Acme(AcmeEvent::AuthValid) => "ACME authentication valid",
            EventType::Acme(AcmeEvent::AuthCompleted) => "ACME authentication completed",
            EventType::Acme(AcmeEvent::AuthError) => "ACME authentication error",
            EventType::Acme(AcmeEvent::AuthTooManyAttempts) => {
                "Too many ACME authentication attempts"
            }
            EventType::Acme(AcmeEvent::ProcessCert) => "Processing ACME certificate",
            EventType::Acme(AcmeEvent::OrderStart) => "ACME order started",
            EventType::Acme(AcmeEvent::OrderProcessing) => "ACME order processing",
            EventType::Acme(AcmeEvent::OrderCompleted) => "ACME order completed",
            EventType::Acme(AcmeEvent::OrderReady) => "ACME order ready",
            EventType::Acme(AcmeEvent::OrderValid) => "ACME order valid",
            EventType::Acme(AcmeEvent::OrderInvalid) => "ACME order invalid",
            EventType::Acme(AcmeEvent::RenewBackoff) => "ACME renew backoff",
            EventType::Acme(AcmeEvent::ClientSuppliedSni) => "ACME client supplied SNI",
            EventType::Acme(AcmeEvent::ClientMissingSni) => "ACME client missing SNI",
            EventType::Acme(AcmeEvent::TlsAlpnReceived) => "ACME TLS ALPN received",
            EventType::Acme(AcmeEvent::TlsAlpnError) => "ACME TLS ALPN error",
            EventType::Acme(AcmeEvent::TokenNotFound) => "ACME token not found",
            EventType::Acme(AcmeEvent::Error) => "ACME error",
            EventType::Ai(AiEvent::LlmResponse) => "LLM response",
            EventType::Ai(AiEvent::ApiError) => "AI API error",
            EventType::Arc(ArcEvent::ChainTooLong) => "ARC chain too long",
            EventType::Arc(ArcEvent::InvalidInstance) => "Invalid ARC instance",
            EventType::Arc(ArcEvent::InvalidCv) => "Invalid ARC CV",
            EventType::Arc(ArcEvent::HasHeaderTag) => "ARC has header tag",
            EventType::Arc(ArcEvent::BrokenChain) => "Broken ARC chain",
            EventType::Arc(ArcEvent::SealerNotFound) => "ARC sealer not found",
            EventType::Auth(AuthEvent::Success) => "Authentication successful",
            EventType::Auth(AuthEvent::Failed) => "Authentication failed",
            EventType::Auth(AuthEvent::TokenExpired) => "OAuth token expired",
            EventType::Auth(AuthEvent::MfaRequired) => "Missing MFA token for authentication",
            EventType::Auth(AuthEvent::TooManyAttempts) => "Too many authentication attempts",
            EventType::Auth(AuthEvent::ClientRegistration) => "OAuth Client registration",
            EventType::Auth(AuthEvent::Error) => "Authentication error",
            EventType::Auth(AuthEvent::Warning) => "Authentication warning",
            EventType::Auth(AuthEvent::CredentialExpired) => "Credential expired",
            EventType::Calendar(CalendarEvent::RuleExpansionError) => {
                "Calendar rule expansion error"
            }
            EventType::Calendar(CalendarEvent::AlarmSent) => "Calendar alarm sent",
            EventType::Calendar(CalendarEvent::AlarmSkipped) => "Calendar alarm skipped",
            EventType::Calendar(CalendarEvent::AlarmRecipientOverride) => {
                "Calendar alarm recipient overriden"
            }
            EventType::Calendar(CalendarEvent::AlarmFailed) => "Calendar alarm could not be sent",
            EventType::Calendar(CalendarEvent::ItipMessageSent) => "Calendar iTIP message sent",
            EventType::Calendar(CalendarEvent::ItipMessageReceived) => {
                "Calendar iTIP message received"
            }
            EventType::Calendar(CalendarEvent::ItipMessageError) => "iTIP message error",
            EventType::Cluster(ClusterEvent::Startup) => "Clustering enabled",
            EventType::Cluster(ClusterEvent::SubscriberStart) => "PubSub subscriber started",
            EventType::Cluster(ClusterEvent::SubscriberStop) => "PubSub subscriber stopped",
            EventType::Cluster(ClusterEvent::SubscriberError) => "PubSub subscriber error",
            EventType::Cluster(ClusterEvent::SubscriberDisconnected) => {
                "PubSub subscriber disconnected"
            }
            EventType::Cluster(ClusterEvent::PublisherStart) => "PubSub publisher started",
            EventType::Cluster(ClusterEvent::PublisherStop) => "PubSub publisher stopped",
            EventType::Cluster(ClusterEvent::PublisherError) => "PubSub publisher error",
            EventType::Cluster(ClusterEvent::MessageReceived) => "PubSub message received",
            EventType::Cluster(ClusterEvent::MessageSkipped) => "PubSub message skipped",
            EventType::Cluster(ClusterEvent::MessageInvalid) => "Invalid PubSub message",
            EventType::Cluster(ClusterEvent::NodeIdRenewed) => "Node ID renewed",
            EventType::Dane(DaneEvent::AuthenticationSuccess) => "DANE authentication successful",
            EventType::Dane(DaneEvent::AuthenticationFailure) => "DANE authentication failed",
            EventType::Dane(DaneEvent::NoCertificatesFound) => "No certificates found for DANE",
            EventType::Dane(DaneEvent::CertificateParseError) => {
                "Error parsing certificate for DANE"
            }
            EventType::Dane(DaneEvent::TlsaRecordMatch) => "TLSA record match found",
            EventType::Dane(DaneEvent::TlsaRecordFetch) => "Fetching TLSA record",
            EventType::Dane(DaneEvent::TlsaRecordFetchError) => "Error fetching TLSA record",
            EventType::Dane(DaneEvent::TlsaRecordNotFound) => "TLSA record not found",
            EventType::Dane(DaneEvent::TlsaRecordNotDnssecSigned) => {
                "TLSA record not DNSSEC signed"
            }
            EventType::Dane(DaneEvent::TlsaRecordInvalid) => "Invalid TLSA record",
            EventType::Delivery(DeliveryEvent::AttemptStart) => "Delivery attempt started",
            EventType::Delivery(DeliveryEvent::AttemptEnd) => "Delivery attempt ended",
            EventType::Delivery(DeliveryEvent::Completed) => "Delivery completed",
            EventType::Delivery(DeliveryEvent::Failed) => "Delivery failed",
            EventType::Delivery(DeliveryEvent::DomainDeliveryStart) => {
                "New delivery attempt for domain"
            }
            EventType::Delivery(DeliveryEvent::MxLookup) => "MX record lookup",
            EventType::Delivery(DeliveryEvent::MxLookupFailed) => "MX record lookup failed",
            EventType::Delivery(DeliveryEvent::IpLookup) => "IP address lookup",
            EventType::Delivery(DeliveryEvent::IpLookupFailed) => "IP address lookup failed",
            EventType::Delivery(DeliveryEvent::NullMx) => "Null MX record found",
            EventType::Delivery(DeliveryEvent::Connect) => "Connecting to remote server",
            EventType::Delivery(DeliveryEvent::ConnectError) => "Connection error",
            EventType::Delivery(DeliveryEvent::MissingOutboundHostname) => {
                "Missing outbound hostname in configuration"
            }
            EventType::Delivery(DeliveryEvent::GreetingFailed) => "SMTP greeting failed",
            EventType::Delivery(DeliveryEvent::Ehlo) => "SMTP EHLO command",
            EventType::Delivery(DeliveryEvent::EhloRejected) => "SMTP EHLO rejected",
            EventType::Delivery(DeliveryEvent::Auth) => "SMTP authentication",
            EventType::Delivery(DeliveryEvent::AuthFailed) => "SMTP authentication failed",
            EventType::Delivery(DeliveryEvent::MailFrom) => "SMTP MAIL FROM command",
            EventType::Delivery(DeliveryEvent::MailFromRejected) => "SMTP MAIL FROM rejected",
            EventType::Delivery(DeliveryEvent::Delivered) => "Message delivered",
            EventType::Delivery(DeliveryEvent::RcptTo) => "SMTP RCPT TO command",
            EventType::Delivery(DeliveryEvent::RcptToRejected) => "SMTP RCPT TO rejected",
            EventType::Delivery(DeliveryEvent::RcptToFailed) => "SMTP RCPT TO failed",
            EventType::Delivery(DeliveryEvent::MessageRejected) => {
                "Message rejected by remote server"
            }
            EventType::Delivery(DeliveryEvent::StartTls) => "SMTP STARTTLS command",
            EventType::Delivery(DeliveryEvent::StartTlsUnavailable) => "STARTTLS unavailable",
            EventType::Delivery(DeliveryEvent::StartTlsError) => "STARTTLS error",
            EventType::Delivery(DeliveryEvent::StartTlsDisabled) => "STARTTLS disabled",
            EventType::Delivery(DeliveryEvent::ImplicitTlsError) => "Implicit TLS error",
            EventType::Delivery(DeliveryEvent::ConcurrencyLimitExceeded) => {
                "Concurrency limit exceeded"
            }
            EventType::Delivery(DeliveryEvent::RateLimitExceeded) => "Rate limit exceeded",
            EventType::Delivery(DeliveryEvent::DoubleBounce) => {
                "Discarding message after double bounce"
            }
            EventType::Delivery(DeliveryEvent::DsnSuccess) => "DSN success notification",
            EventType::Delivery(DeliveryEvent::DsnTempFail) => "DSN temporary failure notification",
            EventType::Delivery(DeliveryEvent::DsnPermFail) => "DSN permanent failure notification",
            EventType::Delivery(DeliveryEvent::RawInput) => "Raw SMTP input received",
            EventType::Delivery(DeliveryEvent::RawOutput) => "Raw SMTP output sent",
            EventType::Dkim(DkimEvent::Pass) => "DKIM verification passed",
            EventType::Dkim(DkimEvent::Neutral) => "DKIM verification neutral",
            EventType::Dkim(DkimEvent::Fail) => "DKIM verification failed",
            EventType::Dkim(DkimEvent::PermError) => "DKIM permanent error",
            EventType::Dkim(DkimEvent::TempError) => "DKIM temporary error",
            EventType::Dkim(DkimEvent::None) => "No DKIM signature",
            EventType::Dkim(DkimEvent::UnsupportedVersion) => "Unsupported DKIM version",
            EventType::Dkim(DkimEvent::UnsupportedAlgorithm) => "Unsupported DKIM algorithm",
            EventType::Dkim(DkimEvent::UnsupportedCanonicalization) => {
                "Unsupported DKIM canonicalization"
            }
            EventType::Dkim(DkimEvent::UnsupportedKeyType) => "Unsupported DKIM key type",
            EventType::Dkim(DkimEvent::FailedBodyHashMatch) => "DKIM body hash mismatch",
            EventType::Dkim(DkimEvent::FailedVerification) => "DKIM verification failed",
            EventType::Dkim(DkimEvent::FailedAuidMatch) => "DKIM AUID mismatch",
            EventType::Dkim(DkimEvent::RevokedPublicKey) => "DKIM public key revoked",
            EventType::Dkim(DkimEvent::IncompatibleAlgorithms) => "Incompatible DKIM algorithms",
            EventType::Dkim(DkimEvent::SignatureExpired) => "DKIM signature expired",
            EventType::Dkim(DkimEvent::SignatureLength) => "DKIM signature length issue",
            EventType::Dkim(DkimEvent::SignerNotFound) => "DKIM signer not found",
            EventType::Dkim(DkimEvent::BuildError) => "DKIM build error",
            EventType::Dkim(DkimEvent::SignatureCreated) => "DKIM signature created",
            EventType::Dkim(DkimEvent::SignaturePublished) => "DKIM signature published",
            EventType::Dkim(DkimEvent::SignatureRetiring) => "DKIM signature retiring",
            EventType::Dkim(DkimEvent::SignatureRetired) => "DKIM signature retired",
            EventType::Dkim(DkimEvent::SignatureDeleted) => "DKIM signature deleted",
            EventType::Dmarc(DmarcEvent::Pass) => "DMARC check passed",
            EventType::Dmarc(DmarcEvent::Fail) => "DMARC check failed",
            EventType::Dmarc(DmarcEvent::PermError) => "DMARC permanent error",
            EventType::Dmarc(DmarcEvent::TempError) => "DMARC temporary error",
            EventType::Dmarc(DmarcEvent::None) => "No DMARC record",
            EventType::Dns(DnsEvent::RecordCreated) => "DNS record created",
            EventType::Dns(DnsEvent::RecordCreationFailed) => "DNS record creation failed",
            EventType::Dns(DnsEvent::RecordDeletionFailed) => "DNS record deletion failed",
            EventType::Dns(DnsEvent::RecordNotPropagated) => "DNS record not propagated",
            EventType::Dns(DnsEvent::RecordLookupFailed) => "DNS record lookup failed",
            EventType::Dns(DnsEvent::RecordPropagated) => "DNS record propagated",
            EventType::Dns(DnsEvent::RecordPropagationTimeout) => "DNS record propagation timeout",
            EventType::Dns(DnsEvent::BuildError) => "DNS updater build error",
            EventType::Eval(EvalEvent::Result) => "Expression evaluation result",
            EventType::Eval(EvalEvent::Error) => "Expression evaluation error",
            EventType::Eval(EvalEvent::DirectoryNotFound) => {
                "Directory not found while evaluating expression"
            }
            EventType::Eval(EvalEvent::StoreNotFound) => {
                "Store not found while evaluating expression"
            }
            EventType::Http(HttpEvent::ConnectionStart) => "HTTP connection started",
            EventType::Http(HttpEvent::ConnectionEnd) => "HTTP connection ended",
            EventType::Http(HttpEvent::Error) => "HTTP error occurred",
            EventType::Http(HttpEvent::RequestUrl) => "HTTP request URL",
            EventType::Http(HttpEvent::RequestBody) => "HTTP request body",
            EventType::Http(HttpEvent::ResponseBody) => "HTTP response body",
            EventType::Http(HttpEvent::XForwardedMissing) => "X-Forwarded-For header is missing",
            EventType::Imap(ImapEvent::ConnectionStart) => "IMAP connection started",
            EventType::Imap(ImapEvent::ConnectionEnd) => "IMAP connection ended",
            EventType::Imap(ImapEvent::GetAcl) => "IMAP GET ACL command",
            EventType::Imap(ImapEvent::SetAcl) => "IMAP SET ACL command",
            EventType::Imap(ImapEvent::MyRights) => "IMAP MYRIGHTS command",
            EventType::Imap(ImapEvent::ListRights) => "IMAP LISTRIGHTS command",
            EventType::Imap(ImapEvent::Append) => "IMAP APPEND command",
            EventType::Imap(ImapEvent::Capabilities) => "IMAP CAPABILITIES command",
            EventType::Imap(ImapEvent::Id) => "IMAP ID command",
            EventType::Imap(ImapEvent::Close) => "IMAP CLOSE command",
            EventType::Imap(ImapEvent::Copy) => "IMAP COPY command",
            EventType::Imap(ImapEvent::Move) => "IMAP MOVE command",
            EventType::Imap(ImapEvent::CreateMailbox) => "IMAP CREATE mailbox command",
            EventType::Imap(ImapEvent::DeleteMailbox) => "IMAP DELETE mailbox command",
            EventType::Imap(ImapEvent::RenameMailbox) => "IMAP RENAME mailbox command",
            EventType::Imap(ImapEvent::Enable) => "IMAP ENABLE command",
            EventType::Imap(ImapEvent::Expunge) => "IMAP EXPUNGE command",
            EventType::Imap(ImapEvent::Fetch) => "IMAP FETCH command",
            EventType::Imap(ImapEvent::IdleStart) => "IMAP IDLE start",
            EventType::Imap(ImapEvent::IdleStop) => "IMAP IDLE stop",
            EventType::Imap(ImapEvent::List) => "IMAP LIST command",
            EventType::Imap(ImapEvent::Lsub) => "IMAP LSUB command",
            EventType::Imap(ImapEvent::Logout) => "IMAP LOGOUT command",
            EventType::Imap(ImapEvent::Namespace) => "IMAP NAMESPACE command",
            EventType::Imap(ImapEvent::Noop) => "IMAP NOOP command",
            EventType::Imap(ImapEvent::Search) => "IMAP SEARCH command",
            EventType::Imap(ImapEvent::Sort) => "IMAP SORT command",
            EventType::Imap(ImapEvent::Select) => "IMAP SELECT command",
            EventType::Imap(ImapEvent::Status) => "IMAP STATUS command",
            EventType::Imap(ImapEvent::Store) => "IMAP STORE command",
            EventType::Imap(ImapEvent::Subscribe) => "IMAP SUBSCRIBE command",
            EventType::Imap(ImapEvent::Unsubscribe) => "IMAP UNSUBSCRIBE command",
            EventType::Imap(ImapEvent::Thread) => "IMAP THREAD command",
            EventType::Imap(ImapEvent::GetQuota) => "IMAP GETQUOTA command",
            EventType::Imap(ImapEvent::Error) => "IMAP error occurred",
            EventType::Imap(ImapEvent::RawInput) => "Raw IMAP input received",
            EventType::Imap(ImapEvent::RawOutput) => "Raw IMAP output sent",
            EventType::IncomingReport(IncomingReportEvent::DmarcReport) => "DMARC report received",
            EventType::IncomingReport(IncomingReportEvent::DmarcReportWithWarnings) => {
                "DMARC report received with warnings"
            }
            EventType::IncomingReport(IncomingReportEvent::TlsReport) => "TLS report received",
            EventType::IncomingReport(IncomingReportEvent::TlsReportWithWarnings) => {
                "TLS report received with warnings"
            }
            EventType::IncomingReport(IncomingReportEvent::AbuseReport) => "Abuse report received",
            EventType::IncomingReport(IncomingReportEvent::AuthFailureReport) => {
                "Authentication failure report received"
            }
            EventType::IncomingReport(IncomingReportEvent::FraudReport) => "Fraud report received",
            EventType::IncomingReport(IncomingReportEvent::NotSpamReport) => {
                "Not spam report received"
            }
            EventType::IncomingReport(IncomingReportEvent::VirusReport) => "Virus report received",
            EventType::IncomingReport(IncomingReportEvent::OtherReport) => {
                "Other type of report received"
            }
            EventType::IncomingReport(IncomingReportEvent::MessageParseFailed) => {
                "Failed to parse incoming report message"
            }
            EventType::IncomingReport(IncomingReportEvent::DmarcParseFailed) => {
                "Failed to parse DMARC report"
            }
            EventType::IncomingReport(IncomingReportEvent::TlsRpcParseFailed) => {
                "Failed to parse TLS RPC report"
            }
            EventType::IncomingReport(IncomingReportEvent::ArfParseFailed) => {
                "Failed to parse ARF report"
            }
            EventType::IncomingReport(IncomingReportEvent::DecompressError) => {
                "Error decompressing report"
            }
            EventType::Iprev(IprevEvent::Pass) => "IPREV check passed",
            EventType::Iprev(IprevEvent::Fail) => "IPREV check failed",
            EventType::Iprev(IprevEvent::PermError) => "IPREV permanent error",
            EventType::Iprev(IprevEvent::TempError) => "IPREV temporary error",
            EventType::Iprev(IprevEvent::None) => "No IPREV record",
            EventType::Jmap(JmapEvent::MethodCall) => "JMAP method call",
            EventType::Jmap(JmapEvent::InvalidArguments) => "Invalid JMAP arguments",
            EventType::Jmap(JmapEvent::RequestTooLarge) => "JMAP request too large",
            EventType::Jmap(JmapEvent::StateMismatch) => "JMAP state mismatch",
            EventType::Jmap(JmapEvent::AnchorNotFound) => "JMAP anchor not found",
            EventType::Jmap(JmapEvent::UnsupportedFilter) => "Unsupported JMAP filter",
            EventType::Jmap(JmapEvent::UnsupportedSort) => "Unsupported JMAP sort",
            EventType::Jmap(JmapEvent::UnknownMethod) => "Unknown JMAP method",
            EventType::Jmap(JmapEvent::InvalidResultReference) => "Invalid JMAP result reference",
            EventType::Jmap(JmapEvent::Forbidden) => "JMAP operation forbidden",
            EventType::Jmap(JmapEvent::AccountNotFound) => "JMAP account not found",
            EventType::Jmap(JmapEvent::AccountNotSupportedByMethod) => {
                "JMAP account not supported by method"
            }
            EventType::Jmap(JmapEvent::AccountReadOnly) => "JMAP account is read-only",
            EventType::Jmap(JmapEvent::NotFound) => "JMAP resource not found",
            EventType::Jmap(JmapEvent::CannotCalculateChanges) => "Cannot calculate JMAP changes",
            EventType::Jmap(JmapEvent::UnknownDataType) => "Unknown JMAP data type",
            EventType::Jmap(JmapEvent::UnknownCapability) => "Unknown JMAP capability",
            EventType::Jmap(JmapEvent::NotJson) => "JMAP request is not JSON",
            EventType::Jmap(JmapEvent::NotRequest) => "JMAP input is not a request",
            EventType::Jmap(JmapEvent::WebsocketStart) => "JMAP WebSocket connection started",
            EventType::Jmap(JmapEvent::WebsocketStop) => "JMAP WebSocket connection stopped",
            EventType::Jmap(JmapEvent::WebsocketError) => "JMAP WebSocket error",
            EventType::Limit(LimitEvent::SizeRequest) => "Request size limit reached",
            EventType::Limit(LimitEvent::SizeUpload) => "Upload size limit reached",
            EventType::Limit(LimitEvent::CallsIn) => "Incoming calls limit reached",
            EventType::Limit(LimitEvent::ConcurrentRequest) => "Concurrent request limit reached",
            EventType::Limit(LimitEvent::ConcurrentUpload) => "Concurrent upload limit reached",
            EventType::Limit(LimitEvent::ConcurrentConnection) => {
                "Concurrent connection limit reached"
            }
            EventType::Limit(LimitEvent::Quota) => "Quota limit reached",
            EventType::Limit(LimitEvent::BlobQuota) => "Blob quota limit reached",
            EventType::Limit(LimitEvent::TenantQuota) => "Tenant quota limit reached",
            EventType::Limit(LimitEvent::TooManyRequests) => "Too many requests",
            EventType::MailAuth(MailAuthEvent::ParseError) => "Mail authentication parse error",
            EventType::MailAuth(MailAuthEvent::MissingParameters) => {
                "Missing mail authentication parameters"
            }
            EventType::MailAuth(MailAuthEvent::NoHeadersFound) => "No headers found in message",
            EventType::MailAuth(MailAuthEvent::Crypto) => "Crypto error during mail authentication",
            EventType::MailAuth(MailAuthEvent::Io) => "I/O error during mail authentication",
            EventType::MailAuth(MailAuthEvent::Base64) => "Base64 error during mail authentication",
            EventType::MailAuth(MailAuthEvent::DnsError) => "DNS error",
            EventType::MailAuth(MailAuthEvent::DnsRecordNotFound) => "DNS record not found",
            EventType::MailAuth(MailAuthEvent::DnsInvalidRecordType) => "Invalid DNS record type",
            EventType::MailAuth(MailAuthEvent::PolicyNotAligned) => "Policy not aligned",
            EventType::ManageSieve(ManageSieveEvent::ConnectionStart) => {
                "ManageSieve connection started"
            }
            EventType::ManageSieve(ManageSieveEvent::ConnectionEnd) => {
                "ManageSieve connection ended"
            }
            EventType::ManageSieve(ManageSieveEvent::CreateScript) => {
                "ManageSieve CREATE script command"
            }
            EventType::ManageSieve(ManageSieveEvent::UpdateScript) => {
                "ManageSieve UPDATE script command"
            }
            EventType::ManageSieve(ManageSieveEvent::GetScript) => "ManageSieve GET script command",
            EventType::ManageSieve(ManageSieveEvent::DeleteScript) => {
                "ManageSieve DELETE script command"
            }
            EventType::ManageSieve(ManageSieveEvent::RenameScript) => {
                "ManageSieve RENAME script command"
            }
            EventType::ManageSieve(ManageSieveEvent::CheckScript) => {
                "ManageSieve CHECK script command"
            }
            EventType::ManageSieve(ManageSieveEvent::HaveSpace) => "ManageSieve HAVESPACE command",
            EventType::ManageSieve(ManageSieveEvent::ListScripts) => {
                "ManageSieve LIST scripts command"
            }
            EventType::ManageSieve(ManageSieveEvent::SetActive) => "ManageSieve SET ACTIVE command",
            EventType::ManageSieve(ManageSieveEvent::Capabilities) => {
                "ManageSieve CAPABILITIES command"
            }
            EventType::ManageSieve(ManageSieveEvent::StartTls) => "ManageSieve STARTTLS command",
            EventType::ManageSieve(ManageSieveEvent::Unauthenticate) => {
                "ManageSieve UNAUTHENTICATE command"
            }
            EventType::ManageSieve(ManageSieveEvent::Logout) => "ManageSieve LOGOUT command",
            EventType::ManageSieve(ManageSieveEvent::Noop) => "ManageSieve NOOP command",
            EventType::ManageSieve(ManageSieveEvent::Error) => "ManageSieve error occurred",
            EventType::ManageSieve(ManageSieveEvent::RawInput) => "Raw ManageSieve input received",
            EventType::ManageSieve(ManageSieveEvent::RawOutput) => "Raw ManageSieve output sent",
            EventType::MessageIngest(MessageIngestEvent::Ham) => "Message ingested",
            EventType::MessageIngest(MessageIngestEvent::Spam) => "Possible spam message ingested",
            EventType::MessageIngest(MessageIngestEvent::ImapAppend) => "Message appended via IMAP",
            EventType::MessageIngest(MessageIngestEvent::JmapAppend) => "Message appended via JMAP",
            EventType::MessageIngest(MessageIngestEvent::Duplicate) => "Skipping duplicate message",
            EventType::MessageIngest(MessageIngestEvent::Error) => "Message ingestion error",
            EventType::MessageIngest(MessageIngestEvent::SearchIndex) => "Search index updated",
            EventType::Milter(MilterEvent::Read) => "Reading from Milter",
            EventType::Milter(MilterEvent::Write) => "Writing to Milter",
            EventType::Milter(MilterEvent::ActionAccept) => "Milter action: Accept",
            EventType::Milter(MilterEvent::ActionDiscard) => "Milter action: Discard",
            EventType::Milter(MilterEvent::ActionReject) => "Milter action: Reject",
            EventType::Milter(MilterEvent::ActionTempFail) => "Milter action: Temporary failure",
            EventType::Milter(MilterEvent::ActionReplyCode) => "Milter action: Reply code",
            EventType::Milter(MilterEvent::ActionConnectionFailure) => {
                "Milter action: Connection failure"
            }
            EventType::Milter(MilterEvent::ActionShutdown) => "Milter action: Shutdown",
            EventType::Milter(MilterEvent::IoError) => "Milter I/O error",
            EventType::Milter(MilterEvent::FrameTooLarge) => "Milter frame too large",
            EventType::Milter(MilterEvent::FrameInvalid) => "Invalid Milter frame",
            EventType::Milter(MilterEvent::UnexpectedResponse) => "Unexpected Milter response",
            EventType::Milter(MilterEvent::Timeout) => "Milter timeout",
            EventType::Milter(MilterEvent::TlsInvalidName) => "Invalid TLS name for Milter",
            EventType::Milter(MilterEvent::Disconnected) => "Milter disconnected",
            EventType::Milter(MilterEvent::ParseError) => "Milter parse error",
            EventType::MtaHook(MtaHookEvent::ActionAccept) => "MTA hook action: Accept",
            EventType::MtaHook(MtaHookEvent::ActionDiscard) => "MTA hook action: Discard",
            EventType::MtaHook(MtaHookEvent::ActionReject) => "MTA hook action: Reject",
            EventType::MtaHook(MtaHookEvent::ActionQuarantine) => "MTA hook action: Quarantine",
            EventType::MtaHook(MtaHookEvent::Error) => "MTA hook error",
            EventType::MtaSts(MtaStsEvent::Authorized) => "Host authorized by MTA-STS policy",
            EventType::MtaSts(MtaStsEvent::NotAuthorized) => {
                "Host not authorized by MTA-STS policy"
            }
            EventType::MtaSts(MtaStsEvent::PolicyFetch) => "Fetched MTA-STS policy",
            EventType::MtaSts(MtaStsEvent::PolicyNotFound) => "MTA-STS policy not found",
            EventType::MtaSts(MtaStsEvent::PolicyFetchError) => "Error fetching MTA-STS policy",
            EventType::MtaSts(MtaStsEvent::InvalidPolicy) => "Invalid MTA-STS policy",
            EventType::Network(NetworkEvent::ListenStart) => "Network listener started",
            EventType::Network(NetworkEvent::ListenStop) => "Network listener stopped",
            EventType::Network(NetworkEvent::ListenError) => "Network listener error",
            EventType::Network(NetworkEvent::BindError) => "Network bind error",
            EventType::Network(NetworkEvent::ReadError) => "Network read error",
            EventType::Network(NetworkEvent::WriteError) => "Network write error",
            EventType::Network(NetworkEvent::FlushError) => "Network flush error",
            EventType::Network(NetworkEvent::AcceptError) => "Network accept error",
            EventType::Network(NetworkEvent::SplitError) => "Network split error",
            EventType::Network(NetworkEvent::Timeout) => "Network timeout",
            EventType::Network(NetworkEvent::Closed) => "Network connection closed",
            EventType::Network(NetworkEvent::ProxyError) => "Proxy protocol error",
            EventType::Network(NetworkEvent::SetOptError) => "Network set option error",
            EventType::OutgoingReport(OutgoingReportEvent::SpfReport) => "SPF report sent",
            EventType::OutgoingReport(OutgoingReportEvent::SpfRateLimited) => {
                "SPF report rate limited"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DkimReport) => "DKIM report sent",
            EventType::OutgoingReport(OutgoingReportEvent::DkimRateLimited) => {
                "DKIM report rate limited"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DmarcReport) => "DMARC report sent",
            EventType::OutgoingReport(OutgoingReportEvent::DmarcRateLimited) => {
                "DMARC report rate limited"
            }
            EventType::OutgoingReport(OutgoingReportEvent::DmarcAggregateReport) => {
                "DMARC aggregate is being prepared"
            }
            EventType::OutgoingReport(OutgoingReportEvent::TlsAggregate) => {
                "TLS aggregate report is being prepared"
            }
            EventType::OutgoingReport(OutgoingReportEvent::HttpSubmission) => {
                "Report submitted via HTTP"
            }
            EventType::OutgoingReport(OutgoingReportEvent::UnauthorizedReportingAddress) => {
                "Unauthorized reporting address"
            }
            EventType::OutgoingReport(OutgoingReportEvent::ReportingAddressValidationError) => {
                "Error validating reporting address"
            }
            EventType::OutgoingReport(OutgoingReportEvent::NotFound) => "Report not found",
            EventType::OutgoingReport(OutgoingReportEvent::SubmissionError) => {
                "Error submitting report"
            }
            EventType::OutgoingReport(OutgoingReportEvent::NoRecipientsFound) => {
                "No recipients found for report"
            }
            EventType::OutgoingReport(OutgoingReportEvent::Locked) => {
                "Report is locked by another process"
            }
            EventType::OutgoingReport(OutgoingReportEvent::MaxSizeExceeded) => {
                "Report size exceeds maximum"
            }
            EventType::Pop3(Pop3Event::ConnectionStart) => "POP3 connection started",
            EventType::Pop3(Pop3Event::ConnectionEnd) => "POP3 connection ended",
            EventType::Pop3(Pop3Event::Delete) => "POP3 DELETE command",
            EventType::Pop3(Pop3Event::Reset) => "POP3 RESET command",
            EventType::Pop3(Pop3Event::Quit) => "POP3 QUIT command",
            EventType::Pop3(Pop3Event::Fetch) => "POP3 FETCH command",
            EventType::Pop3(Pop3Event::List) => "POP3 LIST command",
            EventType::Pop3(Pop3Event::ListMessage) => "POP3 LIST specific message command",
            EventType::Pop3(Pop3Event::Uidl) => "POP3 UIDL command",
            EventType::Pop3(Pop3Event::UidlMessage) => "POP3 UIDL specific message command",
            EventType::Pop3(Pop3Event::Stat) => "POP3 STAT command",
            EventType::Pop3(Pop3Event::Noop) => "POP3 NOOP command",
            EventType::Pop3(Pop3Event::Capabilities) => "POP3 CAPABILITIES command",
            EventType::Pop3(Pop3Event::StartTls) => "POP3 STARTTLS command",
            EventType::Pop3(Pop3Event::Utf8) => "POP3 UTF8 command",
            EventType::Pop3(Pop3Event::Error) => "POP3 error occurred",
            EventType::Pop3(Pop3Event::RawInput) => "Raw POP3 input received",
            EventType::Pop3(Pop3Event::RawOutput) => "Raw POP3 output sent",
            EventType::PushSubscription(PushSubscriptionEvent::Success) => {
                "Push subscription successful"
            }
            EventType::PushSubscription(PushSubscriptionEvent::Error) => "Push subscription error",
            EventType::PushSubscription(PushSubscriptionEvent::NotFound) => {
                "Push subscription not found"
            }
            EventType::Queue(QueueEvent::Started) => "MTA queue started",
            EventType::Queue(QueueEvent::MessageQueued) => "Queued message for delivery",
            EventType::Queue(QueueEvent::AuthenticatedMessageQueued) => {
                "Queued message submission for delivery"
            }
            EventType::Queue(QueueEvent::ReportQueued) => "Queued report for delivery",
            EventType::Queue(QueueEvent::DsnQueued) => "Queued DSN for delivery",
            EventType::Queue(QueueEvent::AutogeneratedQueued) => {
                "Queued autogenerated message for delivery"
            }
            EventType::Queue(QueueEvent::Rescheduled) => "Message rescheduled for delivery",
            EventType::Queue(QueueEvent::Locked) => "Queue event is locked by another process",
            EventType::Queue(QueueEvent::BlobNotFound) => "Message blob not found",
            EventType::Queue(QueueEvent::RateLimitExceeded) => "Rate limit exceeded",
            EventType::Queue(QueueEvent::ConcurrencyLimitExceeded) => "Concurrency limit exceeded",
            EventType::Queue(QueueEvent::QuotaExceeded) => "Quota exceeded",
            EventType::Queue(QueueEvent::BackPressure) => "Queue backpressure detected",
            EventType::Registry(RegistryEvent::LocalReadError) => "Local registry read error",
            EventType::Registry(RegistryEvent::LocalWriteError) => "Local registry write error",
            EventType::Registry(RegistryEvent::LocalParseError) => "Local registry parse error",
            EventType::Registry(RegistryEvent::ReadError) => "Registry read error",
            EventType::Registry(RegistryEvent::WriteError) => "Registry write error",
            EventType::Registry(RegistryEvent::DeserializationError) => {
                "Registry deserialization error"
            }
            EventType::Registry(RegistryEvent::BuildError) => "Configuration build error",
            EventType::Registry(RegistryEvent::BuildWarning) => "Configuration build warning",
            EventType::Registry(RegistryEvent::NotSupported) => {
                "Operation not supported by local registry"
            }
            EventType::Registry(RegistryEvent::ValidationError) => "Object validation error",
            EventType::Resource(ResourceEvent::NotFound) => "Resource not found",
            EventType::Resource(ResourceEvent::BadParameters) => "Bad resource parameters",
            EventType::Resource(ResourceEvent::Error) => "Resource error",
            EventType::Resource(ResourceEvent::DownloadExternal) => "Downloading external resource",
            EventType::Resource(ResourceEvent::ApplicationUpdated) => {
                "Application resource updated"
            }
            EventType::Resource(ResourceEvent::ApplicationUnpacked) => {
                "Application resource unpacked"
            }
            EventType::Security(SecurityEvent::AuthenticationBan) => {
                "Banned due to authentication errors"
            }
            EventType::Security(SecurityEvent::AbuseBan) => "Banned due to abuse",
            EventType::Security(SecurityEvent::ScanBan) => "Banned due to scan",
            EventType::Security(SecurityEvent::LoiterBan) => "Banned due to loitering",
            EventType::Security(SecurityEvent::IpBlocked) => "Blocked IP address",
            EventType::Security(SecurityEvent::IpBlockExpired) => "IP block expired",
            EventType::Security(SecurityEvent::IpAllowExpired) => "IP allow expired",
            EventType::Security(SecurityEvent::IpUnauthorized) => "Unauthorized IP address",
            EventType::Security(SecurityEvent::Unauthorized) => "Unauthorized access",
            EventType::Server(ServerEvent::Startup) => "Starting Stalwart Server",
            EventType::Server(ServerEvent::Shutdown) => "Shutting down Stalwart Server",
            EventType::Server(ServerEvent::StartupError) => "Server startup error",
            EventType::Server(ServerEvent::ThreadError) => "Server thread error",
            EventType::Server(ServerEvent::Licensing) => "Server licensing event",
            EventType::Server(ServerEvent::RecoveryMode) => "Server started in recovery mode",
            EventType::Server(ServerEvent::BootstrapMode) => "Server started in bootstrap mode",
            EventType::Sieve(SieveEvent::ActionAccept) => "Sieve action: Accept",
            EventType::Sieve(SieveEvent::ActionAcceptReplace) => "Sieve action: Accept and replace",
            EventType::Sieve(SieveEvent::ActionDiscard) => "Sieve action: Discard",
            EventType::Sieve(SieveEvent::ActionReject) => "Sieve action: Reject",
            EventType::Sieve(SieveEvent::SendMessage) => "Sieve sending message",
            EventType::Sieve(SieveEvent::MessageTooLarge) => "Sieve message too large",
            EventType::Sieve(SieveEvent::ScriptNotFound) => "Sieve script not found",
            EventType::Sieve(SieveEvent::ListNotFound) => "Sieve list not found",
            EventType::Sieve(SieveEvent::RuntimeError) => "Sieve runtime error",
            EventType::Sieve(SieveEvent::UnexpectedError) => "Unexpected Sieve error",
            EventType::Sieve(SieveEvent::NotSupported) => "Sieve action not supported",
            EventType::Sieve(SieveEvent::QuotaExceeded) => "Sieve quota exceeded",
            EventType::Smtp(SmtpEvent::ConnectionStart) => "SMTP connection started",
            EventType::Smtp(SmtpEvent::ConnectionEnd) => "SMTP connection ended",
            EventType::Smtp(SmtpEvent::Error) => "SMTP error occurred",
            EventType::Smtp(SmtpEvent::IdNotFound) => "Strategy not found",
            EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded) => "Concurrency limit exceeded",
            EventType::Smtp(SmtpEvent::TransferLimitExceeded) => "Transfer limit exceeded",
            EventType::Smtp(SmtpEvent::RateLimitExceeded) => "Rate limit exceeded",
            EventType::Smtp(SmtpEvent::TimeLimitExceeded) => "Time limit exceeded",
            EventType::Smtp(SmtpEvent::MissingAuthDirectory) => "Missing auth directory",
            EventType::Smtp(SmtpEvent::MessageParseFailed) => "Message parsing failed",
            EventType::Smtp(SmtpEvent::MessageTooLarge) => "Message too large",
            EventType::Smtp(SmtpEvent::LoopDetected) => "Mail loop detected",
            EventType::Smtp(SmtpEvent::DkimPass) => "DKIM verification passed",
            EventType::Smtp(SmtpEvent::DkimFail) => "DKIM verification failed",
            EventType::Smtp(SmtpEvent::ArcPass) => "ARC verification passed",
            EventType::Smtp(SmtpEvent::ArcFail) => "ARC verification failed",
            EventType::Smtp(SmtpEvent::SpfEhloPass) => "SPF EHLO check passed",
            EventType::Smtp(SmtpEvent::SpfEhloFail) => "SPF EHLO check failed",
            EventType::Smtp(SmtpEvent::SpfFromPass) => "SPF From check passed",
            EventType::Smtp(SmtpEvent::SpfFromFail) => "SPF From check failed",
            EventType::Smtp(SmtpEvent::DmarcPass) => "DMARC check passed",
            EventType::Smtp(SmtpEvent::DmarcFail) => "DMARC check failed",
            EventType::Smtp(SmtpEvent::IprevPass) => "IPREV check passed",
            EventType::Smtp(SmtpEvent::IprevFail) => "IPREV check failed",
            EventType::Smtp(SmtpEvent::TooManyMessages) => "Too many messages",
            EventType::Smtp(SmtpEvent::Ehlo) => "SMTP EHLO command",
            EventType::Smtp(SmtpEvent::InvalidEhlo) => "Invalid EHLO command",
            EventType::Smtp(SmtpEvent::DidNotSayEhlo) => "Client did not say EHLO",
            EventType::Smtp(SmtpEvent::EhloExpected) => "EHLO command expected",
            EventType::Smtp(SmtpEvent::LhloExpected) => "LHLO command expected",
            EventType::Smtp(SmtpEvent::MailFromUnauthenticated) => {
                "MAIL FROM without authentication"
            }
            EventType::Smtp(SmtpEvent::MailFromUnauthorized) => "MAIL FROM unauthorized",
            EventType::Smtp(SmtpEvent::MailFromNotAllowed) => "MAIL FROM not allowed",
            EventType::Smtp(SmtpEvent::MailFromRewritten) => "MAIL FROM address rewritten",
            EventType::Smtp(SmtpEvent::MailFromMissing) => "MAIL FROM address missing",
            EventType::Smtp(SmtpEvent::MailFrom) => "SMTP MAIL FROM command",
            EventType::Smtp(SmtpEvent::MultipleMailFrom) => "Multiple MAIL FROM commands",
            EventType::Smtp(SmtpEvent::MailboxDoesNotExist) => "Mailbox does not exist",
            EventType::Smtp(SmtpEvent::RelayNotAllowed) => "Relay not allowed",
            EventType::Smtp(SmtpEvent::RcptTo) => "SMTP RCPT TO command",
            EventType::Smtp(SmtpEvent::RcptToDuplicate) => "Duplicate RCPT TO",
            EventType::Smtp(SmtpEvent::RcptToRewritten) => "RCPT TO address rewritten",
            EventType::Smtp(SmtpEvent::RcptToMissing) => "RCPT TO address missing",
            EventType::Smtp(SmtpEvent::RcptToGreylisted) => "RCPT TO greylisted",
            EventType::Smtp(SmtpEvent::TooManyRecipients) => "Too many recipients",
            EventType::Smtp(SmtpEvent::TooManyInvalidRcpt) => "Too many invalid recipients",
            EventType::Smtp(SmtpEvent::RawInput) => "Raw SMTP input received",
            EventType::Smtp(SmtpEvent::RawOutput) => "Raw SMTP output sent",
            EventType::Smtp(SmtpEvent::MissingLocalHostname) => "Missing local hostname",
            EventType::Smtp(SmtpEvent::Vrfy) => "SMTP VRFY command",
            EventType::Smtp(SmtpEvent::VrfyNotFound) => "VRFY address not found",
            EventType::Smtp(SmtpEvent::VrfyDisabled) => "VRFY command disabled",
            EventType::Smtp(SmtpEvent::Expn) => "SMTP EXPN command",
            EventType::Smtp(SmtpEvent::ExpnNotFound) => "EXPN address not found",
            EventType::Smtp(SmtpEvent::ExpnDisabled) => "EXPN command disabled",
            EventType::Smtp(SmtpEvent::RequireTlsDisabled) => "REQUIRETLS extension disabled",
            EventType::Smtp(SmtpEvent::DeliverByDisabled) => "DELIVERBY extension disabled",
            EventType::Smtp(SmtpEvent::DeliverByInvalid) => "Invalid DELIVERBY parameter",
            EventType::Smtp(SmtpEvent::FutureReleaseDisabled) => {
                "FUTURE RELEASE extension disabled"
            }
            EventType::Smtp(SmtpEvent::FutureReleaseInvalid) => "Invalid FUTURE RELEASE parameter",
            EventType::Smtp(SmtpEvent::MtPriorityDisabled) => "MT-PRIORITY extension disabled",
            EventType::Smtp(SmtpEvent::MtPriorityInvalid) => "Invalid MT-PRIORITY parameter",
            EventType::Smtp(SmtpEvent::DsnDisabled) => "DSN extension disabled",
            EventType::Smtp(SmtpEvent::AuthNotAllowed) => "Authentication not allowed",
            EventType::Smtp(SmtpEvent::AuthMechanismNotSupported) => "Auth mechanism not supported",
            EventType::Smtp(SmtpEvent::AuthExchangeTooLong) => "Auth exchange too long",
            EventType::Smtp(SmtpEvent::AlreadyAuthenticated) => "Already authenticated",
            EventType::Smtp(SmtpEvent::Noop) => "SMTP NOOP command",
            EventType::Smtp(SmtpEvent::StartTls) => "SMTP STARTTLS command",
            EventType::Smtp(SmtpEvent::StartTlsUnavailable) => "STARTTLS unavailable",
            EventType::Smtp(SmtpEvent::StartTlsAlready) => "TLS already active",
            EventType::Smtp(SmtpEvent::Rset) => "SMTP RSET command",
            EventType::Smtp(SmtpEvent::Quit) => "SMTP QUIT command",
            EventType::Smtp(SmtpEvent::Help) => "SMTP HELP command",
            EventType::Smtp(SmtpEvent::CommandNotImplemented) => "Command not implemented",
            EventType::Smtp(SmtpEvent::InvalidCommand) => "Invalid command",
            EventType::Smtp(SmtpEvent::InvalidSenderAddress) => "Invalid sender address",
            EventType::Smtp(SmtpEvent::InvalidRecipientAddress) => "Invalid recipient address",
            EventType::Smtp(SmtpEvent::InvalidParameter) => "Invalid parameter",
            EventType::Smtp(SmtpEvent::UnsupportedParameter) => "Unsupported parameter",
            EventType::Smtp(SmtpEvent::SyntaxError) => "Syntax error",
            EventType::Smtp(SmtpEvent::RequestTooLarge) => "Request too large",
            EventType::Spam(SpamEvent::Pyzor) => "Pyzor success",
            EventType::Spam(SpamEvent::PyzorError) => "Pyzor error",
            EventType::Spam(SpamEvent::Dnsbl) => "DNSBL query",
            EventType::Spam(SpamEvent::DnsblError) => "Error querying DNSBL",
            EventType::Spam(SpamEvent::TrainStarted) => "Spam classifier training started",
            EventType::Spam(SpamEvent::TrainCompleted) => "Spam classifier training completed",
            EventType::Spam(SpamEvent::TrainSampleAdded) => "New training sample added",
            EventType::Spam(SpamEvent::TrainSampleNotFound) => "Training sample not found",
            EventType::Spam(SpamEvent::Classify) => "Classifying message for spam",
            EventType::Spam(SpamEvent::ModelLoaded) => "Spam classifier model loaded",
            EventType::Spam(SpamEvent::ModelNotReady) => "Spam classifier model not ready",
            EventType::Spam(SpamEvent::ModelNotFound) => "Spam classifier model not found",
            EventType::Spam(SpamEvent::RulesUpdated) => "Spam filter rules updated",
            EventType::Spf(SpfEvent::Pass) => "SPF check passed",
            EventType::Spf(SpfEvent::Fail) => "SPF check failed",
            EventType::Spf(SpfEvent::SoftFail) => "SPF soft fail",
            EventType::Spf(SpfEvent::Neutral) => "SPF neutral result",
            EventType::Spf(SpfEvent::TempError) => "SPF temporary error",
            EventType::Spf(SpfEvent::PermError) => "SPF permanent error",
            EventType::Spf(SpfEvent::None) => "No SPF record",
            EventType::Store(StoreEvent::AssertValueFailed) => {
                "Another process modified the record"
            }
            EventType::Store(StoreEvent::FoundationdbError) => "FoundationDB error",
            EventType::Store(StoreEvent::MysqlError) => "MySQL error",
            EventType::Store(StoreEvent::PostgresqlError) => "PostgreSQL error",
            EventType::Store(StoreEvent::RocksdbError) => "RocksDB error",
            EventType::Store(StoreEvent::SqliteError) => "SQLite error",
            EventType::Store(StoreEvent::LdapError) => "LDAP error",
            EventType::Store(StoreEvent::ElasticsearchError) => "ElasticSearch error",
            EventType::Store(StoreEvent::MeilisearchError) => "Meilisearch error",
            EventType::Store(StoreEvent::RedisError) => "Redis error",
            EventType::Store(StoreEvent::S3Error) => "S3 error",
            EventType::Store(StoreEvent::AzureError) => "Azure error",
            EventType::Store(StoreEvent::FilesystemError) => "Filesystem error",
            EventType::Store(StoreEvent::PoolError) => "Connection pool error",
            EventType::Store(StoreEvent::DataCorruption) => "Data corruption detected",
            EventType::Store(StoreEvent::DecompressError) => "Decompression error",
            EventType::Store(StoreEvent::DeserializeError) => "Deserialization error",
            EventType::Store(StoreEvent::NotFound) => "Record not found in database",
            EventType::Store(StoreEvent::NotConfigured) => "Store not configured",
            EventType::Store(StoreEvent::NotSupported) => "Operation not supported by store",
            EventType::Store(StoreEvent::UnexpectedError) => "Unexpected store error",
            EventType::Store(StoreEvent::CryptoError) => "Store crypto error",
            EventType::Store(StoreEvent::HttpStoreError) => "Error updating HTTP store",
            EventType::Store(StoreEvent::CacheMiss) => "Cache miss",
            EventType::Store(StoreEvent::CacheHit) => "Cache hit",
            EventType::Store(StoreEvent::CacheStale) => "Cache is stale",
            EventType::Store(StoreEvent::CacheUpdate) => "Cache update",
            EventType::Store(StoreEvent::BlobMissingMarker) => "Blob missing marker",
            EventType::Store(StoreEvent::DataWrite) => "Write batch operation",
            EventType::Store(StoreEvent::DataIterate) => "Data store iteration operation",
            EventType::Store(StoreEvent::BlobRead) => "Blob read operation",
            EventType::Store(StoreEvent::BlobWrite) => "Blob write operation",
            EventType::Store(StoreEvent::BlobDelete) => "Blob delete operation",
            EventType::Store(StoreEvent::SqlQuery) => "SQL query executed",
            EventType::Store(StoreEvent::LdapQuery) => "LDAP query executed",
            EventType::Store(StoreEvent::LdapWarning) => "LDAP authentication warning",
            EventType::Store(StoreEvent::HttpStoreFetch) => "HTTP store updated",
            EventType::Store(StoreEvent::AutoExpunge) => "Auto-expunge executed",
            EventType::Store(StoreEvent::BlobStorePurged) => "Blob store purge completed",
            EventType::Store(StoreEvent::DataStorePurged) => "Data store purge completed",
            EventType::TaskManager(TaskManagerEvent::TaskAcquired) => "Task acquired from queue",
            EventType::TaskManager(TaskManagerEvent::TaskQueued) => "Task queued for processing",
            EventType::TaskManager(TaskManagerEvent::TaskScheduled) => {
                "Task scheduled for future execution"
            }
            EventType::TaskManager(TaskManagerEvent::TaskLocked) => {
                "Task is locked by another process"
            }
            EventType::TaskManager(TaskManagerEvent::TaskIgnored) => {
                "Task ignored based on current server roles"
            }
            EventType::TaskManager(TaskManagerEvent::TaskFailed) => "Task failed during processing",
            EventType::TaskManager(TaskManagerEvent::TaskRetry) => "Task will be retried",
            EventType::TaskManager(TaskManagerEvent::BlobNotFound) => "Blob not found for task",
            EventType::TaskManager(TaskManagerEvent::MetadataNotFound) => {
                "Metadata not found for task"
            }
            EventType::TaskManager(TaskManagerEvent::SchedulerStarted) => "Task scheduler started",
            EventType::TaskManager(TaskManagerEvent::ManagerStarted) => "Task manager started",
            EventType::Telemetry(TelemetryEvent::AlertEvent) => "Alert event triggered",
            EventType::Telemetry(TelemetryEvent::AlertMessage) => "Alert message sent",
            EventType::Telemetry(TelemetryEvent::LogError) => "Log collector error",
            EventType::Telemetry(TelemetryEvent::WebhookError) => "Webhook collector error",
            EventType::Telemetry(TelemetryEvent::OtelExporterError) => {
                "OpenTelemetry exporter error"
            }
            EventType::Telemetry(TelemetryEvent::OtelMetricsExporterError) => {
                "OpenTelemetry metrics exporter error"
            }
            EventType::Telemetry(TelemetryEvent::PrometheusExporterError) => {
                "Prometheus exporter error"
            }
            EventType::Telemetry(TelemetryEvent::JournalError) => "Journal collector error",
            EventType::Telemetry(TelemetryEvent::MetricsCollected) => "Metrics collected",
            EventType::Telemetry(TelemetryEvent::MetricsStored) => "Metric store",
            EventType::Telemetry(TelemetryEvent::MetricsPushed) => "Metrics pushed",
            EventType::Tls(TlsEvent::Handshake) => "TLS handshake",
            EventType::Tls(TlsEvent::HandshakeError) => "TLS handshake error",
            EventType::Tls(TlsEvent::NotConfigured) => "TLS not configured",
            EventType::Tls(TlsEvent::CertificateNotFound) => "TLS certificate not found",
            EventType::Tls(TlsEvent::NoCertificatesAvailable) => "No TLS certificates available",
            EventType::Tls(TlsEvent::MultipleCertificatesAvailable) => {
                "Multiple TLS certificates available"
            }
            EventType::Tls(TlsEvent::ExpiredCertificateRemoved) => {
                "Certificate expired and removed"
            }
            EventType::TlsRpt(TlsRptEvent::RecordFetch) => "Fetched TLS-RPT record",
            EventType::TlsRpt(TlsRptEvent::RecordFetchError) => "Error fetching TLS-RPT record",
            EventType::TlsRpt(TlsRptEvent::RecordNotFound) => "TLS-RPT record not found",
            EventType::WebDav(WebDavEvent::Propfind) => "WebDAV PROPFIND request",
            EventType::WebDav(WebDavEvent::Proppatch) => "WebDAV PROPPATCH request",
            EventType::WebDav(WebDavEvent::Get) => "WebDAV GET request",
            EventType::WebDav(WebDavEvent::Head) => "WebDAV HEAD request",
            EventType::WebDav(WebDavEvent::Report) => "WebDAV REPORT request",
            EventType::WebDav(WebDavEvent::Mkcol) => "WebDAV MKCOL request",
            EventType::WebDav(WebDavEvent::Mkcalendar) => "WebDAV MKCALENDAR request",
            EventType::WebDav(WebDavEvent::Delete) => "WebDAV DELETE request",
            EventType::WebDav(WebDavEvent::Put) => "WebDAV PUT request",
            EventType::WebDav(WebDavEvent::Post) => "WebDAV POST request",
            EventType::WebDav(WebDavEvent::Patch) => "WebDAV PATCH request",
            EventType::WebDav(WebDavEvent::Copy) => "WebDAV COPY request",
            EventType::WebDav(WebDavEvent::Move) => "WebDAV MOVE request",
            EventType::WebDav(WebDavEvent::Lock) => "WebDAV LOCK request",
            EventType::WebDav(WebDavEvent::Unlock) => "WebDAV UNLOCK request",
            EventType::WebDav(WebDavEvent::Acl) => "WebDAV ACL request",
            EventType::WebDav(WebDavEvent::Options) => "WebDAV OPTIONS request",
            EventType::WebDav(WebDavEvent::Error) => "WebDAV error",
        }
    }

    pub fn message(&self) -> &'static str {
        match self {
            EventType::Auth(AuthEvent::Success) => "Authentication error",
            EventType::Auth(AuthEvent::Failed) => "Authentication failed",
            EventType::Auth(AuthEvent::TokenExpired) => "Authentication error",
            EventType::Auth(AuthEvent::MfaRequired) => "This account requires multi-factor authentication. Alternatively, you can use an app password if your account has one.",
            EventType::Auth(AuthEvent::TooManyAttempts) => "Too many authentication attempts",
            EventType::Auth(AuthEvent::ClientRegistration) => "Authentication error",
            EventType::Auth(AuthEvent::Error) => "Authentication error",
            EventType::Auth(AuthEvent::CredentialExpired) => "Credential expired",
            EventType::Imap(ImapEvent::ConnectionStart) => "IMAP error",
            EventType::Imap(ImapEvent::ConnectionEnd) => "IMAP error",
            EventType::Imap(ImapEvent::GetAcl) => "IMAP error",
            EventType::Imap(ImapEvent::SetAcl) => "IMAP error",
            EventType::Imap(ImapEvent::MyRights) => "IMAP error",
            EventType::Imap(ImapEvent::ListRights) => "IMAP error",
            EventType::Imap(ImapEvent::Append) => "IMAP error",
            EventType::Imap(ImapEvent::Capabilities) => "IMAP error",
            EventType::Imap(ImapEvent::Id) => "IMAP error",
            EventType::Imap(ImapEvent::Close) => "IMAP error",
            EventType::Imap(ImapEvent::Copy) => "IMAP error",
            EventType::Imap(ImapEvent::Move) => "IMAP error",
            EventType::Imap(ImapEvent::CreateMailbox) => "IMAP error",
            EventType::Imap(ImapEvent::DeleteMailbox) => "IMAP error",
            EventType::Imap(ImapEvent::RenameMailbox) => "IMAP error",
            EventType::Imap(ImapEvent::Enable) => "IMAP error",
            EventType::Imap(ImapEvent::Expunge) => "IMAP error",
            EventType::Imap(ImapEvent::Fetch) => "IMAP error",
            EventType::Imap(ImapEvent::IdleStart) => "IMAP error",
            EventType::Imap(ImapEvent::IdleStop) => "IMAP error",
            EventType::Imap(ImapEvent::List) => "IMAP error",
            EventType::Imap(ImapEvent::Lsub) => "IMAP error",
            EventType::Imap(ImapEvent::Logout) => "IMAP error",
            EventType::Imap(ImapEvent::Namespace) => "IMAP error",
            EventType::Imap(ImapEvent::Noop) => "IMAP error",
            EventType::Imap(ImapEvent::Search) => "IMAP error",
            EventType::Imap(ImapEvent::Sort) => "IMAP error",
            EventType::Imap(ImapEvent::Select) => "IMAP error",
            EventType::Imap(ImapEvent::Status) => "IMAP error",
            EventType::Imap(ImapEvent::Store) => "IMAP error",
            EventType::Imap(ImapEvent::Subscribe) => "IMAP error",
            EventType::Imap(ImapEvent::Unsubscribe) => "IMAP error",
            EventType::Imap(ImapEvent::Thread) => "IMAP error",
            EventType::Imap(ImapEvent::GetQuota) => "IMAP error",
            EventType::Imap(ImapEvent::Error) => "IMAP error",
            EventType::Imap(ImapEvent::RawInput) => "IMAP error",
            EventType::Imap(ImapEvent::RawOutput) => "IMAP error",
            EventType::Jmap(JmapEvent::MethodCall) => "Other message",
            EventType::Jmap(JmapEvent::InvalidArguments) => "Invalid arguments",
            EventType::Jmap(JmapEvent::RequestTooLarge) => "Request too large",
            EventType::Jmap(JmapEvent::StateMismatch) => "State mismatch",
            EventType::Jmap(JmapEvent::AnchorNotFound) => "Anchor not found",
            EventType::Jmap(JmapEvent::UnsupportedFilter) => "Unsupported filter",
            EventType::Jmap(JmapEvent::UnsupportedSort) => "Unsupported sort",
            EventType::Jmap(JmapEvent::UnknownMethod) => "Unknown method",
            EventType::Jmap(JmapEvent::InvalidResultReference) => "Invalid result reference",
            EventType::Jmap(JmapEvent::Forbidden) => "Forbidden",
            EventType::Jmap(JmapEvent::AccountNotFound) => "Account not found",
            EventType::Jmap(JmapEvent::AccountNotSupportedByMethod) => "Account not supported by method",
            EventType::Jmap(JmapEvent::AccountReadOnly) => "Account read-only",
            EventType::Jmap(JmapEvent::NotFound) => "Not found",
            EventType::Jmap(JmapEvent::CannotCalculateChanges) => "Cannot calculate changes",
            EventType::Jmap(JmapEvent::UnknownDataType) => "Unknown data type",
            EventType::Jmap(JmapEvent::UnknownCapability) => "Unknown capability",
            EventType::Jmap(JmapEvent::NotJson) => "Not JSON",
            EventType::Jmap(JmapEvent::NotRequest) => "Not a request",
            EventType::Jmap(JmapEvent::WebsocketStart) => "Other message",
            EventType::Jmap(JmapEvent::WebsocketStop) => "Other message",
            EventType::Jmap(JmapEvent::WebsocketError) => "Other message",
            EventType::Limit(LimitEvent::SizeRequest) => "Request too large",
            EventType::Limit(LimitEvent::SizeUpload) => "Upload too large",
            EventType::Limit(LimitEvent::CallsIn) => "Too many calls in",
            EventType::Limit(LimitEvent::ConcurrentRequest) => "Too many concurrent requests",
            EventType::Limit(LimitEvent::ConcurrentUpload) => "Too many concurrent uploads",
            EventType::Limit(LimitEvent::ConcurrentConnection) => "Too many concurrent connections",
            EventType::Limit(LimitEvent::Quota) => "Quota exceeded",
            EventType::Limit(LimitEvent::BlobQuota) => "Blob quota exceeded",
            EventType::Limit(LimitEvent::TenantQuota) => "Tenant quota exceeded",
            EventType::Limit(LimitEvent::TooManyRequests) => "Too many requests",
            EventType::ManageSieve(ManageSieveEvent::ConnectionStart) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::ConnectionEnd) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::CreateScript) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::UpdateScript) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::GetScript) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::DeleteScript) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::RenameScript) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::CheckScript) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::HaveSpace) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::ListScripts) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::SetActive) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::Capabilities) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::StartTls) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::Unauthenticate) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::Logout) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::Noop) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::Error) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::RawInput) => "ManageSieve error",
            EventType::ManageSieve(ManageSieveEvent::RawOutput) => "ManageSieve error",
            EventType::Network(NetworkEvent::ListenStart) => "Network error",
            EventType::Network(NetworkEvent::ListenStop) => "Network error",
            EventType::Network(NetworkEvent::ListenError) => "Network error",
            EventType::Network(NetworkEvent::BindError) => "Network error",
            EventType::Network(NetworkEvent::ReadError) => "Network error",
            EventType::Network(NetworkEvent::WriteError) => "Network error",
            EventType::Network(NetworkEvent::FlushError) => "Network error",
            EventType::Network(NetworkEvent::AcceptError) => "Network error",
            EventType::Network(NetworkEvent::SplitError) => "Network error",
            EventType::Network(NetworkEvent::Timeout) => "Network error",
            EventType::Network(NetworkEvent::Closed) => "Network error",
            EventType::Network(NetworkEvent::ProxyError) => "Network error",
            EventType::Network(NetworkEvent::SetOptError) => "Network error",
            EventType::Pop3(Pop3Event::ConnectionStart) => "POP3 error",
            EventType::Pop3(Pop3Event::ConnectionEnd) => "POP3 error",
            EventType::Pop3(Pop3Event::Delete) => "POP3 error",
            EventType::Pop3(Pop3Event::Reset) => "POP3 error",
            EventType::Pop3(Pop3Event::Quit) => "POP3 error",
            EventType::Pop3(Pop3Event::Fetch) => "POP3 error",
            EventType::Pop3(Pop3Event::List) => "POP3 error",
            EventType::Pop3(Pop3Event::ListMessage) => "POP3 error",
            EventType::Pop3(Pop3Event::Uidl) => "POP3 error",
            EventType::Pop3(Pop3Event::UidlMessage) => "POP3 error",
            EventType::Pop3(Pop3Event::Stat) => "POP3 error",
            EventType::Pop3(Pop3Event::Noop) => "POP3 error",
            EventType::Pop3(Pop3Event::Capabilities) => "POP3 error",
            EventType::Pop3(Pop3Event::StartTls) => "POP3 error",
            EventType::Pop3(Pop3Event::Utf8) => "POP3 error",
            EventType::Pop3(Pop3Event::Error) => "POP3 error",
            EventType::Pop3(Pop3Event::RawInput) => "POP3 error",
            EventType::Pop3(Pop3Event::RawOutput) => "POP3 error",
            EventType::Resource(ResourceEvent::NotFound) => "Not found",
            EventType::Resource(ResourceEvent::BadParameters) => "Bad parameters",
            EventType::Resource(ResourceEvent::Error) => "Resource error",
            EventType::Resource(ResourceEvent::DownloadExternal) => "Other status",
            EventType::Security(SecurityEvent::AuthenticationBan) => "Insufficient permissions",
            EventType::Security(SecurityEvent::AbuseBan) => "Insufficient permissions",
            EventType::Security(SecurityEvent::ScanBan) => "Insufficient permissions",
            EventType::Security(SecurityEvent::LoiterBan) => "Insufficient permissions",
            EventType::Security(SecurityEvent::IpBlocked) => "Insufficient permissions",
            EventType::Security(SecurityEvent::IpBlockExpired) => "Insufficient permissions",
            EventType::Security(SecurityEvent::IpAllowExpired) => "Insufficient permissions",
            EventType::Security(SecurityEvent::IpUnauthorized) => "Unauthorized IP address",
            EventType::Security(SecurityEvent::Unauthorized) => "Insufficient permissions",
            EventType::Smtp(SmtpEvent::ConnectionStart) => "SMTP error",
            EventType::Smtp(SmtpEvent::ConnectionEnd) => "SMTP error",
            EventType::Smtp(SmtpEvent::Error) => "SMTP error",
            EventType::Smtp(SmtpEvent::IdNotFound) => "SMTP error",
            EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded) => "SMTP error",
            EventType::Smtp(SmtpEvent::TransferLimitExceeded) => "SMTP error",
            EventType::Smtp(SmtpEvent::RateLimitExceeded) => "SMTP error",
            EventType::Smtp(SmtpEvent::TimeLimitExceeded) => "SMTP error",
            EventType::Smtp(SmtpEvent::MissingAuthDirectory) => "SMTP error",
            EventType::Smtp(SmtpEvent::MessageParseFailed) => "SMTP error",
            EventType::Smtp(SmtpEvent::MessageTooLarge) => "SMTP error",
            EventType::Smtp(SmtpEvent::LoopDetected) => "SMTP error",
            EventType::Smtp(SmtpEvent::DkimPass) => "SMTP error",
            EventType::Smtp(SmtpEvent::DkimFail) => "SMTP error",
            EventType::Smtp(SmtpEvent::ArcPass) => "SMTP error",
            EventType::Smtp(SmtpEvent::ArcFail) => "SMTP error",
            EventType::Smtp(SmtpEvent::SpfEhloPass) => "SMTP error",
            EventType::Smtp(SmtpEvent::SpfEhloFail) => "SMTP error",
            EventType::Smtp(SmtpEvent::SpfFromPass) => "SMTP error",
            EventType::Smtp(SmtpEvent::SpfFromFail) => "SMTP error",
            EventType::Smtp(SmtpEvent::DmarcPass) => "SMTP error",
            EventType::Smtp(SmtpEvent::DmarcFail) => "SMTP error",
            EventType::Smtp(SmtpEvent::IprevPass) => "SMTP error",
            EventType::Smtp(SmtpEvent::IprevFail) => "SMTP error",
            EventType::Smtp(SmtpEvent::TooManyMessages) => "SMTP error",
            EventType::Smtp(SmtpEvent::Ehlo) => "SMTP error",
            EventType::Smtp(SmtpEvent::InvalidEhlo) => "SMTP error",
            EventType::Smtp(SmtpEvent::DidNotSayEhlo) => "SMTP error",
            EventType::Smtp(SmtpEvent::EhloExpected) => "SMTP error",
            EventType::Smtp(SmtpEvent::LhloExpected) => "SMTP error",
            EventType::Smtp(SmtpEvent::MailFromUnauthenticated) => "SMTP error",
            EventType::Smtp(SmtpEvent::MailFromUnauthorized) => "SMTP error",
            EventType::Smtp(SmtpEvent::MailFromNotAllowed) => "SMTP error",
            EventType::Smtp(SmtpEvent::MailFromRewritten) => "SMTP error",
            EventType::Smtp(SmtpEvent::MailFromMissing) => "SMTP error",
            EventType::Smtp(SmtpEvent::MailFrom) => "SMTP error",
            EventType::Smtp(SmtpEvent::MultipleMailFrom) => "SMTP error",
            EventType::Smtp(SmtpEvent::MailboxDoesNotExist) => "SMTP error",
            EventType::Smtp(SmtpEvent::RelayNotAllowed) => "SMTP error",
            EventType::Smtp(SmtpEvent::RcptTo) => "SMTP error",
            EventType::Smtp(SmtpEvent::RcptToDuplicate) => "SMTP error",
            EventType::Smtp(SmtpEvent::RcptToRewritten) => "SMTP error",
            EventType::Smtp(SmtpEvent::RcptToMissing) => "SMTP error",
            EventType::Smtp(SmtpEvent::RcptToGreylisted) => "SMTP error",
            EventType::Smtp(SmtpEvent::TooManyRecipients) => "SMTP error",
            EventType::Smtp(SmtpEvent::TooManyInvalidRcpt) => "SMTP error",
            EventType::Smtp(SmtpEvent::RawInput) => "SMTP error",
            EventType::Smtp(SmtpEvent::RawOutput) => "SMTP error",
            EventType::Smtp(SmtpEvent::MissingLocalHostname) => "SMTP error",
            EventType::Smtp(SmtpEvent::Vrfy) => "SMTP error",
            EventType::Smtp(SmtpEvent::VrfyNotFound) => "SMTP error",
            EventType::Smtp(SmtpEvent::VrfyDisabled) => "SMTP error",
            EventType::Smtp(SmtpEvent::Expn) => "SMTP error",
            EventType::Smtp(SmtpEvent::ExpnNotFound) => "SMTP error",
            EventType::Smtp(SmtpEvent::ExpnDisabled) => "SMTP error",
            EventType::Smtp(SmtpEvent::RequireTlsDisabled) => "SMTP error",
            EventType::Smtp(SmtpEvent::DeliverByDisabled) => "SMTP error",
            EventType::Smtp(SmtpEvent::DeliverByInvalid) => "SMTP error",
            EventType::Smtp(SmtpEvent::FutureReleaseDisabled) => "SMTP error",
            EventType::Smtp(SmtpEvent::FutureReleaseInvalid) => "SMTP error",
            EventType::Smtp(SmtpEvent::MtPriorityDisabled) => "SMTP error",
            EventType::Smtp(SmtpEvent::MtPriorityInvalid) => "SMTP error",
            EventType::Smtp(SmtpEvent::DsnDisabled) => "SMTP error",
            EventType::Smtp(SmtpEvent::AuthNotAllowed) => "SMTP error",
            EventType::Smtp(SmtpEvent::AuthMechanismNotSupported) => "SMTP error",
            EventType::Smtp(SmtpEvent::AuthExchangeTooLong) => "SMTP error",
            EventType::Smtp(SmtpEvent::AlreadyAuthenticated) => "SMTP error",
            EventType::Smtp(SmtpEvent::Noop) => "SMTP error",
            EventType::Smtp(SmtpEvent::StartTls) => "SMTP error",
            EventType::Smtp(SmtpEvent::StartTlsUnavailable) => "SMTP error",
            EventType::Smtp(SmtpEvent::StartTlsAlready) => "SMTP error",
            EventType::Smtp(SmtpEvent::Rset) => "SMTP error",
            EventType::Smtp(SmtpEvent::Quit) => "SMTP error",
            EventType::Smtp(SmtpEvent::Help) => "SMTP error",
            EventType::Smtp(SmtpEvent::CommandNotImplemented) => "SMTP error",
            EventType::Smtp(SmtpEvent::InvalidCommand) => "SMTP error",
            EventType::Smtp(SmtpEvent::InvalidSenderAddress) => "SMTP error",
            EventType::Smtp(SmtpEvent::InvalidRecipientAddress) => "SMTP error",
            EventType::Smtp(SmtpEvent::InvalidParameter) => "SMTP error",
            EventType::Smtp(SmtpEvent::UnsupportedParameter) => "SMTP error",
            EventType::Smtp(SmtpEvent::SyntaxError) => "SMTP error",
            EventType::Smtp(SmtpEvent::RequestTooLarge) => "SMTP error",
            EventType::Store(StoreEvent::AssertValueFailed) => "Another process has modified the value",
            EventType::Store(StoreEvent::FoundationdbError) => "FoundationDB error",
            EventType::Store(StoreEvent::MysqlError) => "MySQL error",
            EventType::Store(StoreEvent::PostgresqlError) => "PostgreSQL error",
            EventType::Store(StoreEvent::RocksdbError) => "RocksDB error",
            EventType::Store(StoreEvent::SqliteError) => "SQLite error",
            EventType::Store(StoreEvent::LdapError) => "LDAP error",
            EventType::Store(StoreEvent::ElasticsearchError) => "ElasticSearch error",
            EventType::Store(StoreEvent::MeilisearchError) => "Store error",
            EventType::Store(StoreEvent::RedisError) => "Redis error",
            EventType::Store(StoreEvent::S3Error) => "S3 error",
            EventType::Store(StoreEvent::AzureError) => "Azure error",
            EventType::Store(StoreEvent::FilesystemError) => "Filesystem error",
            EventType::Store(StoreEvent::PoolError) => "Connection pool error",
            EventType::Store(StoreEvent::DataCorruption) => "Data corruption",
            EventType::Store(StoreEvent::DecompressError) => "Decompression error",
            EventType::Store(StoreEvent::DeserializeError) => "Deserialization error",
            EventType::Store(StoreEvent::NotFound) => "Not found",
            EventType::Store(StoreEvent::NotConfigured) => "Not configured",
            EventType::Store(StoreEvent::NotSupported) => "Operation not supported",
            EventType::Store(StoreEvent::UnexpectedError) => "Unexpected error",
            EventType::Store(StoreEvent::CryptoError) => "Crypto error",
            EventType::Store(StoreEvent::HttpStoreError) => "Store error",
            EventType::Store(StoreEvent::CacheMiss) => "Store error",
            EventType::Store(StoreEvent::CacheHit) => "Store error",
            EventType::Store(StoreEvent::CacheStale) => "Store error",
            EventType::Store(StoreEvent::CacheUpdate) => "Store error",
            EventType::Store(StoreEvent::BlobMissingMarker) => "Blob is missing marker",
            EventType::Store(StoreEvent::DataWrite) => "Store error",
            EventType::Store(StoreEvent::DataIterate) => "Store error",
            EventType::Store(StoreEvent::BlobRead) => "Store error",
            EventType::Store(StoreEvent::BlobWrite) => "Store error",
            EventType::Store(StoreEvent::BlobDelete) => "Store error",
            EventType::Store(StoreEvent::SqlQuery) => "Store error",
            EventType::Store(StoreEvent::LdapQuery) => "Store error",
            EventType::Store(StoreEvent::LdapWarning) => "Store error",
            EventType::Store(StoreEvent::HttpStoreFetch) => "Store error",
            _ => "Internal Server Error",
        }
    }

    pub const fn variants() -> &'static [Self] {
        &[
            EventType::Acme(AcmeEvent::AuthStart),
            EventType::Acme(AcmeEvent::AuthPending),
            EventType::Acme(AcmeEvent::AuthValid),
            EventType::Acme(AcmeEvent::AuthCompleted),
            EventType::Acme(AcmeEvent::AuthError),
            EventType::Acme(AcmeEvent::AuthTooManyAttempts),
            EventType::Acme(AcmeEvent::ProcessCert),
            EventType::Acme(AcmeEvent::OrderStart),
            EventType::Acme(AcmeEvent::OrderProcessing),
            EventType::Acme(AcmeEvent::OrderCompleted),
            EventType::Acme(AcmeEvent::OrderReady),
            EventType::Acme(AcmeEvent::OrderValid),
            EventType::Acme(AcmeEvent::OrderInvalid),
            EventType::Acme(AcmeEvent::RenewBackoff),
            EventType::Acme(AcmeEvent::ClientSuppliedSni),
            EventType::Acme(AcmeEvent::ClientMissingSni),
            EventType::Acme(AcmeEvent::TlsAlpnReceived),
            EventType::Acme(AcmeEvent::TlsAlpnError),
            EventType::Acme(AcmeEvent::TokenNotFound),
            EventType::Acme(AcmeEvent::Error),
            EventType::Ai(AiEvent::LlmResponse),
            EventType::Ai(AiEvent::ApiError),
            EventType::Arc(ArcEvent::ChainTooLong),
            EventType::Arc(ArcEvent::InvalidInstance),
            EventType::Arc(ArcEvent::InvalidCv),
            EventType::Arc(ArcEvent::HasHeaderTag),
            EventType::Arc(ArcEvent::BrokenChain),
            EventType::Arc(ArcEvent::SealerNotFound),
            EventType::Auth(AuthEvent::Success),
            EventType::Auth(AuthEvent::Failed),
            EventType::Auth(AuthEvent::TokenExpired),
            EventType::Auth(AuthEvent::MfaRequired),
            EventType::Auth(AuthEvent::TooManyAttempts),
            EventType::Auth(AuthEvent::ClientRegistration),
            EventType::Auth(AuthEvent::Error),
            EventType::Auth(AuthEvent::Warning),
            EventType::Auth(AuthEvent::CredentialExpired),
            EventType::Calendar(CalendarEvent::RuleExpansionError),
            EventType::Calendar(CalendarEvent::AlarmSent),
            EventType::Calendar(CalendarEvent::AlarmSkipped),
            EventType::Calendar(CalendarEvent::AlarmRecipientOverride),
            EventType::Calendar(CalendarEvent::AlarmFailed),
            EventType::Calendar(CalendarEvent::ItipMessageSent),
            EventType::Calendar(CalendarEvent::ItipMessageReceived),
            EventType::Calendar(CalendarEvent::ItipMessageError),
            EventType::Cluster(ClusterEvent::Startup),
            EventType::Cluster(ClusterEvent::SubscriberStart),
            EventType::Cluster(ClusterEvent::SubscriberStop),
            EventType::Cluster(ClusterEvent::SubscriberError),
            EventType::Cluster(ClusterEvent::SubscriberDisconnected),
            EventType::Cluster(ClusterEvent::PublisherStart),
            EventType::Cluster(ClusterEvent::PublisherStop),
            EventType::Cluster(ClusterEvent::PublisherError),
            EventType::Cluster(ClusterEvent::MessageReceived),
            EventType::Cluster(ClusterEvent::MessageSkipped),
            EventType::Cluster(ClusterEvent::MessageInvalid),
            EventType::Cluster(ClusterEvent::NodeIdRenewed),
            EventType::Dane(DaneEvent::AuthenticationSuccess),
            EventType::Dane(DaneEvent::AuthenticationFailure),
            EventType::Dane(DaneEvent::NoCertificatesFound),
            EventType::Dane(DaneEvent::CertificateParseError),
            EventType::Dane(DaneEvent::TlsaRecordMatch),
            EventType::Dane(DaneEvent::TlsaRecordFetch),
            EventType::Dane(DaneEvent::TlsaRecordFetchError),
            EventType::Dane(DaneEvent::TlsaRecordNotFound),
            EventType::Dane(DaneEvent::TlsaRecordNotDnssecSigned),
            EventType::Dane(DaneEvent::TlsaRecordInvalid),
            EventType::Delivery(DeliveryEvent::AttemptStart),
            EventType::Delivery(DeliveryEvent::AttemptEnd),
            EventType::Delivery(DeliveryEvent::Completed),
            EventType::Delivery(DeliveryEvent::Failed),
            EventType::Delivery(DeliveryEvent::DomainDeliveryStart),
            EventType::Delivery(DeliveryEvent::MxLookup),
            EventType::Delivery(DeliveryEvent::MxLookupFailed),
            EventType::Delivery(DeliveryEvent::IpLookup),
            EventType::Delivery(DeliveryEvent::IpLookupFailed),
            EventType::Delivery(DeliveryEvent::NullMx),
            EventType::Delivery(DeliveryEvent::Connect),
            EventType::Delivery(DeliveryEvent::ConnectError),
            EventType::Delivery(DeliveryEvent::MissingOutboundHostname),
            EventType::Delivery(DeliveryEvent::GreetingFailed),
            EventType::Delivery(DeliveryEvent::Ehlo),
            EventType::Delivery(DeliveryEvent::EhloRejected),
            EventType::Delivery(DeliveryEvent::Auth),
            EventType::Delivery(DeliveryEvent::AuthFailed),
            EventType::Delivery(DeliveryEvent::MailFrom),
            EventType::Delivery(DeliveryEvent::MailFromRejected),
            EventType::Delivery(DeliveryEvent::Delivered),
            EventType::Delivery(DeliveryEvent::RcptTo),
            EventType::Delivery(DeliveryEvent::RcptToRejected),
            EventType::Delivery(DeliveryEvent::RcptToFailed),
            EventType::Delivery(DeliveryEvent::MessageRejected),
            EventType::Delivery(DeliveryEvent::StartTls),
            EventType::Delivery(DeliveryEvent::StartTlsUnavailable),
            EventType::Delivery(DeliveryEvent::StartTlsError),
            EventType::Delivery(DeliveryEvent::StartTlsDisabled),
            EventType::Delivery(DeliveryEvent::ImplicitTlsError),
            EventType::Delivery(DeliveryEvent::ConcurrencyLimitExceeded),
            EventType::Delivery(DeliveryEvent::RateLimitExceeded),
            EventType::Delivery(DeliveryEvent::DoubleBounce),
            EventType::Delivery(DeliveryEvent::DsnSuccess),
            EventType::Delivery(DeliveryEvent::DsnTempFail),
            EventType::Delivery(DeliveryEvent::DsnPermFail),
            EventType::Delivery(DeliveryEvent::RawInput),
            EventType::Delivery(DeliveryEvent::RawOutput),
            EventType::Dkim(DkimEvent::Pass),
            EventType::Dkim(DkimEvent::Neutral),
            EventType::Dkim(DkimEvent::Fail),
            EventType::Dkim(DkimEvent::PermError),
            EventType::Dkim(DkimEvent::TempError),
            EventType::Dkim(DkimEvent::None),
            EventType::Dkim(DkimEvent::UnsupportedVersion),
            EventType::Dkim(DkimEvent::UnsupportedAlgorithm),
            EventType::Dkim(DkimEvent::UnsupportedCanonicalization),
            EventType::Dkim(DkimEvent::UnsupportedKeyType),
            EventType::Dkim(DkimEvent::FailedBodyHashMatch),
            EventType::Dkim(DkimEvent::FailedVerification),
            EventType::Dkim(DkimEvent::FailedAuidMatch),
            EventType::Dkim(DkimEvent::RevokedPublicKey),
            EventType::Dkim(DkimEvent::IncompatibleAlgorithms),
            EventType::Dkim(DkimEvent::SignatureExpired),
            EventType::Dkim(DkimEvent::SignatureLength),
            EventType::Dkim(DkimEvent::SignerNotFound),
            EventType::Dkim(DkimEvent::BuildError),
            EventType::Dkim(DkimEvent::SignatureCreated),
            EventType::Dkim(DkimEvent::SignaturePublished),
            EventType::Dkim(DkimEvent::SignatureRetiring),
            EventType::Dkim(DkimEvent::SignatureRetired),
            EventType::Dkim(DkimEvent::SignatureDeleted),
            EventType::Dmarc(DmarcEvent::Pass),
            EventType::Dmarc(DmarcEvent::Fail),
            EventType::Dmarc(DmarcEvent::PermError),
            EventType::Dmarc(DmarcEvent::TempError),
            EventType::Dmarc(DmarcEvent::None),
            EventType::Dns(DnsEvent::RecordCreated),
            EventType::Dns(DnsEvent::RecordCreationFailed),
            EventType::Dns(DnsEvent::RecordDeletionFailed),
            EventType::Dns(DnsEvent::RecordNotPropagated),
            EventType::Dns(DnsEvent::RecordLookupFailed),
            EventType::Dns(DnsEvent::RecordPropagated),
            EventType::Dns(DnsEvent::RecordPropagationTimeout),
            EventType::Dns(DnsEvent::BuildError),
            EventType::Eval(EvalEvent::Result),
            EventType::Eval(EvalEvent::Error),
            EventType::Eval(EvalEvent::DirectoryNotFound),
            EventType::Eval(EvalEvent::StoreNotFound),
            EventType::Http(HttpEvent::ConnectionStart),
            EventType::Http(HttpEvent::ConnectionEnd),
            EventType::Http(HttpEvent::Error),
            EventType::Http(HttpEvent::RequestUrl),
            EventType::Http(HttpEvent::RequestBody),
            EventType::Http(HttpEvent::ResponseBody),
            EventType::Http(HttpEvent::XForwardedMissing),
            EventType::Imap(ImapEvent::ConnectionStart),
            EventType::Imap(ImapEvent::ConnectionEnd),
            EventType::Imap(ImapEvent::GetAcl),
            EventType::Imap(ImapEvent::SetAcl),
            EventType::Imap(ImapEvent::MyRights),
            EventType::Imap(ImapEvent::ListRights),
            EventType::Imap(ImapEvent::Append),
            EventType::Imap(ImapEvent::Capabilities),
            EventType::Imap(ImapEvent::Id),
            EventType::Imap(ImapEvent::Close),
            EventType::Imap(ImapEvent::Copy),
            EventType::Imap(ImapEvent::Move),
            EventType::Imap(ImapEvent::CreateMailbox),
            EventType::Imap(ImapEvent::DeleteMailbox),
            EventType::Imap(ImapEvent::RenameMailbox),
            EventType::Imap(ImapEvent::Enable),
            EventType::Imap(ImapEvent::Expunge),
            EventType::Imap(ImapEvent::Fetch),
            EventType::Imap(ImapEvent::IdleStart),
            EventType::Imap(ImapEvent::IdleStop),
            EventType::Imap(ImapEvent::List),
            EventType::Imap(ImapEvent::Lsub),
            EventType::Imap(ImapEvent::Logout),
            EventType::Imap(ImapEvent::Namespace),
            EventType::Imap(ImapEvent::Noop),
            EventType::Imap(ImapEvent::Search),
            EventType::Imap(ImapEvent::Sort),
            EventType::Imap(ImapEvent::Select),
            EventType::Imap(ImapEvent::Status),
            EventType::Imap(ImapEvent::Store),
            EventType::Imap(ImapEvent::Subscribe),
            EventType::Imap(ImapEvent::Unsubscribe),
            EventType::Imap(ImapEvent::Thread),
            EventType::Imap(ImapEvent::GetQuota),
            EventType::Imap(ImapEvent::Error),
            EventType::Imap(ImapEvent::RawInput),
            EventType::Imap(ImapEvent::RawOutput),
            EventType::IncomingReport(IncomingReportEvent::DmarcReport),
            EventType::IncomingReport(IncomingReportEvent::DmarcReportWithWarnings),
            EventType::IncomingReport(IncomingReportEvent::TlsReport),
            EventType::IncomingReport(IncomingReportEvent::TlsReportWithWarnings),
            EventType::IncomingReport(IncomingReportEvent::AbuseReport),
            EventType::IncomingReport(IncomingReportEvent::AuthFailureReport),
            EventType::IncomingReport(IncomingReportEvent::FraudReport),
            EventType::IncomingReport(IncomingReportEvent::NotSpamReport),
            EventType::IncomingReport(IncomingReportEvent::VirusReport),
            EventType::IncomingReport(IncomingReportEvent::OtherReport),
            EventType::IncomingReport(IncomingReportEvent::MessageParseFailed),
            EventType::IncomingReport(IncomingReportEvent::DmarcParseFailed),
            EventType::IncomingReport(IncomingReportEvent::TlsRpcParseFailed),
            EventType::IncomingReport(IncomingReportEvent::ArfParseFailed),
            EventType::IncomingReport(IncomingReportEvent::DecompressError),
            EventType::Iprev(IprevEvent::Pass),
            EventType::Iprev(IprevEvent::Fail),
            EventType::Iprev(IprevEvent::PermError),
            EventType::Iprev(IprevEvent::TempError),
            EventType::Iprev(IprevEvent::None),
            EventType::Jmap(JmapEvent::MethodCall),
            EventType::Jmap(JmapEvent::InvalidArguments),
            EventType::Jmap(JmapEvent::RequestTooLarge),
            EventType::Jmap(JmapEvent::StateMismatch),
            EventType::Jmap(JmapEvent::AnchorNotFound),
            EventType::Jmap(JmapEvent::UnsupportedFilter),
            EventType::Jmap(JmapEvent::UnsupportedSort),
            EventType::Jmap(JmapEvent::UnknownMethod),
            EventType::Jmap(JmapEvent::InvalidResultReference),
            EventType::Jmap(JmapEvent::Forbidden),
            EventType::Jmap(JmapEvent::AccountNotFound),
            EventType::Jmap(JmapEvent::AccountNotSupportedByMethod),
            EventType::Jmap(JmapEvent::AccountReadOnly),
            EventType::Jmap(JmapEvent::NotFound),
            EventType::Jmap(JmapEvent::CannotCalculateChanges),
            EventType::Jmap(JmapEvent::UnknownDataType),
            EventType::Jmap(JmapEvent::UnknownCapability),
            EventType::Jmap(JmapEvent::NotJson),
            EventType::Jmap(JmapEvent::NotRequest),
            EventType::Jmap(JmapEvent::WebsocketStart),
            EventType::Jmap(JmapEvent::WebsocketStop),
            EventType::Jmap(JmapEvent::WebsocketError),
            EventType::Limit(LimitEvent::SizeRequest),
            EventType::Limit(LimitEvent::SizeUpload),
            EventType::Limit(LimitEvent::CallsIn),
            EventType::Limit(LimitEvent::ConcurrentRequest),
            EventType::Limit(LimitEvent::ConcurrentUpload),
            EventType::Limit(LimitEvent::ConcurrentConnection),
            EventType::Limit(LimitEvent::Quota),
            EventType::Limit(LimitEvent::BlobQuota),
            EventType::Limit(LimitEvent::TenantQuota),
            EventType::Limit(LimitEvent::TooManyRequests),
            EventType::MailAuth(MailAuthEvent::ParseError),
            EventType::MailAuth(MailAuthEvent::MissingParameters),
            EventType::MailAuth(MailAuthEvent::NoHeadersFound),
            EventType::MailAuth(MailAuthEvent::Crypto),
            EventType::MailAuth(MailAuthEvent::Io),
            EventType::MailAuth(MailAuthEvent::Base64),
            EventType::MailAuth(MailAuthEvent::DnsError),
            EventType::MailAuth(MailAuthEvent::DnsRecordNotFound),
            EventType::MailAuth(MailAuthEvent::DnsInvalidRecordType),
            EventType::MailAuth(MailAuthEvent::PolicyNotAligned),
            EventType::ManageSieve(ManageSieveEvent::ConnectionStart),
            EventType::ManageSieve(ManageSieveEvent::ConnectionEnd),
            EventType::ManageSieve(ManageSieveEvent::CreateScript),
            EventType::ManageSieve(ManageSieveEvent::UpdateScript),
            EventType::ManageSieve(ManageSieveEvent::GetScript),
            EventType::ManageSieve(ManageSieveEvent::DeleteScript),
            EventType::ManageSieve(ManageSieveEvent::RenameScript),
            EventType::ManageSieve(ManageSieveEvent::CheckScript),
            EventType::ManageSieve(ManageSieveEvent::HaveSpace),
            EventType::ManageSieve(ManageSieveEvent::ListScripts),
            EventType::ManageSieve(ManageSieveEvent::SetActive),
            EventType::ManageSieve(ManageSieveEvent::Capabilities),
            EventType::ManageSieve(ManageSieveEvent::StartTls),
            EventType::ManageSieve(ManageSieveEvent::Unauthenticate),
            EventType::ManageSieve(ManageSieveEvent::Logout),
            EventType::ManageSieve(ManageSieveEvent::Noop),
            EventType::ManageSieve(ManageSieveEvent::Error),
            EventType::ManageSieve(ManageSieveEvent::RawInput),
            EventType::ManageSieve(ManageSieveEvent::RawOutput),
            EventType::MessageIngest(MessageIngestEvent::Ham),
            EventType::MessageIngest(MessageIngestEvent::Spam),
            EventType::MessageIngest(MessageIngestEvent::ImapAppend),
            EventType::MessageIngest(MessageIngestEvent::JmapAppend),
            EventType::MessageIngest(MessageIngestEvent::Duplicate),
            EventType::MessageIngest(MessageIngestEvent::Error),
            EventType::MessageIngest(MessageIngestEvent::SearchIndex),
            EventType::Milter(MilterEvent::Read),
            EventType::Milter(MilterEvent::Write),
            EventType::Milter(MilterEvent::ActionAccept),
            EventType::Milter(MilterEvent::ActionDiscard),
            EventType::Milter(MilterEvent::ActionReject),
            EventType::Milter(MilterEvent::ActionTempFail),
            EventType::Milter(MilterEvent::ActionReplyCode),
            EventType::Milter(MilterEvent::ActionConnectionFailure),
            EventType::Milter(MilterEvent::ActionShutdown),
            EventType::Milter(MilterEvent::IoError),
            EventType::Milter(MilterEvent::FrameTooLarge),
            EventType::Milter(MilterEvent::FrameInvalid),
            EventType::Milter(MilterEvent::UnexpectedResponse),
            EventType::Milter(MilterEvent::Timeout),
            EventType::Milter(MilterEvent::TlsInvalidName),
            EventType::Milter(MilterEvent::Disconnected),
            EventType::Milter(MilterEvent::ParseError),
            EventType::MtaHook(MtaHookEvent::ActionAccept),
            EventType::MtaHook(MtaHookEvent::ActionDiscard),
            EventType::MtaHook(MtaHookEvent::ActionReject),
            EventType::MtaHook(MtaHookEvent::ActionQuarantine),
            EventType::MtaHook(MtaHookEvent::Error),
            EventType::MtaSts(MtaStsEvent::Authorized),
            EventType::MtaSts(MtaStsEvent::NotAuthorized),
            EventType::MtaSts(MtaStsEvent::PolicyFetch),
            EventType::MtaSts(MtaStsEvent::PolicyNotFound),
            EventType::MtaSts(MtaStsEvent::PolicyFetchError),
            EventType::MtaSts(MtaStsEvent::InvalidPolicy),
            EventType::Network(NetworkEvent::ListenStart),
            EventType::Network(NetworkEvent::ListenStop),
            EventType::Network(NetworkEvent::ListenError),
            EventType::Network(NetworkEvent::BindError),
            EventType::Network(NetworkEvent::ReadError),
            EventType::Network(NetworkEvent::WriteError),
            EventType::Network(NetworkEvent::FlushError),
            EventType::Network(NetworkEvent::AcceptError),
            EventType::Network(NetworkEvent::SplitError),
            EventType::Network(NetworkEvent::Timeout),
            EventType::Network(NetworkEvent::Closed),
            EventType::Network(NetworkEvent::ProxyError),
            EventType::Network(NetworkEvent::SetOptError),
            EventType::OutgoingReport(OutgoingReportEvent::SpfReport),
            EventType::OutgoingReport(OutgoingReportEvent::SpfRateLimited),
            EventType::OutgoingReport(OutgoingReportEvent::DkimReport),
            EventType::OutgoingReport(OutgoingReportEvent::DkimRateLimited),
            EventType::OutgoingReport(OutgoingReportEvent::DmarcReport),
            EventType::OutgoingReport(OutgoingReportEvent::DmarcRateLimited),
            EventType::OutgoingReport(OutgoingReportEvent::DmarcAggregateReport),
            EventType::OutgoingReport(OutgoingReportEvent::TlsAggregate),
            EventType::OutgoingReport(OutgoingReportEvent::HttpSubmission),
            EventType::OutgoingReport(OutgoingReportEvent::UnauthorizedReportingAddress),
            EventType::OutgoingReport(OutgoingReportEvent::ReportingAddressValidationError),
            EventType::OutgoingReport(OutgoingReportEvent::NotFound),
            EventType::OutgoingReport(OutgoingReportEvent::SubmissionError),
            EventType::OutgoingReport(OutgoingReportEvent::NoRecipientsFound),
            EventType::OutgoingReport(OutgoingReportEvent::Locked),
            EventType::OutgoingReport(OutgoingReportEvent::MaxSizeExceeded),
            EventType::Pop3(Pop3Event::ConnectionStart),
            EventType::Pop3(Pop3Event::ConnectionEnd),
            EventType::Pop3(Pop3Event::Delete),
            EventType::Pop3(Pop3Event::Reset),
            EventType::Pop3(Pop3Event::Quit),
            EventType::Pop3(Pop3Event::Fetch),
            EventType::Pop3(Pop3Event::List),
            EventType::Pop3(Pop3Event::ListMessage),
            EventType::Pop3(Pop3Event::Uidl),
            EventType::Pop3(Pop3Event::UidlMessage),
            EventType::Pop3(Pop3Event::Stat),
            EventType::Pop3(Pop3Event::Noop),
            EventType::Pop3(Pop3Event::Capabilities),
            EventType::Pop3(Pop3Event::StartTls),
            EventType::Pop3(Pop3Event::Utf8),
            EventType::Pop3(Pop3Event::Error),
            EventType::Pop3(Pop3Event::RawInput),
            EventType::Pop3(Pop3Event::RawOutput),
            EventType::PushSubscription(PushSubscriptionEvent::Success),
            EventType::PushSubscription(PushSubscriptionEvent::Error),
            EventType::PushSubscription(PushSubscriptionEvent::NotFound),
            EventType::Queue(QueueEvent::Started),
            EventType::Queue(QueueEvent::MessageQueued),
            EventType::Queue(QueueEvent::AuthenticatedMessageQueued),
            EventType::Queue(QueueEvent::ReportQueued),
            EventType::Queue(QueueEvent::DsnQueued),
            EventType::Queue(QueueEvent::AutogeneratedQueued),
            EventType::Queue(QueueEvent::Rescheduled),
            EventType::Queue(QueueEvent::Locked),
            EventType::Queue(QueueEvent::BlobNotFound),
            EventType::Queue(QueueEvent::RateLimitExceeded),
            EventType::Queue(QueueEvent::ConcurrencyLimitExceeded),
            EventType::Queue(QueueEvent::QuotaExceeded),
            EventType::Queue(QueueEvent::BackPressure),
            EventType::Registry(RegistryEvent::LocalReadError),
            EventType::Registry(RegistryEvent::LocalWriteError),
            EventType::Registry(RegistryEvent::LocalParseError),
            EventType::Registry(RegistryEvent::ReadError),
            EventType::Registry(RegistryEvent::WriteError),
            EventType::Registry(RegistryEvent::DeserializationError),
            EventType::Registry(RegistryEvent::BuildError),
            EventType::Registry(RegistryEvent::BuildWarning),
            EventType::Registry(RegistryEvent::NotSupported),
            EventType::Registry(RegistryEvent::ValidationError),
            EventType::Resource(ResourceEvent::NotFound),
            EventType::Resource(ResourceEvent::BadParameters),
            EventType::Resource(ResourceEvent::Error),
            EventType::Resource(ResourceEvent::DownloadExternal),
            EventType::Resource(ResourceEvent::ApplicationUpdated),
            EventType::Resource(ResourceEvent::ApplicationUnpacked),
            EventType::Security(SecurityEvent::AuthenticationBan),
            EventType::Security(SecurityEvent::AbuseBan),
            EventType::Security(SecurityEvent::ScanBan),
            EventType::Security(SecurityEvent::LoiterBan),
            EventType::Security(SecurityEvent::IpBlocked),
            EventType::Security(SecurityEvent::IpBlockExpired),
            EventType::Security(SecurityEvent::IpAllowExpired),
            EventType::Security(SecurityEvent::IpUnauthorized),
            EventType::Security(SecurityEvent::Unauthorized),
            EventType::Server(ServerEvent::Startup),
            EventType::Server(ServerEvent::Shutdown),
            EventType::Server(ServerEvent::StartupError),
            EventType::Server(ServerEvent::ThreadError),
            EventType::Server(ServerEvent::Licensing),
            EventType::Server(ServerEvent::RecoveryMode),
            EventType::Server(ServerEvent::BootstrapMode),
            EventType::Sieve(SieveEvent::ActionAccept),
            EventType::Sieve(SieveEvent::ActionAcceptReplace),
            EventType::Sieve(SieveEvent::ActionDiscard),
            EventType::Sieve(SieveEvent::ActionReject),
            EventType::Sieve(SieveEvent::SendMessage),
            EventType::Sieve(SieveEvent::MessageTooLarge),
            EventType::Sieve(SieveEvent::ScriptNotFound),
            EventType::Sieve(SieveEvent::ListNotFound),
            EventType::Sieve(SieveEvent::RuntimeError),
            EventType::Sieve(SieveEvent::UnexpectedError),
            EventType::Sieve(SieveEvent::NotSupported),
            EventType::Sieve(SieveEvent::QuotaExceeded),
            EventType::Smtp(SmtpEvent::ConnectionStart),
            EventType::Smtp(SmtpEvent::ConnectionEnd),
            EventType::Smtp(SmtpEvent::Error),
            EventType::Smtp(SmtpEvent::IdNotFound),
            EventType::Smtp(SmtpEvent::ConcurrencyLimitExceeded),
            EventType::Smtp(SmtpEvent::TransferLimitExceeded),
            EventType::Smtp(SmtpEvent::RateLimitExceeded),
            EventType::Smtp(SmtpEvent::TimeLimitExceeded),
            EventType::Smtp(SmtpEvent::MissingAuthDirectory),
            EventType::Smtp(SmtpEvent::MessageParseFailed),
            EventType::Smtp(SmtpEvent::MessageTooLarge),
            EventType::Smtp(SmtpEvent::LoopDetected),
            EventType::Smtp(SmtpEvent::DkimPass),
            EventType::Smtp(SmtpEvent::DkimFail),
            EventType::Smtp(SmtpEvent::ArcPass),
            EventType::Smtp(SmtpEvent::ArcFail),
            EventType::Smtp(SmtpEvent::SpfEhloPass),
            EventType::Smtp(SmtpEvent::SpfEhloFail),
            EventType::Smtp(SmtpEvent::SpfFromPass),
            EventType::Smtp(SmtpEvent::SpfFromFail),
            EventType::Smtp(SmtpEvent::DmarcPass),
            EventType::Smtp(SmtpEvent::DmarcFail),
            EventType::Smtp(SmtpEvent::IprevPass),
            EventType::Smtp(SmtpEvent::IprevFail),
            EventType::Smtp(SmtpEvent::TooManyMessages),
            EventType::Smtp(SmtpEvent::Ehlo),
            EventType::Smtp(SmtpEvent::InvalidEhlo),
            EventType::Smtp(SmtpEvent::DidNotSayEhlo),
            EventType::Smtp(SmtpEvent::EhloExpected),
            EventType::Smtp(SmtpEvent::LhloExpected),
            EventType::Smtp(SmtpEvent::MailFromUnauthenticated),
            EventType::Smtp(SmtpEvent::MailFromUnauthorized),
            EventType::Smtp(SmtpEvent::MailFromNotAllowed),
            EventType::Smtp(SmtpEvent::MailFromRewritten),
            EventType::Smtp(SmtpEvent::MailFromMissing),
            EventType::Smtp(SmtpEvent::MailFrom),
            EventType::Smtp(SmtpEvent::MultipleMailFrom),
            EventType::Smtp(SmtpEvent::MailboxDoesNotExist),
            EventType::Smtp(SmtpEvent::RelayNotAllowed),
            EventType::Smtp(SmtpEvent::RcptTo),
            EventType::Smtp(SmtpEvent::RcptToDuplicate),
            EventType::Smtp(SmtpEvent::RcptToRewritten),
            EventType::Smtp(SmtpEvent::RcptToMissing),
            EventType::Smtp(SmtpEvent::RcptToGreylisted),
            EventType::Smtp(SmtpEvent::TooManyRecipients),
            EventType::Smtp(SmtpEvent::TooManyInvalidRcpt),
            EventType::Smtp(SmtpEvent::RawInput),
            EventType::Smtp(SmtpEvent::RawOutput),
            EventType::Smtp(SmtpEvent::MissingLocalHostname),
            EventType::Smtp(SmtpEvent::Vrfy),
            EventType::Smtp(SmtpEvent::VrfyNotFound),
            EventType::Smtp(SmtpEvent::VrfyDisabled),
            EventType::Smtp(SmtpEvent::Expn),
            EventType::Smtp(SmtpEvent::ExpnNotFound),
            EventType::Smtp(SmtpEvent::ExpnDisabled),
            EventType::Smtp(SmtpEvent::RequireTlsDisabled),
            EventType::Smtp(SmtpEvent::DeliverByDisabled),
            EventType::Smtp(SmtpEvent::DeliverByInvalid),
            EventType::Smtp(SmtpEvent::FutureReleaseDisabled),
            EventType::Smtp(SmtpEvent::FutureReleaseInvalid),
            EventType::Smtp(SmtpEvent::MtPriorityDisabled),
            EventType::Smtp(SmtpEvent::MtPriorityInvalid),
            EventType::Smtp(SmtpEvent::DsnDisabled),
            EventType::Smtp(SmtpEvent::AuthNotAllowed),
            EventType::Smtp(SmtpEvent::AuthMechanismNotSupported),
            EventType::Smtp(SmtpEvent::AuthExchangeTooLong),
            EventType::Smtp(SmtpEvent::AlreadyAuthenticated),
            EventType::Smtp(SmtpEvent::Noop),
            EventType::Smtp(SmtpEvent::StartTls),
            EventType::Smtp(SmtpEvent::StartTlsUnavailable),
            EventType::Smtp(SmtpEvent::StartTlsAlready),
            EventType::Smtp(SmtpEvent::Rset),
            EventType::Smtp(SmtpEvent::Quit),
            EventType::Smtp(SmtpEvent::Help),
            EventType::Smtp(SmtpEvent::CommandNotImplemented),
            EventType::Smtp(SmtpEvent::InvalidCommand),
            EventType::Smtp(SmtpEvent::InvalidSenderAddress),
            EventType::Smtp(SmtpEvent::InvalidRecipientAddress),
            EventType::Smtp(SmtpEvent::InvalidParameter),
            EventType::Smtp(SmtpEvent::UnsupportedParameter),
            EventType::Smtp(SmtpEvent::SyntaxError),
            EventType::Smtp(SmtpEvent::RequestTooLarge),
            EventType::Spam(SpamEvent::Pyzor),
            EventType::Spam(SpamEvent::PyzorError),
            EventType::Spam(SpamEvent::Dnsbl),
            EventType::Spam(SpamEvent::DnsblError),
            EventType::Spam(SpamEvent::TrainStarted),
            EventType::Spam(SpamEvent::TrainCompleted),
            EventType::Spam(SpamEvent::TrainSampleAdded),
            EventType::Spam(SpamEvent::TrainSampleNotFound),
            EventType::Spam(SpamEvent::Classify),
            EventType::Spam(SpamEvent::ModelLoaded),
            EventType::Spam(SpamEvent::ModelNotReady),
            EventType::Spam(SpamEvent::ModelNotFound),
            EventType::Spam(SpamEvent::RulesUpdated),
            EventType::Spf(SpfEvent::Pass),
            EventType::Spf(SpfEvent::Fail),
            EventType::Spf(SpfEvent::SoftFail),
            EventType::Spf(SpfEvent::Neutral),
            EventType::Spf(SpfEvent::TempError),
            EventType::Spf(SpfEvent::PermError),
            EventType::Spf(SpfEvent::None),
            EventType::Store(StoreEvent::AssertValueFailed),
            EventType::Store(StoreEvent::FoundationdbError),
            EventType::Store(StoreEvent::MysqlError),
            EventType::Store(StoreEvent::PostgresqlError),
            EventType::Store(StoreEvent::RocksdbError),
            EventType::Store(StoreEvent::SqliteError),
            EventType::Store(StoreEvent::LdapError),
            EventType::Store(StoreEvent::ElasticsearchError),
            EventType::Store(StoreEvent::MeilisearchError),
            EventType::Store(StoreEvent::RedisError),
            EventType::Store(StoreEvent::S3Error),
            EventType::Store(StoreEvent::AzureError),
            EventType::Store(StoreEvent::FilesystemError),
            EventType::Store(StoreEvent::PoolError),
            EventType::Store(StoreEvent::DataCorruption),
            EventType::Store(StoreEvent::DecompressError),
            EventType::Store(StoreEvent::DeserializeError),
            EventType::Store(StoreEvent::NotFound),
            EventType::Store(StoreEvent::NotConfigured),
            EventType::Store(StoreEvent::NotSupported),
            EventType::Store(StoreEvent::UnexpectedError),
            EventType::Store(StoreEvent::CryptoError),
            EventType::Store(StoreEvent::HttpStoreError),
            EventType::Store(StoreEvent::CacheMiss),
            EventType::Store(StoreEvent::CacheHit),
            EventType::Store(StoreEvent::CacheStale),
            EventType::Store(StoreEvent::CacheUpdate),
            EventType::Store(StoreEvent::BlobMissingMarker),
            EventType::Store(StoreEvent::DataWrite),
            EventType::Store(StoreEvent::DataIterate),
            EventType::Store(StoreEvent::BlobRead),
            EventType::Store(StoreEvent::BlobWrite),
            EventType::Store(StoreEvent::BlobDelete),
            EventType::Store(StoreEvent::SqlQuery),
            EventType::Store(StoreEvent::LdapQuery),
            EventType::Store(StoreEvent::LdapWarning),
            EventType::Store(StoreEvent::HttpStoreFetch),
            EventType::Store(StoreEvent::AutoExpunge),
            EventType::Store(StoreEvent::BlobStorePurged),
            EventType::Store(StoreEvent::DataStorePurged),
            EventType::TaskManager(TaskManagerEvent::TaskAcquired),
            EventType::TaskManager(TaskManagerEvent::TaskQueued),
            EventType::TaskManager(TaskManagerEvent::TaskScheduled),
            EventType::TaskManager(TaskManagerEvent::TaskLocked),
            EventType::TaskManager(TaskManagerEvent::TaskIgnored),
            EventType::TaskManager(TaskManagerEvent::TaskFailed),
            EventType::TaskManager(TaskManagerEvent::TaskRetry),
            EventType::TaskManager(TaskManagerEvent::BlobNotFound),
            EventType::TaskManager(TaskManagerEvent::MetadataNotFound),
            EventType::TaskManager(TaskManagerEvent::SchedulerStarted),
            EventType::TaskManager(TaskManagerEvent::ManagerStarted),
            EventType::Telemetry(TelemetryEvent::AlertEvent),
            EventType::Telemetry(TelemetryEvent::AlertMessage),
            EventType::Telemetry(TelemetryEvent::LogError),
            EventType::Telemetry(TelemetryEvent::WebhookError),
            EventType::Telemetry(TelemetryEvent::OtelExporterError),
            EventType::Telemetry(TelemetryEvent::OtelMetricsExporterError),
            EventType::Telemetry(TelemetryEvent::PrometheusExporterError),
            EventType::Telemetry(TelemetryEvent::JournalError),
            EventType::Telemetry(TelemetryEvent::MetricsCollected),
            EventType::Telemetry(TelemetryEvent::MetricsStored),
            EventType::Telemetry(TelemetryEvent::MetricsPushed),
            EventType::Tls(TlsEvent::Handshake),
            EventType::Tls(TlsEvent::HandshakeError),
            EventType::Tls(TlsEvent::NotConfigured),
            EventType::Tls(TlsEvent::CertificateNotFound),
            EventType::Tls(TlsEvent::NoCertificatesAvailable),
            EventType::Tls(TlsEvent::MultipleCertificatesAvailable),
            EventType::Tls(TlsEvent::ExpiredCertificateRemoved),
            EventType::TlsRpt(TlsRptEvent::RecordFetch),
            EventType::TlsRpt(TlsRptEvent::RecordFetchError),
            EventType::TlsRpt(TlsRptEvent::RecordNotFound),
            EventType::WebDav(WebDavEvent::Propfind),
            EventType::WebDav(WebDavEvent::Proppatch),
            EventType::WebDav(WebDavEvent::Get),
            EventType::WebDav(WebDavEvent::Head),
            EventType::WebDav(WebDavEvent::Report),
            EventType::WebDav(WebDavEvent::Mkcol),
            EventType::WebDav(WebDavEvent::Mkcalendar),
            EventType::WebDav(WebDavEvent::Delete),
            EventType::WebDav(WebDavEvent::Put),
            EventType::WebDav(WebDavEvent::Post),
            EventType::WebDav(WebDavEvent::Patch),
            EventType::WebDav(WebDavEvent::Copy),
            EventType::WebDav(WebDavEvent::Move),
            EventType::WebDav(WebDavEvent::Lock),
            EventType::WebDav(WebDavEvent::Unlock),
            EventType::WebDav(WebDavEvent::Acl),
            EventType::WebDav(WebDavEvent::Options),
            EventType::WebDav(WebDavEvent::Error),
        ]
    }
}

impl MetricType {
    pub fn parse(value: &str) -> Option<Self> {
        hashify::map! {
            value.as_bytes(),
            MetricType,
            b"acme.auth-error" => MetricType::AcmeAuthError,
            b"acme.auth-too-many-attempts" => MetricType::AcmeAuthTooManyAttempts,
            b"acme.order-completed" => MetricType::AcmeOrderCompleted,
            b"acme.order-invalid" => MetricType::AcmeOrderInvalid,
            b"acme.client-missing-sni" => MetricType::AcmeClientMissingSni,
            b"acme.tls-alpn-error" => MetricType::AcmeTlsAlpnError,
            b"acme.token-not-found" => MetricType::AcmeTokenNotFound,
            b"acme.error" => MetricType::AcmeError,
            b"arc.chain-too-long" => MetricType::ArcChainTooLong,
            b"arc.invalid-instance" => MetricType::ArcInvalidInstance,
            b"arc.invalid-cv" => MetricType::ArcInvalidCv,
            b"arc.has-header-tag" => MetricType::ArcHasHeaderTag,
            b"arc.broken-chain" => MetricType::ArcBrokenChain,
            b"auth.success" => MetricType::AuthSuccess,
            b"auth.failed" => MetricType::AuthFailed,
            b"auth.too-many-attempts" => MetricType::AuthTooManyAttempts,
            b"auth.error" => MetricType::AuthError,
            b"calendar.alarm-sent" => MetricType::CalendarAlarmSent,
            b"calendar.alarm-failed" => MetricType::CalendarAlarmFailed,
            b"calendar.itip-message-sent" => MetricType::CalendarItipMessageSent,
            b"calendar.itip-message-received" => MetricType::CalendarItipMessageReceived,
            b"calendar.itip-message-error" => MetricType::CalendarItipMessageError,
            b"cluster.subscriber-error" => MetricType::ClusterSubscriberError,
            b"cluster.subscriber-disconnected" => MetricType::ClusterSubscriberDisconnected,
            b"cluster.publisher-error" => MetricType::ClusterPublisherError,
            b"dane.authentication-success" => MetricType::DaneAuthenticationSuccess,
            b"dane.authentication-failure" => MetricType::DaneAuthenticationFailure,
            b"dane.no-certificates-found" => MetricType::DaneNoCertificatesFound,
            b"dane.certificate-parse-error" => MetricType::DaneCertificateParseError,
            b"dane.tlsa-record-fetch-error" => MetricType::DaneTlsaRecordFetchError,
            b"dane.tlsa-record-not-found" => MetricType::DaneTlsaRecordNotFound,
            b"dane.tlsa-record-not-dnssec-signed" => MetricType::DaneTlsaRecordNotDnssecSigned,
            b"dane.tlsa-record-invalid" => MetricType::DaneTlsaRecordInvalid,
            b"delivery.total-time" => MetricType::DeliveryTotalTime,
            b"delivery.attempt-time" => MetricType::DeliveryAttemptTime,
            b"delivery.active-connections" => MetricType::DeliveryActiveConnections,
            b"delivery.attempt-start" => MetricType::DeliveryAttemptStart,
            b"delivery.attempt-end" => MetricType::DeliveryAttemptEnd,
            b"delivery.completed" => MetricType::DeliveryCompleted,
            b"delivery.mx-lookup-failed" => MetricType::DeliveryMxLookupFailed,
            b"delivery.ip-lookup-failed" => MetricType::DeliveryIpLookupFailed,
            b"delivery.null-mx" => MetricType::DeliveryNullMx,
            b"delivery.greeting-failed" => MetricType::DeliveryGreetingFailed,
            b"delivery.ehlo-rejected" => MetricType::DeliveryEhloRejected,
            b"delivery.auth-failed" => MetricType::DeliveryAuthFailed,
            b"delivery.mail-from-rejected" => MetricType::DeliveryMailFromRejected,
            b"delivery.delivered" => MetricType::DeliveryDelivered,
            b"delivery.rcpt-to-rejected" => MetricType::DeliveryRcptToRejected,
            b"delivery.rcpt-to-failed" => MetricType::DeliveryRcptToFailed,
            b"delivery.message-rejected" => MetricType::DeliveryMessageRejected,
            b"delivery.start-tls-unavailable" => MetricType::DeliveryStartTlsUnavailable,
            b"delivery.start-tls-error" => MetricType::DeliveryStartTlsError,
            b"delivery.start-tls-disabled" => MetricType::DeliveryStartTlsDisabled,
            b"delivery.implicit-tls-error" => MetricType::DeliveryImplicitTlsError,
            b"delivery.concurrency-limit-exceeded" => MetricType::DeliveryConcurrencyLimitExceeded,
            b"delivery.rate-limit-exceeded" => MetricType::DeliveryRateLimitExceeded,
            b"delivery.double-bounce" => MetricType::DeliveryDoubleBounce,
            b"delivery.dsn-success" => MetricType::DeliveryDsnSuccess,
            b"delivery.dsn-temp-fail" => MetricType::DeliveryDsnTempFail,
            b"delivery.dsn-perm-fail" => MetricType::DeliveryDsnPermFail,
            b"dkim.pass" => MetricType::DkimPass,
            b"dkim.neutral" => MetricType::DkimNeutral,
            b"dkim.fail" => MetricType::DkimFail,
            b"dkim.perm-error" => MetricType::DkimPermError,
            b"dkim.temp-error" => MetricType::DkimTempError,
            b"dkim.none" => MetricType::DkimNone,
            b"dkim.unsupported-version" => MetricType::DkimUnsupportedVersion,
            b"dkim.unsupported-algorithm" => MetricType::DkimUnsupportedAlgorithm,
            b"dkim.unsupported-canonicalization" => MetricType::DkimUnsupportedCanonicalization,
            b"dkim.unsupported-key-type" => MetricType::DkimUnsupportedKeyType,
            b"dkim.failed-body-hash-match" => MetricType::DkimFailedBodyHashMatch,
            b"dkim.failed-verification" => MetricType::DkimFailedVerification,
            b"dkim.failed-auid-match" => MetricType::DkimFailedAuidMatch,
            b"dkim.revoked-public-key" => MetricType::DkimRevokedPublicKey,
            b"dkim.incompatible-algorithms" => MetricType::DkimIncompatibleAlgorithms,
            b"dkim.signature-expired" => MetricType::DkimSignatureExpired,
            b"dkim.signature-length" => MetricType::DkimSignatureLength,
            b"dkim.signer-not-found" => MetricType::DkimSignerNotFound,
            b"dmarc.pass" => MetricType::DmarcPass,
            b"dmarc.fail" => MetricType::DmarcFail,
            b"dmarc.perm-error" => MetricType::DmarcPermError,
            b"dmarc.temp-error" => MetricType::DmarcTempError,
            b"dmarc.none" => MetricType::DmarcNone,
            b"dns.lookup-time" => MetricType::DnsLookupTime,
            b"dns.record-creation-failed" => MetricType::DnsRecordCreationFailed,
            b"dns.record-deletion-failed" => MetricType::DnsRecordDeletionFailed,
            b"dns.record-lookup-failed" => MetricType::DnsRecordLookupFailed,
            b"dns.record-propagation-timeout" => MetricType::DnsRecordPropagationTimeout,
            b"domain.count" => MetricType::DomainCount,
            b"eval.error" => MetricType::EvalError,
            b"eval.directory-not-found" => MetricType::EvalDirectoryNotFound,
            b"eval.store-not-found" => MetricType::EvalStoreNotFound,
            b"http.request-time" => MetricType::HttpRequestTime,
            b"http.active-connections" => MetricType::HttpActiveConnections,
            b"http.connection-start" => MetricType::HttpConnectionStart,
            b"http.error" => MetricType::HttpError,
            b"http.request-body" => MetricType::HttpRequestBody,
            b"http.response-body" => MetricType::HttpResponseBody,
            b"http.x-forwarded-missing" => MetricType::HttpXForwardedMissing,
            b"imap.request-time" => MetricType::ImapRequestTime,
            b"imap.active-connections" => MetricType::ImapActiveConnections,
            b"imap.connection-start" => MetricType::ImapConnectionStart,
            b"imap.connection-end" => MetricType::ImapConnectionEnd,
            b"incoming-report.dmarc-report" => MetricType::IncomingReportDmarcReport,
            b"incoming-report.dmarc-report-with-warnings" => MetricType::IncomingReportDmarcReportWithWarnings,
            b"incoming-report.tls-report" => MetricType::IncomingReportTlsReport,
            b"incoming-report.tls-report-with-warnings" => MetricType::IncomingReportTlsReportWithWarnings,
            b"incoming-report.abuse-report" => MetricType::IncomingReportAbuseReport,
            b"incoming-report.auth-failure-report" => MetricType::IncomingReportAuthFailureReport,
            b"incoming-report.fraud-report" => MetricType::IncomingReportFraudReport,
            b"incoming-report.not-spam-report" => MetricType::IncomingReportNotSpamReport,
            b"incoming-report.virus-report" => MetricType::IncomingReportVirusReport,
            b"incoming-report.other-report" => MetricType::IncomingReportOtherReport,
            b"incoming-report.message-parse-failed" => MetricType::IncomingReportMessageParseFailed,
            b"incoming-report.dmarc-parse-failed" => MetricType::IncomingReportDmarcParseFailed,
            b"incoming-report.tls-rpc-parse-failed" => MetricType::IncomingReportTlsRpcParseFailed,
            b"incoming-report.arf-parse-failed" => MetricType::IncomingReportArfParseFailed,
            b"incoming-report.decompress-error" => MetricType::IncomingReportDecompressError,
            b"iprev.pass" => MetricType::IprevPass,
            b"iprev.fail" => MetricType::IprevFail,
            b"iprev.perm-error" => MetricType::IprevPermError,
            b"iprev.temp-error" => MetricType::IprevTempError,
            b"iprev.none" => MetricType::IprevNone,
            b"jmap.method-call" => MetricType::JmapMethodCall,
            b"jmap.invalid-arguments" => MetricType::JmapInvalidArguments,
            b"jmap.request-too-large" => MetricType::JmapRequestTooLarge,
            b"jmap.unsupported-filter" => MetricType::JmapUnsupportedFilter,
            b"jmap.unsupported-sort" => MetricType::JmapUnsupportedSort,
            b"jmap.unknown-method" => MetricType::JmapUnknownMethod,
            b"jmap.forbidden" => MetricType::JmapForbidden,
            b"jmap.not-json" => MetricType::JmapNotJson,
            b"jmap.not-request" => MetricType::JmapNotRequest,
            b"jmap.websocket-start" => MetricType::JmapWebsocketStart,
            b"jmap.websocket-error" => MetricType::JmapWebsocketError,
            b"limit.size-request" => MetricType::LimitSizeRequest,
            b"limit.size-upload" => MetricType::LimitSizeUpload,
            b"limit.calls-in" => MetricType::LimitCallsIn,
            b"limit.concurrent-request" => MetricType::LimitConcurrentRequest,
            b"limit.concurrent-upload" => MetricType::LimitConcurrentUpload,
            b"limit.concurrent-connection" => MetricType::LimitConcurrentConnection,
            b"limit.quota" => MetricType::LimitQuota,
            b"limit.blob-quota" => MetricType::LimitBlobQuota,
            b"limit.tenant-quota" => MetricType::LimitTenantQuota,
            b"limit.too-many-requests" => MetricType::LimitTooManyRequests,
            b"mail-auth.parse-error" => MetricType::MailAuthParseError,
            b"mail-auth.missing-parameters" => MetricType::MailAuthMissingParameters,
            b"mail-auth.no-headers-found" => MetricType::MailAuthNoHeadersFound,
            b"mail-auth.crypto" => MetricType::MailAuthCrypto,
            b"mail-auth.io" => MetricType::MailAuthIo,
            b"mail-auth.base64" => MetricType::MailAuthBase64,
            b"mail-auth.dns-error" => MetricType::MailAuthDnsError,
            b"mail-auth.dns-record-not-found" => MetricType::MailAuthDnsRecordNotFound,
            b"mail-auth.dns-invalid-record-type" => MetricType::MailAuthDnsInvalidRecordType,
            b"mail-auth.policy-not-aligned" => MetricType::MailAuthPolicyNotAligned,
            b"manage-sieve.connection-start" => MetricType::ManageSieveConnectionStart,
            b"manage-sieve.connection-end" => MetricType::ManageSieveConnectionEnd,
            b"message.size" => MetricType::MessageSize,
            b"message.authenticated-size" => MetricType::MessageAuthenticatedSize,
            b"message-ingest.time" => MetricType::MessageIngestTime,
            b"message-ingest.index-time" => MetricType::MessageIngestIndexTime,
            b"message-ingest.ham" => MetricType::MessageIngestHam,
            b"message-ingest.spam" => MetricType::MessageIngestSpam,
            b"message-ingest.imap-append" => MetricType::MessageIngestImapAppend,
            b"message-ingest.jmap-append" => MetricType::MessageIngestJmapAppend,
            b"message-ingest.duplicate" => MetricType::MessageIngestDuplicate,
            b"message-ingest.error" => MetricType::MessageIngestError,
            b"message-ingest.search-index" => MetricType::MessageIngestSearchIndex,
            b"milter.action-accept" => MetricType::MilterActionAccept,
            b"milter.action-discard" => MetricType::MilterActionDiscard,
            b"milter.action-reject" => MetricType::MilterActionReject,
            b"milter.action-temp-fail" => MetricType::MilterActionTempFail,
            b"milter.action-reply-code" => MetricType::MilterActionReplyCode,
            b"milter.action-connection-failure" => MetricType::MilterActionConnectionFailure,
            b"milter.action-shutdown" => MetricType::MilterActionShutdown,
            b"mta-hook.action-accept" => MetricType::MtaHookActionAccept,
            b"mta-hook.action-discard" => MetricType::MtaHookActionDiscard,
            b"mta-hook.action-reject" => MetricType::MtaHookActionReject,
            b"mta-hook.action-quarantine" => MetricType::MtaHookActionQuarantine,
            b"mta-hook.error" => MetricType::MtaHookError,
            b"mta-sts.authorized" => MetricType::MtaStsAuthorized,
            b"mta-sts.not-authorized" => MetricType::MtaStsNotAuthorized,
            b"mta-sts.invalid-policy" => MetricType::MtaStsInvalidPolicy,
            b"network.timeout" => MetricType::NetworkTimeout,
            b"outgoing-report.size" => MetricType::OutgoingReportSize,
            b"outgoing-report.spf-report" => MetricType::OutgoingReportSpfReport,
            b"outgoing-report.spf-rate-limited" => MetricType::OutgoingReportSpfRateLimited,
            b"outgoing-report.dkim-report" => MetricType::OutgoingReportDkimReport,
            b"outgoing-report.dkim-rate-limited" => MetricType::OutgoingReportDkimRateLimited,
            b"outgoing-report.dmarc-report" => MetricType::OutgoingReportDmarcReport,
            b"outgoing-report.dmarc-rate-limited" => MetricType::OutgoingReportDmarcRateLimited,
            b"outgoing-report.dmarc-aggregate-report" => MetricType::OutgoingReportDmarcAggregateReport,
            b"outgoing-report.tls-aggregate" => MetricType::OutgoingReportTlsAggregate,
            b"outgoing-report.http-submission" => MetricType::OutgoingReportHttpSubmission,
            b"outgoing-report.unauthorized-reporting-address" => MetricType::OutgoingReportUnauthorizedReportingAddress,
            b"outgoing-report.reporting-address-validation-error" => MetricType::OutgoingReportReportingAddressValidationError,
            b"outgoing-report.not-found" => MetricType::OutgoingReportNotFound,
            b"outgoing-report.submission-error" => MetricType::OutgoingReportSubmissionError,
            b"outgoing-report.no-recipients-found" => MetricType::OutgoingReportNoRecipientsFound,
            b"pop3.request-time" => MetricType::Pop3RequestTime,
            b"pop3.active-connections" => MetricType::Pop3ActiveConnections,
            b"pop3.connection-start" => MetricType::Pop3ConnectionStart,
            b"pop3.connection-end" => MetricType::Pop3ConnectionEnd,
            b"push-subscription.success" => MetricType::PushSubscriptionSuccess,
            b"push-subscription.error" => MetricType::PushSubscriptionError,
            b"push-subscription.not-found" => MetricType::PushSubscriptionNotFound,
            b"queue.count" => MetricType::QueueCount,
            b"queue.message-queued" => MetricType::QueueMessageQueued,
            b"queue.authenticated-message-queued" => MetricType::QueueAuthenticatedMessageQueued,
            b"queue.report-queued" => MetricType::QueueReportQueued,
            b"queue.dsn-queued" => MetricType::QueueDsnQueued,
            b"queue.autogenerated-queued" => MetricType::QueueAutogeneratedQueued,
            b"queue.rescheduled" => MetricType::QueueRescheduled,
            b"queue.blob-not-found" => MetricType::QueueBlobNotFound,
            b"queue.rate-limit-exceeded" => MetricType::QueueRateLimitExceeded,
            b"queue.concurrency-limit-exceeded" => MetricType::QueueConcurrencyLimitExceeded,
            b"queue.quota-exceeded" => MetricType::QueueQuotaExceeded,
            b"resource.not-found" => MetricType::ResourceNotFound,
            b"resource.bad-parameters" => MetricType::ResourceBadParameters,
            b"resource.error" => MetricType::ResourceError,
            b"security.authentication-ban" => MetricType::SecurityAuthenticationBan,
            b"security.abuse-ban" => MetricType::SecurityAbuseBan,
            b"security.scan-ban" => MetricType::SecurityScanBan,
            b"security.loiter-ban" => MetricType::SecurityLoiterBan,
            b"security.ip-blocked" => MetricType::SecurityIpBlocked,
            b"security.unauthorized" => MetricType::SecurityUnauthorized,
            b"server.memory" => MetricType::ServerMemory,
            b"server.thread-error" => MetricType::ServerThreadError,
            b"sieve.request-time" => MetricType::SieveRequestTime,
            b"sieve.active-connections" => MetricType::SieveActiveConnections,
            b"sieve.action-accept" => MetricType::SieveActionAccept,
            b"sieve.action-accept-replace" => MetricType::SieveActionAcceptReplace,
            b"sieve.action-discard" => MetricType::SieveActionDiscard,
            b"sieve.action-reject" => MetricType::SieveActionReject,
            b"sieve.send-message" => MetricType::SieveSendMessage,
            b"sieve.message-too-large" => MetricType::SieveMessageTooLarge,
            b"sieve.runtime-error" => MetricType::SieveRuntimeError,
            b"sieve.unexpected-error" => MetricType::SieveUnexpectedError,
            b"sieve.not-supported" => MetricType::SieveNotSupported,
            b"sieve.quota-exceeded" => MetricType::SieveQuotaExceeded,
            b"smtp.request-time" => MetricType::SmtpRequestTime,
            b"smtp.active-connections" => MetricType::SmtpActiveConnections,
            b"smtp.connection-start" => MetricType::SmtpConnectionStart,
            b"smtp.connection-end" => MetricType::SmtpConnectionEnd,
            b"smtp.error" => MetricType::SmtpError,
            b"smtp.concurrency-limit-exceeded" => MetricType::SmtpConcurrencyLimitExceeded,
            b"smtp.transfer-limit-exceeded" => MetricType::SmtpTransferLimitExceeded,
            b"smtp.rate-limit-exceeded" => MetricType::SmtpRateLimitExceeded,
            b"smtp.time-limit-exceeded" => MetricType::SmtpTimeLimitExceeded,
            b"smtp.message-parse-failed" => MetricType::SmtpMessageParseFailed,
            b"smtp.message-too-large" => MetricType::SmtpMessageTooLarge,
            b"smtp.loop-detected" => MetricType::SmtpLoopDetected,
            b"smtp.dkim-pass" => MetricType::SmtpDkimPass,
            b"smtp.dkim-fail" => MetricType::SmtpDkimFail,
            b"smtp.arc-pass" => MetricType::SmtpArcPass,
            b"smtp.arc-fail" => MetricType::SmtpArcFail,
            b"smtp.spf-ehlo-pass" => MetricType::SmtpSpfEhloPass,
            b"smtp.spf-ehlo-fail" => MetricType::SmtpSpfEhloFail,
            b"smtp.spf-from-pass" => MetricType::SmtpSpfFromPass,
            b"smtp.spf-from-fail" => MetricType::SmtpSpfFromFail,
            b"smtp.dmarc-pass" => MetricType::SmtpDmarcPass,
            b"smtp.dmarc-fail" => MetricType::SmtpDmarcFail,
            b"smtp.iprev-pass" => MetricType::SmtpIprevPass,
            b"smtp.iprev-fail" => MetricType::SmtpIprevFail,
            b"smtp.too-many-messages" => MetricType::SmtpTooManyMessages,
            b"smtp.invalid-ehlo" => MetricType::SmtpInvalidEhlo,
            b"smtp.did-not-say-ehlo" => MetricType::SmtpDidNotSayEhlo,
            b"smtp.mail-from-unauthenticated" => MetricType::SmtpMailFromUnauthenticated,
            b"smtp.mail-from-unauthorized" => MetricType::SmtpMailFromUnauthorized,
            b"smtp.mail-from-missing" => MetricType::SmtpMailFromMissing,
            b"smtp.multiple-mail-from" => MetricType::SmtpMultipleMailFrom,
            b"smtp.mailbox-does-not-exist" => MetricType::SmtpMailboxDoesNotExist,
            b"smtp.relay-not-allowed" => MetricType::SmtpRelayNotAllowed,
            b"smtp.rcpt-to-duplicate" => MetricType::SmtpRcptToDuplicate,
            b"smtp.rcpt-to-missing" => MetricType::SmtpRcptToMissing,
            b"smtp.too-many-recipients" => MetricType::SmtpTooManyRecipients,
            b"smtp.too-many-invalid-rcpt" => MetricType::SmtpTooManyInvalidRcpt,
            b"smtp.auth-mechanism-not-supported" => MetricType::SmtpAuthMechanismNotSupported,
            b"smtp.auth-exchange-too-long" => MetricType::SmtpAuthExchangeTooLong,
            b"smtp.command-not-implemented" => MetricType::SmtpCommandNotImplemented,
            b"smtp.invalid-command" => MetricType::SmtpInvalidCommand,
            b"smtp.syntax-error" => MetricType::SmtpSyntaxError,
            b"smtp.request-too-large" => MetricType::SmtpRequestTooLarge,
            b"spam.pyzor-error" => MetricType::SpamPyzorError,
            b"spam.dnsbl-error" => MetricType::SpamDnsblError,
            b"spam.train-completed" => MetricType::SpamTrainCompleted,
            b"spam.train-sample-added" => MetricType::SpamTrainSampleAdded,
            b"spam.classify" => MetricType::SpamClassify,
            b"spam.model-not-ready" => MetricType::SpamModelNotReady,
            b"spf.pass" => MetricType::SpfPass,
            b"spf.fail" => MetricType::SpfFail,
            b"spf.soft-fail" => MetricType::SpfSoftFail,
            b"spf.neutral" => MetricType::SpfNeutral,
            b"spf.temp-error" => MetricType::SpfTempError,
            b"spf.perm-error" => MetricType::SpfPermError,
            b"spf.none" => MetricType::SpfNone,
            b"store.data-read-time" => MetricType::StoreDataReadTime,
            b"store.data-write-time" => MetricType::StoreDataWriteTime,
            b"store.blob-read-time" => MetricType::StoreBlobReadTime,
            b"store.blob-write-time" => MetricType::StoreBlobWriteTime,
            b"store.assert-value-failed" => MetricType::StoreAssertValueFailed,
            b"store.foundationdb-error" => MetricType::StoreFoundationdbError,
            b"store.mysql-error" => MetricType::StoreMysqlError,
            b"store.postgresql-error" => MetricType::StorePostgresqlError,
            b"store.rocksdb-error" => MetricType::StoreRocksdbError,
            b"store.sqlite-error" => MetricType::StoreSqliteError,
            b"store.ldap-error" => MetricType::StoreLdapError,
            b"store.elasticsearch-error" => MetricType::StoreElasticsearchError,
            b"store.redis-error" => MetricType::StoreRedisError,
            b"store.s3-error" => MetricType::StoreS3Error,
            b"store.azure-error" => MetricType::StoreAzureError,
            b"store.filesystem-error" => MetricType::StoreFilesystemError,
            b"store.pool-error" => MetricType::StorePoolError,
            b"store.data-corruption" => MetricType::StoreDataCorruption,
            b"store.decompress-error" => MetricType::StoreDecompressError,
            b"store.deserialize-error" => MetricType::StoreDeserializeError,
            b"store.not-found" => MetricType::StoreNotFound,
            b"store.not-configured" => MetricType::StoreNotConfigured,
            b"store.not-supported" => MetricType::StoreNotSupported,
            b"store.unexpected-error" => MetricType::StoreUnexpectedError,
            b"store.crypto-error" => MetricType::StoreCryptoError,
            b"store.http-store-error" => MetricType::StoreHttpStoreError,
            b"store.blob-missing-marker" => MetricType::StoreBlobMissingMarker,
            b"store.data-write" => MetricType::StoreDataWrite,
            b"store.data-iterate" => MetricType::StoreDataIterate,
            b"store.blob-read" => MetricType::StoreBlobRead,
            b"store.blob-write" => MetricType::StoreBlobWrite,
            b"store.blob-delete" => MetricType::StoreBlobDelete,
            b"task-manager.blob-not-found" => MetricType::TaskManagerBlobNotFound,
            b"task-manager.metadata-not-found" => MetricType::TaskManagerMetadataNotFound,
            b"telemetry.alert-event" => MetricType::TelemetryAlertEvent,
            b"telemetry.alert-message" => MetricType::TelemetryAlertMessage,
            b"telemetry.log-error" => MetricType::TelemetryLogError,
            b"telemetry.webhook-error" => MetricType::TelemetryWebhookError,
            b"telemetry.otel-exporter-error" => MetricType::TelemetryOtelExporterError,
            b"telemetry.otel-metrics-exporter-error" => MetricType::TelemetryOtelMetricsExporterError,
            b"telemetry.prometheus-exporter-error" => MetricType::TelemetryPrometheusExporterError,
            b"telemetry.journal-error" => MetricType::TelemetryJournalError,
            b"tls.handshake-error" => MetricType::TlsHandshakeError,
            b"user.count" => MetricType::UserCount,
        }
        .copied()
    }

    pub fn as_str(&self) -> &'static str {
        match self {
            MetricType::AcmeAuthError => "acme.auth-error",
            MetricType::AcmeAuthTooManyAttempts => "acme.auth-too-many-attempts",
            MetricType::AcmeOrderCompleted => "acme.order-completed",
            MetricType::AcmeOrderInvalid => "acme.order-invalid",
            MetricType::AcmeClientMissingSni => "acme.client-missing-sni",
            MetricType::AcmeTlsAlpnError => "acme.tls-alpn-error",
            MetricType::AcmeTokenNotFound => "acme.token-not-found",
            MetricType::AcmeError => "acme.error",
            MetricType::ArcChainTooLong => "arc.chain-too-long",
            MetricType::ArcInvalidInstance => "arc.invalid-instance",
            MetricType::ArcInvalidCv => "arc.invalid-cv",
            MetricType::ArcHasHeaderTag => "arc.has-header-tag",
            MetricType::ArcBrokenChain => "arc.broken-chain",
            MetricType::AuthSuccess => "auth.success",
            MetricType::AuthFailed => "auth.failed",
            MetricType::AuthTooManyAttempts => "auth.too-many-attempts",
            MetricType::AuthError => "auth.error",
            MetricType::CalendarAlarmSent => "calendar.alarm-sent",
            MetricType::CalendarAlarmFailed => "calendar.alarm-failed",
            MetricType::CalendarItipMessageSent => "calendar.itip-message-sent",
            MetricType::CalendarItipMessageReceived => "calendar.itip-message-received",
            MetricType::CalendarItipMessageError => "calendar.itip-message-error",
            MetricType::ClusterSubscriberError => "cluster.subscriber-error",
            MetricType::ClusterSubscriberDisconnected => "cluster.subscriber-disconnected",
            MetricType::ClusterPublisherError => "cluster.publisher-error",
            MetricType::DaneAuthenticationSuccess => "dane.authentication-success",
            MetricType::DaneAuthenticationFailure => "dane.authentication-failure",
            MetricType::DaneNoCertificatesFound => "dane.no-certificates-found",
            MetricType::DaneCertificateParseError => "dane.certificate-parse-error",
            MetricType::DaneTlsaRecordFetchError => "dane.tlsa-record-fetch-error",
            MetricType::DaneTlsaRecordNotFound => "dane.tlsa-record-not-found",
            MetricType::DaneTlsaRecordNotDnssecSigned => "dane.tlsa-record-not-dnssec-signed",
            MetricType::DaneTlsaRecordInvalid => "dane.tlsa-record-invalid",
            MetricType::DeliveryTotalTime => "delivery.total-time",
            MetricType::DeliveryAttemptTime => "delivery.attempt-time",
            MetricType::DeliveryActiveConnections => "delivery.active-connections",
            MetricType::DeliveryAttemptStart => "delivery.attempt-start",
            MetricType::DeliveryAttemptEnd => "delivery.attempt-end",
            MetricType::DeliveryCompleted => "delivery.completed",
            MetricType::DeliveryMxLookupFailed => "delivery.mx-lookup-failed",
            MetricType::DeliveryIpLookupFailed => "delivery.ip-lookup-failed",
            MetricType::DeliveryNullMx => "delivery.null-mx",
            MetricType::DeliveryGreetingFailed => "delivery.greeting-failed",
            MetricType::DeliveryEhloRejected => "delivery.ehlo-rejected",
            MetricType::DeliveryAuthFailed => "delivery.auth-failed",
            MetricType::DeliveryMailFromRejected => "delivery.mail-from-rejected",
            MetricType::DeliveryDelivered => "delivery.delivered",
            MetricType::DeliveryRcptToRejected => "delivery.rcpt-to-rejected",
            MetricType::DeliveryRcptToFailed => "delivery.rcpt-to-failed",
            MetricType::DeliveryMessageRejected => "delivery.message-rejected",
            MetricType::DeliveryStartTlsUnavailable => "delivery.start-tls-unavailable",
            MetricType::DeliveryStartTlsError => "delivery.start-tls-error",
            MetricType::DeliveryStartTlsDisabled => "delivery.start-tls-disabled",
            MetricType::DeliveryImplicitTlsError => "delivery.implicit-tls-error",
            MetricType::DeliveryConcurrencyLimitExceeded => "delivery.concurrency-limit-exceeded",
            MetricType::DeliveryRateLimitExceeded => "delivery.rate-limit-exceeded",
            MetricType::DeliveryDoubleBounce => "delivery.double-bounce",
            MetricType::DeliveryDsnSuccess => "delivery.dsn-success",
            MetricType::DeliveryDsnTempFail => "delivery.dsn-temp-fail",
            MetricType::DeliveryDsnPermFail => "delivery.dsn-perm-fail",
            MetricType::DkimPass => "dkim.pass",
            MetricType::DkimNeutral => "dkim.neutral",
            MetricType::DkimFail => "dkim.fail",
            MetricType::DkimPermError => "dkim.perm-error",
            MetricType::DkimTempError => "dkim.temp-error",
            MetricType::DkimNone => "dkim.none",
            MetricType::DkimUnsupportedVersion => "dkim.unsupported-version",
            MetricType::DkimUnsupportedAlgorithm => "dkim.unsupported-algorithm",
            MetricType::DkimUnsupportedCanonicalization => "dkim.unsupported-canonicalization",
            MetricType::DkimUnsupportedKeyType => "dkim.unsupported-key-type",
            MetricType::DkimFailedBodyHashMatch => "dkim.failed-body-hash-match",
            MetricType::DkimFailedVerification => "dkim.failed-verification",
            MetricType::DkimFailedAuidMatch => "dkim.failed-auid-match",
            MetricType::DkimRevokedPublicKey => "dkim.revoked-public-key",
            MetricType::DkimIncompatibleAlgorithms => "dkim.incompatible-algorithms",
            MetricType::DkimSignatureExpired => "dkim.signature-expired",
            MetricType::DkimSignatureLength => "dkim.signature-length",
            MetricType::DkimSignerNotFound => "dkim.signer-not-found",
            MetricType::DmarcPass => "dmarc.pass",
            MetricType::DmarcFail => "dmarc.fail",
            MetricType::DmarcPermError => "dmarc.perm-error",
            MetricType::DmarcTempError => "dmarc.temp-error",
            MetricType::DmarcNone => "dmarc.none",
            MetricType::DnsLookupTime => "dns.lookup-time",
            MetricType::DnsRecordCreationFailed => "dns.record-creation-failed",
            MetricType::DnsRecordDeletionFailed => "dns.record-deletion-failed",
            MetricType::DnsRecordLookupFailed => "dns.record-lookup-failed",
            MetricType::DnsRecordPropagationTimeout => "dns.record-propagation-timeout",
            MetricType::DomainCount => "domain.count",
            MetricType::EvalError => "eval.error",
            MetricType::EvalDirectoryNotFound => "eval.directory-not-found",
            MetricType::EvalStoreNotFound => "eval.store-not-found",
            MetricType::HttpRequestTime => "http.request-time",
            MetricType::HttpActiveConnections => "http.active-connections",
            MetricType::HttpConnectionStart => "http.connection-start",
            MetricType::HttpError => "http.error",
            MetricType::HttpRequestBody => "http.request-body",
            MetricType::HttpResponseBody => "http.response-body",
            MetricType::HttpXForwardedMissing => "http.x-forwarded-missing",
            MetricType::ImapRequestTime => "imap.request-time",
            MetricType::ImapActiveConnections => "imap.active-connections",
            MetricType::ImapConnectionStart => "imap.connection-start",
            MetricType::ImapConnectionEnd => "imap.connection-end",
            MetricType::IncomingReportDmarcReport => "incoming-report.dmarc-report",
            MetricType::IncomingReportDmarcReportWithWarnings => {
                "incoming-report.dmarc-report-with-warnings"
            }
            MetricType::IncomingReportTlsReport => "incoming-report.tls-report",
            MetricType::IncomingReportTlsReportWithWarnings => {
                "incoming-report.tls-report-with-warnings"
            }
            MetricType::IncomingReportAbuseReport => "incoming-report.abuse-report",
            MetricType::IncomingReportAuthFailureReport => "incoming-report.auth-failure-report",
            MetricType::IncomingReportFraudReport => "incoming-report.fraud-report",
            MetricType::IncomingReportNotSpamReport => "incoming-report.not-spam-report",
            MetricType::IncomingReportVirusReport => "incoming-report.virus-report",
            MetricType::IncomingReportOtherReport => "incoming-report.other-report",
            MetricType::IncomingReportMessageParseFailed => "incoming-report.message-parse-failed",
            MetricType::IncomingReportDmarcParseFailed => "incoming-report.dmarc-parse-failed",
            MetricType::IncomingReportTlsRpcParseFailed => "incoming-report.tls-rpc-parse-failed",
            MetricType::IncomingReportArfParseFailed => "incoming-report.arf-parse-failed",
            MetricType::IncomingReportDecompressError => "incoming-report.decompress-error",
            MetricType::IprevPass => "iprev.pass",
            MetricType::IprevFail => "iprev.fail",
            MetricType::IprevPermError => "iprev.perm-error",
            MetricType::IprevTempError => "iprev.temp-error",
            MetricType::IprevNone => "iprev.none",
            MetricType::JmapMethodCall => "jmap.method-call",
            MetricType::JmapInvalidArguments => "jmap.invalid-arguments",
            MetricType::JmapRequestTooLarge => "jmap.request-too-large",
            MetricType::JmapUnsupportedFilter => "jmap.unsupported-filter",
            MetricType::JmapUnsupportedSort => "jmap.unsupported-sort",
            MetricType::JmapUnknownMethod => "jmap.unknown-method",
            MetricType::JmapForbidden => "jmap.forbidden",
            MetricType::JmapNotJson => "jmap.not-json",
            MetricType::JmapNotRequest => "jmap.not-request",
            MetricType::JmapWebsocketStart => "jmap.websocket-start",
            MetricType::JmapWebsocketError => "jmap.websocket-error",
            MetricType::LimitSizeRequest => "limit.size-request",
            MetricType::LimitSizeUpload => "limit.size-upload",
            MetricType::LimitCallsIn => "limit.calls-in",
            MetricType::LimitConcurrentRequest => "limit.concurrent-request",
            MetricType::LimitConcurrentUpload => "limit.concurrent-upload",
            MetricType::LimitConcurrentConnection => "limit.concurrent-connection",
            MetricType::LimitQuota => "limit.quota",
            MetricType::LimitBlobQuota => "limit.blob-quota",
            MetricType::LimitTenantQuota => "limit.tenant-quota",
            MetricType::LimitTooManyRequests => "limit.too-many-requests",
            MetricType::MailAuthParseError => "mail-auth.parse-error",
            MetricType::MailAuthMissingParameters => "mail-auth.missing-parameters",
            MetricType::MailAuthNoHeadersFound => "mail-auth.no-headers-found",
            MetricType::MailAuthCrypto => "mail-auth.crypto",
            MetricType::MailAuthIo => "mail-auth.io",
            MetricType::MailAuthBase64 => "mail-auth.base64",
            MetricType::MailAuthDnsError => "mail-auth.dns-error",
            MetricType::MailAuthDnsRecordNotFound => "mail-auth.dns-record-not-found",
            MetricType::MailAuthDnsInvalidRecordType => "mail-auth.dns-invalid-record-type",
            MetricType::MailAuthPolicyNotAligned => "mail-auth.policy-not-aligned",
            MetricType::ManageSieveConnectionStart => "manage-sieve.connection-start",
            MetricType::ManageSieveConnectionEnd => "manage-sieve.connection-end",
            MetricType::MessageSize => "message.size",
            MetricType::MessageAuthenticatedSize => "message.authenticated-size",
            MetricType::MessageIngestTime => "message-ingest.time",
            MetricType::MessageIngestIndexTime => "message-ingest.index-time",
            MetricType::MessageIngestHam => "message-ingest.ham",
            MetricType::MessageIngestSpam => "message-ingest.spam",
            MetricType::MessageIngestImapAppend => "message-ingest.imap-append",
            MetricType::MessageIngestJmapAppend => "message-ingest.jmap-append",
            MetricType::MessageIngestDuplicate => "message-ingest.duplicate",
            MetricType::MessageIngestError => "message-ingest.error",
            MetricType::MessageIngestSearchIndex => "message-ingest.search-index",
            MetricType::MilterActionAccept => "milter.action-accept",
            MetricType::MilterActionDiscard => "milter.action-discard",
            MetricType::MilterActionReject => "milter.action-reject",
            MetricType::MilterActionTempFail => "milter.action-temp-fail",
            MetricType::MilterActionReplyCode => "milter.action-reply-code",
            MetricType::MilterActionConnectionFailure => "milter.action-connection-failure",
            MetricType::MilterActionShutdown => "milter.action-shutdown",
            MetricType::MtaHookActionAccept => "mta-hook.action-accept",
            MetricType::MtaHookActionDiscard => "mta-hook.action-discard",
            MetricType::MtaHookActionReject => "mta-hook.action-reject",
            MetricType::MtaHookActionQuarantine => "mta-hook.action-quarantine",
            MetricType::MtaHookError => "mta-hook.error",
            MetricType::MtaStsAuthorized => "mta-sts.authorized",
            MetricType::MtaStsNotAuthorized => "mta-sts.not-authorized",
            MetricType::MtaStsInvalidPolicy => "mta-sts.invalid-policy",
            MetricType::NetworkTimeout => "network.timeout",
            MetricType::OutgoingReportSize => "outgoing-report.size",
            MetricType::OutgoingReportSpfReport => "outgoing-report.spf-report",
            MetricType::OutgoingReportSpfRateLimited => "outgoing-report.spf-rate-limited",
            MetricType::OutgoingReportDkimReport => "outgoing-report.dkim-report",
            MetricType::OutgoingReportDkimRateLimited => "outgoing-report.dkim-rate-limited",
            MetricType::OutgoingReportDmarcReport => "outgoing-report.dmarc-report",
            MetricType::OutgoingReportDmarcRateLimited => "outgoing-report.dmarc-rate-limited",
            MetricType::OutgoingReportDmarcAggregateReport => {
                "outgoing-report.dmarc-aggregate-report"
            }
            MetricType::OutgoingReportTlsAggregate => "outgoing-report.tls-aggregate",
            MetricType::OutgoingReportHttpSubmission => "outgoing-report.http-submission",
            MetricType::OutgoingReportUnauthorizedReportingAddress => {
                "outgoing-report.unauthorized-reporting-address"
            }
            MetricType::OutgoingReportReportingAddressValidationError => {
                "outgoing-report.reporting-address-validation-error"
            }
            MetricType::OutgoingReportNotFound => "outgoing-report.not-found",
            MetricType::OutgoingReportSubmissionError => "outgoing-report.submission-error",
            MetricType::OutgoingReportNoRecipientsFound => "outgoing-report.no-recipients-found",
            MetricType::Pop3RequestTime => "pop3.request-time",
            MetricType::Pop3ActiveConnections => "pop3.active-connections",
            MetricType::Pop3ConnectionStart => "pop3.connection-start",
            MetricType::Pop3ConnectionEnd => "pop3.connection-end",
            MetricType::PushSubscriptionSuccess => "push-subscription.success",
            MetricType::PushSubscriptionError => "push-subscription.error",
            MetricType::PushSubscriptionNotFound => "push-subscription.not-found",
            MetricType::QueueCount => "queue.count",
            MetricType::QueueMessageQueued => "queue.message-queued",
            MetricType::QueueAuthenticatedMessageQueued => "queue.authenticated-message-queued",
            MetricType::QueueReportQueued => "queue.report-queued",
            MetricType::QueueDsnQueued => "queue.dsn-queued",
            MetricType::QueueAutogeneratedQueued => "queue.autogenerated-queued",
            MetricType::QueueRescheduled => "queue.rescheduled",
            MetricType::QueueBlobNotFound => "queue.blob-not-found",
            MetricType::QueueRateLimitExceeded => "queue.rate-limit-exceeded",
            MetricType::QueueConcurrencyLimitExceeded => "queue.concurrency-limit-exceeded",
            MetricType::QueueQuotaExceeded => "queue.quota-exceeded",
            MetricType::ResourceNotFound => "resource.not-found",
            MetricType::ResourceBadParameters => "resource.bad-parameters",
            MetricType::ResourceError => "resource.error",
            MetricType::SecurityAuthenticationBan => "security.authentication-ban",
            MetricType::SecurityAbuseBan => "security.abuse-ban",
            MetricType::SecurityScanBan => "security.scan-ban",
            MetricType::SecurityLoiterBan => "security.loiter-ban",
            MetricType::SecurityIpBlocked => "security.ip-blocked",
            MetricType::SecurityUnauthorized => "security.unauthorized",
            MetricType::ServerMemory => "server.memory",
            MetricType::ServerThreadError => "server.thread-error",
            MetricType::SieveRequestTime => "sieve.request-time",
            MetricType::SieveActiveConnections => "sieve.active-connections",
            MetricType::SieveActionAccept => "sieve.action-accept",
            MetricType::SieveActionAcceptReplace => "sieve.action-accept-replace",
            MetricType::SieveActionDiscard => "sieve.action-discard",
            MetricType::SieveActionReject => "sieve.action-reject",
            MetricType::SieveSendMessage => "sieve.send-message",
            MetricType::SieveMessageTooLarge => "sieve.message-too-large",
            MetricType::SieveRuntimeError => "sieve.runtime-error",
            MetricType::SieveUnexpectedError => "sieve.unexpected-error",
            MetricType::SieveNotSupported => "sieve.not-supported",
            MetricType::SieveQuotaExceeded => "sieve.quota-exceeded",
            MetricType::SmtpRequestTime => "smtp.request-time",
            MetricType::SmtpActiveConnections => "smtp.active-connections",
            MetricType::SmtpConnectionStart => "smtp.connection-start",
            MetricType::SmtpConnectionEnd => "smtp.connection-end",
            MetricType::SmtpError => "smtp.error",
            MetricType::SmtpConcurrencyLimitExceeded => "smtp.concurrency-limit-exceeded",
            MetricType::SmtpTransferLimitExceeded => "smtp.transfer-limit-exceeded",
            MetricType::SmtpRateLimitExceeded => "smtp.rate-limit-exceeded",
            MetricType::SmtpTimeLimitExceeded => "smtp.time-limit-exceeded",
            MetricType::SmtpMessageParseFailed => "smtp.message-parse-failed",
            MetricType::SmtpMessageTooLarge => "smtp.message-too-large",
            MetricType::SmtpLoopDetected => "smtp.loop-detected",
            MetricType::SmtpDkimPass => "smtp.dkim-pass",
            MetricType::SmtpDkimFail => "smtp.dkim-fail",
            MetricType::SmtpArcPass => "smtp.arc-pass",
            MetricType::SmtpArcFail => "smtp.arc-fail",
            MetricType::SmtpSpfEhloPass => "smtp.spf-ehlo-pass",
            MetricType::SmtpSpfEhloFail => "smtp.spf-ehlo-fail",
            MetricType::SmtpSpfFromPass => "smtp.spf-from-pass",
            MetricType::SmtpSpfFromFail => "smtp.spf-from-fail",
            MetricType::SmtpDmarcPass => "smtp.dmarc-pass",
            MetricType::SmtpDmarcFail => "smtp.dmarc-fail",
            MetricType::SmtpIprevPass => "smtp.iprev-pass",
            MetricType::SmtpIprevFail => "smtp.iprev-fail",
            MetricType::SmtpTooManyMessages => "smtp.too-many-messages",
            MetricType::SmtpInvalidEhlo => "smtp.invalid-ehlo",
            MetricType::SmtpDidNotSayEhlo => "smtp.did-not-say-ehlo",
            MetricType::SmtpMailFromUnauthenticated => "smtp.mail-from-unauthenticated",
            MetricType::SmtpMailFromUnauthorized => "smtp.mail-from-unauthorized",
            MetricType::SmtpMailFromMissing => "smtp.mail-from-missing",
            MetricType::SmtpMultipleMailFrom => "smtp.multiple-mail-from",
            MetricType::SmtpMailboxDoesNotExist => "smtp.mailbox-does-not-exist",
            MetricType::SmtpRelayNotAllowed => "smtp.relay-not-allowed",
            MetricType::SmtpRcptToDuplicate => "smtp.rcpt-to-duplicate",
            MetricType::SmtpRcptToMissing => "smtp.rcpt-to-missing",
            MetricType::SmtpTooManyRecipients => "smtp.too-many-recipients",
            MetricType::SmtpTooManyInvalidRcpt => "smtp.too-many-invalid-rcpt",
            MetricType::SmtpAuthMechanismNotSupported => "smtp.auth-mechanism-not-supported",
            MetricType::SmtpAuthExchangeTooLong => "smtp.auth-exchange-too-long",
            MetricType::SmtpCommandNotImplemented => "smtp.command-not-implemented",
            MetricType::SmtpInvalidCommand => "smtp.invalid-command",
            MetricType::SmtpSyntaxError => "smtp.syntax-error",
            MetricType::SmtpRequestTooLarge => "smtp.request-too-large",
            MetricType::SpamPyzorError => "spam.pyzor-error",
            MetricType::SpamDnsblError => "spam.dnsbl-error",
            MetricType::SpamTrainCompleted => "spam.train-completed",
            MetricType::SpamTrainSampleAdded => "spam.train-sample-added",
            MetricType::SpamClassify => "spam.classify",
            MetricType::SpamModelNotReady => "spam.model-not-ready",
            MetricType::SpfPass => "spf.pass",
            MetricType::SpfFail => "spf.fail",
            MetricType::SpfSoftFail => "spf.soft-fail",
            MetricType::SpfNeutral => "spf.neutral",
            MetricType::SpfTempError => "spf.temp-error",
            MetricType::SpfPermError => "spf.perm-error",
            MetricType::SpfNone => "spf.none",
            MetricType::StoreDataReadTime => "store.data-read-time",
            MetricType::StoreDataWriteTime => "store.data-write-time",
            MetricType::StoreBlobReadTime => "store.blob-read-time",
            MetricType::StoreBlobWriteTime => "store.blob-write-time",
            MetricType::StoreAssertValueFailed => "store.assert-value-failed",
            MetricType::StoreFoundationdbError => "store.foundationdb-error",
            MetricType::StoreMysqlError => "store.mysql-error",
            MetricType::StorePostgresqlError => "store.postgresql-error",
            MetricType::StoreRocksdbError => "store.rocksdb-error",
            MetricType::StoreSqliteError => "store.sqlite-error",
            MetricType::StoreLdapError => "store.ldap-error",
            MetricType::StoreElasticsearchError => "store.elasticsearch-error",
            MetricType::StoreRedisError => "store.redis-error",
            MetricType::StoreS3Error => "store.s3-error",
            MetricType::StoreAzureError => "store.azure-error",
            MetricType::StoreFilesystemError => "store.filesystem-error",
            MetricType::StorePoolError => "store.pool-error",
            MetricType::StoreDataCorruption => "store.data-corruption",
            MetricType::StoreDecompressError => "store.decompress-error",
            MetricType::StoreDeserializeError => "store.deserialize-error",
            MetricType::StoreNotFound => "store.not-found",
            MetricType::StoreNotConfigured => "store.not-configured",
            MetricType::StoreNotSupported => "store.not-supported",
            MetricType::StoreUnexpectedError => "store.unexpected-error",
            MetricType::StoreCryptoError => "store.crypto-error",
            MetricType::StoreHttpStoreError => "store.http-store-error",
            MetricType::StoreBlobMissingMarker => "store.blob-missing-marker",
            MetricType::StoreDataWrite => "store.data-write",
            MetricType::StoreDataIterate => "store.data-iterate",
            MetricType::StoreBlobRead => "store.blob-read",
            MetricType::StoreBlobWrite => "store.blob-write",
            MetricType::StoreBlobDelete => "store.blob-delete",
            MetricType::TaskManagerBlobNotFound => "task-manager.blob-not-found",
            MetricType::TaskManagerMetadataNotFound => "task-manager.metadata-not-found",
            MetricType::TelemetryAlertEvent => "telemetry.alert-event",
            MetricType::TelemetryAlertMessage => "telemetry.alert-message",
            MetricType::TelemetryLogError => "telemetry.log-error",
            MetricType::TelemetryWebhookError => "telemetry.webhook-error",
            MetricType::TelemetryOtelExporterError => "telemetry.otel-exporter-error",
            MetricType::TelemetryOtelMetricsExporterError => {
                "telemetry.otel-metrics-exporter-error"
            }
            MetricType::TelemetryPrometheusExporterError => "telemetry.prometheus-exporter-error",
            MetricType::TelemetryJournalError => "telemetry.journal-error",
            MetricType::TlsHandshakeError => "tls.handshake-error",
            MetricType::UserCount => "user.count",
        }
    }

    pub fn to_id(&self) -> u16 {
        match self {
            MetricType::AcmeAuthError => 27,
            MetricType::AcmeAuthTooManyAttempts => 28,
            MetricType::AcmeOrderCompleted => 29,
            MetricType::AcmeOrderInvalid => 30,
            MetricType::AcmeClientMissingSni => 31,
            MetricType::AcmeTlsAlpnError => 32,
            MetricType::AcmeTokenNotFound => 33,
            MetricType::AcmeError => 34,
            MetricType::ArcChainTooLong => 39,
            MetricType::ArcInvalidInstance => 40,
            MetricType::ArcInvalidCv => 41,
            MetricType::ArcHasHeaderTag => 42,
            MetricType::ArcBrokenChain => 43,
            MetricType::AuthSuccess => 44,
            MetricType::AuthFailed => 45,
            MetricType::AuthTooManyAttempts => 46,
            MetricType::AuthError => 47,
            MetricType::CalendarAlarmSent => 48,
            MetricType::CalendarAlarmFailed => 49,
            MetricType::CalendarItipMessageSent => 50,
            MetricType::CalendarItipMessageReceived => 51,
            MetricType::CalendarItipMessageError => 52,
            MetricType::ClusterSubscriberError => 53,
            MetricType::ClusterSubscriberDisconnected => 54,
            MetricType::ClusterPublisherError => 55,
            MetricType::DaneAuthenticationSuccess => 56,
            MetricType::DaneAuthenticationFailure => 57,
            MetricType::DaneNoCertificatesFound => 58,
            MetricType::DaneCertificateParseError => 59,
            MetricType::DaneTlsaRecordFetchError => 60,
            MetricType::DaneTlsaRecordNotFound => 61,
            MetricType::DaneTlsaRecordNotDnssecSigned => 62,
            MetricType::DaneTlsaRecordInvalid => 63,
            MetricType::DeliveryTotalTime => 2,
            MetricType::DeliveryAttemptTime => 3,
            MetricType::DeliveryActiveConnections => 22,
            MetricType::DeliveryAttemptStart => 64,
            MetricType::DeliveryAttemptEnd => 65,
            MetricType::DeliveryCompleted => 66,
            MetricType::DeliveryMxLookupFailed => 67,
            MetricType::DeliveryIpLookupFailed => 68,
            MetricType::DeliveryNullMx => 69,
            MetricType::DeliveryGreetingFailed => 70,
            MetricType::DeliveryEhloRejected => 71,
            MetricType::DeliveryAuthFailed => 72,
            MetricType::DeliveryMailFromRejected => 73,
            MetricType::DeliveryDelivered => 74,
            MetricType::DeliveryRcptToRejected => 75,
            MetricType::DeliveryRcptToFailed => 76,
            MetricType::DeliveryMessageRejected => 77,
            MetricType::DeliveryStartTlsUnavailable => 78,
            MetricType::DeliveryStartTlsError => 79,
            MetricType::DeliveryStartTlsDisabled => 80,
            MetricType::DeliveryImplicitTlsError => 81,
            MetricType::DeliveryConcurrencyLimitExceeded => 82,
            MetricType::DeliveryRateLimitExceeded => 83,
            MetricType::DeliveryDoubleBounce => 84,
            MetricType::DeliveryDsnSuccess => 85,
            MetricType::DeliveryDsnTempFail => 86,
            MetricType::DeliveryDsnPermFail => 87,
            MetricType::DkimPass => 88,
            MetricType::DkimNeutral => 89,
            MetricType::DkimFail => 90,
            MetricType::DkimPermError => 91,
            MetricType::DkimTempError => 92,
            MetricType::DkimNone => 93,
            MetricType::DkimUnsupportedVersion => 94,
            MetricType::DkimUnsupportedAlgorithm => 95,
            MetricType::DkimUnsupportedCanonicalization => 96,
            MetricType::DkimUnsupportedKeyType => 97,
            MetricType::DkimFailedBodyHashMatch => 98,
            MetricType::DkimFailedVerification => 99,
            MetricType::DkimFailedAuidMatch => 100,
            MetricType::DkimRevokedPublicKey => 101,
            MetricType::DkimIncompatibleAlgorithms => 102,
            MetricType::DkimSignatureExpired => 103,
            MetricType::DkimSignatureLength => 104,
            MetricType::DkimSignerNotFound => 105,
            MetricType::DmarcPass => 106,
            MetricType::DmarcFail => 107,
            MetricType::DmarcPermError => 108,
            MetricType::DmarcTempError => 109,
            MetricType::DmarcNone => 110,
            MetricType::DnsLookupTime => 11,
            MetricType::DnsRecordCreationFailed => 35,
            MetricType::DnsRecordDeletionFailed => 36,
            MetricType::DnsRecordLookupFailed => 37,
            MetricType::DnsRecordPropagationTimeout => 38,
            MetricType::DomainCount => 26,
            MetricType::EvalError => 111,
            MetricType::EvalDirectoryNotFound => 112,
            MetricType::EvalStoreNotFound => 113,
            MetricType::HttpRequestTime => 12,
            MetricType::HttpActiveConnections => 17,
            MetricType::HttpConnectionStart => 337,
            MetricType::HttpError => 114,
            MetricType::HttpRequestBody => 115,
            MetricType::HttpResponseBody => 116,
            MetricType::HttpXForwardedMissing => 117,
            MetricType::ImapRequestTime => 13,
            MetricType::ImapActiveConnections => 18,
            MetricType::ImapConnectionStart => 118,
            MetricType::ImapConnectionEnd => 119,
            MetricType::IncomingReportDmarcReport => 120,
            MetricType::IncomingReportDmarcReportWithWarnings => 121,
            MetricType::IncomingReportTlsReport => 122,
            MetricType::IncomingReportTlsReportWithWarnings => 123,
            MetricType::IncomingReportAbuseReport => 124,
            MetricType::IncomingReportAuthFailureReport => 125,
            MetricType::IncomingReportFraudReport => 126,
            MetricType::IncomingReportNotSpamReport => 127,
            MetricType::IncomingReportVirusReport => 128,
            MetricType::IncomingReportOtherReport => 129,
            MetricType::IncomingReportMessageParseFailed => 130,
            MetricType::IncomingReportDmarcParseFailed => 131,
            MetricType::IncomingReportTlsRpcParseFailed => 132,
            MetricType::IncomingReportArfParseFailed => 133,
            MetricType::IncomingReportDecompressError => 134,
            MetricType::IprevPass => 135,
            MetricType::IprevFail => 136,
            MetricType::IprevPermError => 137,
            MetricType::IprevTempError => 138,
            MetricType::IprevNone => 139,
            MetricType::JmapMethodCall => 140,
            MetricType::JmapInvalidArguments => 141,
            MetricType::JmapRequestTooLarge => 142,
            MetricType::JmapUnsupportedFilter => 143,
            MetricType::JmapUnsupportedSort => 144,
            MetricType::JmapUnknownMethod => 145,
            MetricType::JmapForbidden => 146,
            MetricType::JmapNotJson => 147,
            MetricType::JmapNotRequest => 148,
            MetricType::JmapWebsocketStart => 149,
            MetricType::JmapWebsocketError => 150,
            MetricType::LimitSizeRequest => 151,
            MetricType::LimitSizeUpload => 152,
            MetricType::LimitCallsIn => 153,
            MetricType::LimitConcurrentRequest => 154,
            MetricType::LimitConcurrentUpload => 155,
            MetricType::LimitConcurrentConnection => 156,
            MetricType::LimitQuota => 157,
            MetricType::LimitBlobQuota => 158,
            MetricType::LimitTenantQuota => 159,
            MetricType::LimitTooManyRequests => 160,
            MetricType::MailAuthParseError => 161,
            MetricType::MailAuthMissingParameters => 162,
            MetricType::MailAuthNoHeadersFound => 163,
            MetricType::MailAuthCrypto => 164,
            MetricType::MailAuthIo => 165,
            MetricType::MailAuthBase64 => 166,
            MetricType::MailAuthDnsError => 167,
            MetricType::MailAuthDnsRecordNotFound => 168,
            MetricType::MailAuthDnsInvalidRecordType => 169,
            MetricType::MailAuthPolicyNotAligned => 170,
            MetricType::ManageSieveConnectionStart => 171,
            MetricType::ManageSieveConnectionEnd => 172,
            MetricType::MessageSize => 4,
            MetricType::MessageAuthenticatedSize => 5,
            MetricType::MessageIngestTime => 0,
            MetricType::MessageIngestIndexTime => 1,
            MetricType::MessageIngestHam => 173,
            MetricType::MessageIngestSpam => 174,
            MetricType::MessageIngestImapAppend => 175,
            MetricType::MessageIngestJmapAppend => 176,
            MetricType::MessageIngestDuplicate => 177,
            MetricType::MessageIngestError => 178,
            MetricType::MessageIngestSearchIndex => 179,
            MetricType::MilterActionAccept => 180,
            MetricType::MilterActionDiscard => 181,
            MetricType::MilterActionReject => 182,
            MetricType::MilterActionTempFail => 183,
            MetricType::MilterActionReplyCode => 184,
            MetricType::MilterActionConnectionFailure => 185,
            MetricType::MilterActionShutdown => 186,
            MetricType::MtaHookActionAccept => 187,
            MetricType::MtaHookActionDiscard => 188,
            MetricType::MtaHookActionReject => 189,
            MetricType::MtaHookActionQuarantine => 190,
            MetricType::MtaHookError => 191,
            MetricType::MtaStsAuthorized => 192,
            MetricType::MtaStsNotAuthorized => 193,
            MetricType::MtaStsInvalidPolicy => 194,
            MetricType::NetworkTimeout => 195,
            MetricType::OutgoingReportSize => 6,
            MetricType::OutgoingReportSpfReport => 196,
            MetricType::OutgoingReportSpfRateLimited => 197,
            MetricType::OutgoingReportDkimReport => 198,
            MetricType::OutgoingReportDkimRateLimited => 199,
            MetricType::OutgoingReportDmarcReport => 200,
            MetricType::OutgoingReportDmarcRateLimited => 201,
            MetricType::OutgoingReportDmarcAggregateReport => 202,
            MetricType::OutgoingReportTlsAggregate => 203,
            MetricType::OutgoingReportHttpSubmission => 204,
            MetricType::OutgoingReportUnauthorizedReportingAddress => 205,
            MetricType::OutgoingReportReportingAddressValidationError => 206,
            MetricType::OutgoingReportNotFound => 207,
            MetricType::OutgoingReportSubmissionError => 208,
            MetricType::OutgoingReportNoRecipientsFound => 209,
            MetricType::Pop3RequestTime => 14,
            MetricType::Pop3ActiveConnections => 19,
            MetricType::Pop3ConnectionStart => 210,
            MetricType::Pop3ConnectionEnd => 211,
            MetricType::PushSubscriptionSuccess => 213,
            MetricType::PushSubscriptionError => 214,
            MetricType::PushSubscriptionNotFound => 215,
            MetricType::QueueCount => 24,
            MetricType::QueueMessageQueued => 216,
            MetricType::QueueAuthenticatedMessageQueued => 217,
            MetricType::QueueReportQueued => 218,
            MetricType::QueueDsnQueued => 219,
            MetricType::QueueAutogeneratedQueued => 220,
            MetricType::QueueRescheduled => 221,
            MetricType::QueueBlobNotFound => 222,
            MetricType::QueueRateLimitExceeded => 223,
            MetricType::QueueConcurrencyLimitExceeded => 224,
            MetricType::QueueQuotaExceeded => 225,
            MetricType::ResourceNotFound => 226,
            MetricType::ResourceBadParameters => 227,
            MetricType::ResourceError => 228,
            MetricType::SecurityAuthenticationBan => 229,
            MetricType::SecurityAbuseBan => 230,
            MetricType::SecurityScanBan => 231,
            MetricType::SecurityLoiterBan => 232,
            MetricType::SecurityIpBlocked => 233,
            MetricType::SecurityUnauthorized => 234,
            MetricType::ServerMemory => 23,
            MetricType::ServerThreadError => 235,
            MetricType::SieveRequestTime => 16,
            MetricType::SieveActiveConnections => 21,
            MetricType::SieveActionAccept => 236,
            MetricType::SieveActionAcceptReplace => 237,
            MetricType::SieveActionDiscard => 238,
            MetricType::SieveActionReject => 239,
            MetricType::SieveSendMessage => 240,
            MetricType::SieveMessageTooLarge => 241,
            MetricType::SieveRuntimeError => 242,
            MetricType::SieveUnexpectedError => 243,
            MetricType::SieveNotSupported => 244,
            MetricType::SieveQuotaExceeded => 245,
            MetricType::SmtpRequestTime => 15,
            MetricType::SmtpActiveConnections => 20,
            MetricType::SmtpConnectionStart => 246,
            MetricType::SmtpConnectionEnd => 247,
            MetricType::SmtpError => 248,
            MetricType::SmtpConcurrencyLimitExceeded => 249,
            MetricType::SmtpTransferLimitExceeded => 250,
            MetricType::SmtpRateLimitExceeded => 251,
            MetricType::SmtpTimeLimitExceeded => 252,
            MetricType::SmtpMessageParseFailed => 253,
            MetricType::SmtpMessageTooLarge => 254,
            MetricType::SmtpLoopDetected => 255,
            MetricType::SmtpDkimPass => 256,
            MetricType::SmtpDkimFail => 257,
            MetricType::SmtpArcPass => 258,
            MetricType::SmtpArcFail => 259,
            MetricType::SmtpSpfEhloPass => 260,
            MetricType::SmtpSpfEhloFail => 261,
            MetricType::SmtpSpfFromPass => 262,
            MetricType::SmtpSpfFromFail => 263,
            MetricType::SmtpDmarcPass => 264,
            MetricType::SmtpDmarcFail => 265,
            MetricType::SmtpIprevPass => 266,
            MetricType::SmtpIprevFail => 267,
            MetricType::SmtpTooManyMessages => 268,
            MetricType::SmtpInvalidEhlo => 269,
            MetricType::SmtpDidNotSayEhlo => 270,
            MetricType::SmtpMailFromUnauthenticated => 271,
            MetricType::SmtpMailFromUnauthorized => 272,
            MetricType::SmtpMailFromMissing => 273,
            MetricType::SmtpMultipleMailFrom => 274,
            MetricType::SmtpMailboxDoesNotExist => 275,
            MetricType::SmtpRelayNotAllowed => 276,
            MetricType::SmtpRcptToDuplicate => 277,
            MetricType::SmtpRcptToMissing => 278,
            MetricType::SmtpTooManyRecipients => 279,
            MetricType::SmtpTooManyInvalidRcpt => 280,
            MetricType::SmtpAuthMechanismNotSupported => 281,
            MetricType::SmtpAuthExchangeTooLong => 282,
            MetricType::SmtpCommandNotImplemented => 283,
            MetricType::SmtpInvalidCommand => 284,
            MetricType::SmtpSyntaxError => 285,
            MetricType::SmtpRequestTooLarge => 286,
            MetricType::SpamPyzorError => 287,
            MetricType::SpamDnsblError => 288,
            MetricType::SpamTrainCompleted => 289,
            MetricType::SpamTrainSampleAdded => 290,
            MetricType::SpamClassify => 291,
            MetricType::SpamModelNotReady => 292,
            MetricType::SpfPass => 293,
            MetricType::SpfFail => 294,
            MetricType::SpfSoftFail => 295,
            MetricType::SpfNeutral => 296,
            MetricType::SpfTempError => 297,
            MetricType::SpfPermError => 298,
            MetricType::SpfNone => 299,
            MetricType::StoreDataReadTime => 7,
            MetricType::StoreDataWriteTime => 8,
            MetricType::StoreBlobReadTime => 9,
            MetricType::StoreBlobWriteTime => 10,
            MetricType::StoreAssertValueFailed => 300,
            MetricType::StoreFoundationdbError => 301,
            MetricType::StoreMysqlError => 302,
            MetricType::StorePostgresqlError => 303,
            MetricType::StoreRocksdbError => 304,
            MetricType::StoreSqliteError => 305,
            MetricType::StoreLdapError => 306,
            MetricType::StoreElasticsearchError => 307,
            MetricType::StoreRedisError => 308,
            MetricType::StoreS3Error => 309,
            MetricType::StoreAzureError => 310,
            MetricType::StoreFilesystemError => 311,
            MetricType::StorePoolError => 312,
            MetricType::StoreDataCorruption => 313,
            MetricType::StoreDecompressError => 314,
            MetricType::StoreDeserializeError => 315,
            MetricType::StoreNotFound => 316,
            MetricType::StoreNotConfigured => 317,
            MetricType::StoreNotSupported => 318,
            MetricType::StoreUnexpectedError => 319,
            MetricType::StoreCryptoError => 320,
            MetricType::StoreHttpStoreError => 321,
            MetricType::StoreBlobMissingMarker => 322,
            MetricType::StoreDataWrite => 323,
            MetricType::StoreDataIterate => 324,
            MetricType::StoreBlobRead => 325,
            MetricType::StoreBlobWrite => 326,
            MetricType::StoreBlobDelete => 327,
            MetricType::TaskManagerBlobNotFound => 328,
            MetricType::TaskManagerMetadataNotFound => 329,
            MetricType::TelemetryAlertEvent => 338,
            MetricType::TelemetryAlertMessage => 212,
            MetricType::TelemetryLogError => 330,
            MetricType::TelemetryWebhookError => 331,
            MetricType::TelemetryOtelExporterError => 332,
            MetricType::TelemetryOtelMetricsExporterError => 333,
            MetricType::TelemetryPrometheusExporterError => 334,
            MetricType::TelemetryJournalError => 335,
            MetricType::TlsHandshakeError => 336,
            MetricType::UserCount => 25,
        }
    }

    pub fn from_id(id: u16) -> Option<Self> {
        match id {
            27 => Some(MetricType::AcmeAuthError),
            28 => Some(MetricType::AcmeAuthTooManyAttempts),
            29 => Some(MetricType::AcmeOrderCompleted),
            30 => Some(MetricType::AcmeOrderInvalid),
            31 => Some(MetricType::AcmeClientMissingSni),
            32 => Some(MetricType::AcmeTlsAlpnError),
            33 => Some(MetricType::AcmeTokenNotFound),
            34 => Some(MetricType::AcmeError),
            39 => Some(MetricType::ArcChainTooLong),
            40 => Some(MetricType::ArcInvalidInstance),
            41 => Some(MetricType::ArcInvalidCv),
            42 => Some(MetricType::ArcHasHeaderTag),
            43 => Some(MetricType::ArcBrokenChain),
            44 => Some(MetricType::AuthSuccess),
            45 => Some(MetricType::AuthFailed),
            46 => Some(MetricType::AuthTooManyAttempts),
            47 => Some(MetricType::AuthError),
            48 => Some(MetricType::CalendarAlarmSent),
            49 => Some(MetricType::CalendarAlarmFailed),
            50 => Some(MetricType::CalendarItipMessageSent),
            51 => Some(MetricType::CalendarItipMessageReceived),
            52 => Some(MetricType::CalendarItipMessageError),
            53 => Some(MetricType::ClusterSubscriberError),
            54 => Some(MetricType::ClusterSubscriberDisconnected),
            55 => Some(MetricType::ClusterPublisherError),
            56 => Some(MetricType::DaneAuthenticationSuccess),
            57 => Some(MetricType::DaneAuthenticationFailure),
            58 => Some(MetricType::DaneNoCertificatesFound),
            59 => Some(MetricType::DaneCertificateParseError),
            60 => Some(MetricType::DaneTlsaRecordFetchError),
            61 => Some(MetricType::DaneTlsaRecordNotFound),
            62 => Some(MetricType::DaneTlsaRecordNotDnssecSigned),
            63 => Some(MetricType::DaneTlsaRecordInvalid),
            2 => Some(MetricType::DeliveryTotalTime),
            3 => Some(MetricType::DeliveryAttemptTime),
            22 => Some(MetricType::DeliveryActiveConnections),
            64 => Some(MetricType::DeliveryAttemptStart),
            65 => Some(MetricType::DeliveryAttemptEnd),
            66 => Some(MetricType::DeliveryCompleted),
            67 => Some(MetricType::DeliveryMxLookupFailed),
            68 => Some(MetricType::DeliveryIpLookupFailed),
            69 => Some(MetricType::DeliveryNullMx),
            70 => Some(MetricType::DeliveryGreetingFailed),
            71 => Some(MetricType::DeliveryEhloRejected),
            72 => Some(MetricType::DeliveryAuthFailed),
            73 => Some(MetricType::DeliveryMailFromRejected),
            74 => Some(MetricType::DeliveryDelivered),
            75 => Some(MetricType::DeliveryRcptToRejected),
            76 => Some(MetricType::DeliveryRcptToFailed),
            77 => Some(MetricType::DeliveryMessageRejected),
            78 => Some(MetricType::DeliveryStartTlsUnavailable),
            79 => Some(MetricType::DeliveryStartTlsError),
            80 => Some(MetricType::DeliveryStartTlsDisabled),
            81 => Some(MetricType::DeliveryImplicitTlsError),
            82 => Some(MetricType::DeliveryConcurrencyLimitExceeded),
            83 => Some(MetricType::DeliveryRateLimitExceeded),
            84 => Some(MetricType::DeliveryDoubleBounce),
            85 => Some(MetricType::DeliveryDsnSuccess),
            86 => Some(MetricType::DeliveryDsnTempFail),
            87 => Some(MetricType::DeliveryDsnPermFail),
            88 => Some(MetricType::DkimPass),
            89 => Some(MetricType::DkimNeutral),
            90 => Some(MetricType::DkimFail),
            91 => Some(MetricType::DkimPermError),
            92 => Some(MetricType::DkimTempError),
            93 => Some(MetricType::DkimNone),
            94 => Some(MetricType::DkimUnsupportedVersion),
            95 => Some(MetricType::DkimUnsupportedAlgorithm),
            96 => Some(MetricType::DkimUnsupportedCanonicalization),
            97 => Some(MetricType::DkimUnsupportedKeyType),
            98 => Some(MetricType::DkimFailedBodyHashMatch),
            99 => Some(MetricType::DkimFailedVerification),
            100 => Some(MetricType::DkimFailedAuidMatch),
            101 => Some(MetricType::DkimRevokedPublicKey),
            102 => Some(MetricType::DkimIncompatibleAlgorithms),
            103 => Some(MetricType::DkimSignatureExpired),
            104 => Some(MetricType::DkimSignatureLength),
            105 => Some(MetricType::DkimSignerNotFound),
            106 => Some(MetricType::DmarcPass),
            107 => Some(MetricType::DmarcFail),
            108 => Some(MetricType::DmarcPermError),
            109 => Some(MetricType::DmarcTempError),
            110 => Some(MetricType::DmarcNone),
            11 => Some(MetricType::DnsLookupTime),
            35 => Some(MetricType::DnsRecordCreationFailed),
            36 => Some(MetricType::DnsRecordDeletionFailed),
            37 => Some(MetricType::DnsRecordLookupFailed),
            38 => Some(MetricType::DnsRecordPropagationTimeout),
            26 => Some(MetricType::DomainCount),
            111 => Some(MetricType::EvalError),
            112 => Some(MetricType::EvalDirectoryNotFound),
            113 => Some(MetricType::EvalStoreNotFound),
            12 => Some(MetricType::HttpRequestTime),
            17 => Some(MetricType::HttpActiveConnections),
            337 => Some(MetricType::HttpConnectionStart),
            114 => Some(MetricType::HttpError),
            115 => Some(MetricType::HttpRequestBody),
            116 => Some(MetricType::HttpResponseBody),
            117 => Some(MetricType::HttpXForwardedMissing),
            13 => Some(MetricType::ImapRequestTime),
            18 => Some(MetricType::ImapActiveConnections),
            118 => Some(MetricType::ImapConnectionStart),
            119 => Some(MetricType::ImapConnectionEnd),
            120 => Some(MetricType::IncomingReportDmarcReport),
            121 => Some(MetricType::IncomingReportDmarcReportWithWarnings),
            122 => Some(MetricType::IncomingReportTlsReport),
            123 => Some(MetricType::IncomingReportTlsReportWithWarnings),
            124 => Some(MetricType::IncomingReportAbuseReport),
            125 => Some(MetricType::IncomingReportAuthFailureReport),
            126 => Some(MetricType::IncomingReportFraudReport),
            127 => Some(MetricType::IncomingReportNotSpamReport),
            128 => Some(MetricType::IncomingReportVirusReport),
            129 => Some(MetricType::IncomingReportOtherReport),
            130 => Some(MetricType::IncomingReportMessageParseFailed),
            131 => Some(MetricType::IncomingReportDmarcParseFailed),
            132 => Some(MetricType::IncomingReportTlsRpcParseFailed),
            133 => Some(MetricType::IncomingReportArfParseFailed),
            134 => Some(MetricType::IncomingReportDecompressError),
            135 => Some(MetricType::IprevPass),
            136 => Some(MetricType::IprevFail),
            137 => Some(MetricType::IprevPermError),
            138 => Some(MetricType::IprevTempError),
            139 => Some(MetricType::IprevNone),
            140 => Some(MetricType::JmapMethodCall),
            141 => Some(MetricType::JmapInvalidArguments),
            142 => Some(MetricType::JmapRequestTooLarge),
            143 => Some(MetricType::JmapUnsupportedFilter),
            144 => Some(MetricType::JmapUnsupportedSort),
            145 => Some(MetricType::JmapUnknownMethod),
            146 => Some(MetricType::JmapForbidden),
            147 => Some(MetricType::JmapNotJson),
            148 => Some(MetricType::JmapNotRequest),
            149 => Some(MetricType::JmapWebsocketStart),
            150 => Some(MetricType::JmapWebsocketError),
            151 => Some(MetricType::LimitSizeRequest),
            152 => Some(MetricType::LimitSizeUpload),
            153 => Some(MetricType::LimitCallsIn),
            154 => Some(MetricType::LimitConcurrentRequest),
            155 => Some(MetricType::LimitConcurrentUpload),
            156 => Some(MetricType::LimitConcurrentConnection),
            157 => Some(MetricType::LimitQuota),
            158 => Some(MetricType::LimitBlobQuota),
            159 => Some(MetricType::LimitTenantQuota),
            160 => Some(MetricType::LimitTooManyRequests),
            161 => Some(MetricType::MailAuthParseError),
            162 => Some(MetricType::MailAuthMissingParameters),
            163 => Some(MetricType::MailAuthNoHeadersFound),
            164 => Some(MetricType::MailAuthCrypto),
            165 => Some(MetricType::MailAuthIo),
            166 => Some(MetricType::MailAuthBase64),
            167 => Some(MetricType::MailAuthDnsError),
            168 => Some(MetricType::MailAuthDnsRecordNotFound),
            169 => Some(MetricType::MailAuthDnsInvalidRecordType),
            170 => Some(MetricType::MailAuthPolicyNotAligned),
            171 => Some(MetricType::ManageSieveConnectionStart),
            172 => Some(MetricType::ManageSieveConnectionEnd),
            4 => Some(MetricType::MessageSize),
            5 => Some(MetricType::MessageAuthenticatedSize),
            0 => Some(MetricType::MessageIngestTime),
            1 => Some(MetricType::MessageIngestIndexTime),
            173 => Some(MetricType::MessageIngestHam),
            174 => Some(MetricType::MessageIngestSpam),
            175 => Some(MetricType::MessageIngestImapAppend),
            176 => Some(MetricType::MessageIngestJmapAppend),
            177 => Some(MetricType::MessageIngestDuplicate),
            178 => Some(MetricType::MessageIngestError),
            179 => Some(MetricType::MessageIngestSearchIndex),
            180 => Some(MetricType::MilterActionAccept),
            181 => Some(MetricType::MilterActionDiscard),
            182 => Some(MetricType::MilterActionReject),
            183 => Some(MetricType::MilterActionTempFail),
            184 => Some(MetricType::MilterActionReplyCode),
            185 => Some(MetricType::MilterActionConnectionFailure),
            186 => Some(MetricType::MilterActionShutdown),
            187 => Some(MetricType::MtaHookActionAccept),
            188 => Some(MetricType::MtaHookActionDiscard),
            189 => Some(MetricType::MtaHookActionReject),
            190 => Some(MetricType::MtaHookActionQuarantine),
            191 => Some(MetricType::MtaHookError),
            192 => Some(MetricType::MtaStsAuthorized),
            193 => Some(MetricType::MtaStsNotAuthorized),
            194 => Some(MetricType::MtaStsInvalidPolicy),
            195 => Some(MetricType::NetworkTimeout),
            6 => Some(MetricType::OutgoingReportSize),
            196 => Some(MetricType::OutgoingReportSpfReport),
            197 => Some(MetricType::OutgoingReportSpfRateLimited),
            198 => Some(MetricType::OutgoingReportDkimReport),
            199 => Some(MetricType::OutgoingReportDkimRateLimited),
            200 => Some(MetricType::OutgoingReportDmarcReport),
            201 => Some(MetricType::OutgoingReportDmarcRateLimited),
            202 => Some(MetricType::OutgoingReportDmarcAggregateReport),
            203 => Some(MetricType::OutgoingReportTlsAggregate),
            204 => Some(MetricType::OutgoingReportHttpSubmission),
            205 => Some(MetricType::OutgoingReportUnauthorizedReportingAddress),
            206 => Some(MetricType::OutgoingReportReportingAddressValidationError),
            207 => Some(MetricType::OutgoingReportNotFound),
            208 => Some(MetricType::OutgoingReportSubmissionError),
            209 => Some(MetricType::OutgoingReportNoRecipientsFound),
            14 => Some(MetricType::Pop3RequestTime),
            19 => Some(MetricType::Pop3ActiveConnections),
            210 => Some(MetricType::Pop3ConnectionStart),
            211 => Some(MetricType::Pop3ConnectionEnd),
            213 => Some(MetricType::PushSubscriptionSuccess),
            214 => Some(MetricType::PushSubscriptionError),
            215 => Some(MetricType::PushSubscriptionNotFound),
            24 => Some(MetricType::QueueCount),
            216 => Some(MetricType::QueueMessageQueued),
            217 => Some(MetricType::QueueAuthenticatedMessageQueued),
            218 => Some(MetricType::QueueReportQueued),
            219 => Some(MetricType::QueueDsnQueued),
            220 => Some(MetricType::QueueAutogeneratedQueued),
            221 => Some(MetricType::QueueRescheduled),
            222 => Some(MetricType::QueueBlobNotFound),
            223 => Some(MetricType::QueueRateLimitExceeded),
            224 => Some(MetricType::QueueConcurrencyLimitExceeded),
            225 => Some(MetricType::QueueQuotaExceeded),
            226 => Some(MetricType::ResourceNotFound),
            227 => Some(MetricType::ResourceBadParameters),
            228 => Some(MetricType::ResourceError),
            229 => Some(MetricType::SecurityAuthenticationBan),
            230 => Some(MetricType::SecurityAbuseBan),
            231 => Some(MetricType::SecurityScanBan),
            232 => Some(MetricType::SecurityLoiterBan),
            233 => Some(MetricType::SecurityIpBlocked),
            234 => Some(MetricType::SecurityUnauthorized),
            23 => Some(MetricType::ServerMemory),
            235 => Some(MetricType::ServerThreadError),
            16 => Some(MetricType::SieveRequestTime),
            21 => Some(MetricType::SieveActiveConnections),
            236 => Some(MetricType::SieveActionAccept),
            237 => Some(MetricType::SieveActionAcceptReplace),
            238 => Some(MetricType::SieveActionDiscard),
            239 => Some(MetricType::SieveActionReject),
            240 => Some(MetricType::SieveSendMessage),
            241 => Some(MetricType::SieveMessageTooLarge),
            242 => Some(MetricType::SieveRuntimeError),
            243 => Some(MetricType::SieveUnexpectedError),
            244 => Some(MetricType::SieveNotSupported),
            245 => Some(MetricType::SieveQuotaExceeded),
            15 => Some(MetricType::SmtpRequestTime),
            20 => Some(MetricType::SmtpActiveConnections),
            246 => Some(MetricType::SmtpConnectionStart),
            247 => Some(MetricType::SmtpConnectionEnd),
            248 => Some(MetricType::SmtpError),
            249 => Some(MetricType::SmtpConcurrencyLimitExceeded),
            250 => Some(MetricType::SmtpTransferLimitExceeded),
            251 => Some(MetricType::SmtpRateLimitExceeded),
            252 => Some(MetricType::SmtpTimeLimitExceeded),
            253 => Some(MetricType::SmtpMessageParseFailed),
            254 => Some(MetricType::SmtpMessageTooLarge),
            255 => Some(MetricType::SmtpLoopDetected),
            256 => Some(MetricType::SmtpDkimPass),
            257 => Some(MetricType::SmtpDkimFail),
            258 => Some(MetricType::SmtpArcPass),
            259 => Some(MetricType::SmtpArcFail),
            260 => Some(MetricType::SmtpSpfEhloPass),
            261 => Some(MetricType::SmtpSpfEhloFail),
            262 => Some(MetricType::SmtpSpfFromPass),
            263 => Some(MetricType::SmtpSpfFromFail),
            264 => Some(MetricType::SmtpDmarcPass),
            265 => Some(MetricType::SmtpDmarcFail),
            266 => Some(MetricType::SmtpIprevPass),
            267 => Some(MetricType::SmtpIprevFail),
            268 => Some(MetricType::SmtpTooManyMessages),
            269 => Some(MetricType::SmtpInvalidEhlo),
            270 => Some(MetricType::SmtpDidNotSayEhlo),
            271 => Some(MetricType::SmtpMailFromUnauthenticated),
            272 => Some(MetricType::SmtpMailFromUnauthorized),
            273 => Some(MetricType::SmtpMailFromMissing),
            274 => Some(MetricType::SmtpMultipleMailFrom),
            275 => Some(MetricType::SmtpMailboxDoesNotExist),
            276 => Some(MetricType::SmtpRelayNotAllowed),
            277 => Some(MetricType::SmtpRcptToDuplicate),
            278 => Some(MetricType::SmtpRcptToMissing),
            279 => Some(MetricType::SmtpTooManyRecipients),
            280 => Some(MetricType::SmtpTooManyInvalidRcpt),
            281 => Some(MetricType::SmtpAuthMechanismNotSupported),
            282 => Some(MetricType::SmtpAuthExchangeTooLong),
            283 => Some(MetricType::SmtpCommandNotImplemented),
            284 => Some(MetricType::SmtpInvalidCommand),
            285 => Some(MetricType::SmtpSyntaxError),
            286 => Some(MetricType::SmtpRequestTooLarge),
            287 => Some(MetricType::SpamPyzorError),
            288 => Some(MetricType::SpamDnsblError),
            289 => Some(MetricType::SpamTrainCompleted),
            290 => Some(MetricType::SpamTrainSampleAdded),
            291 => Some(MetricType::SpamClassify),
            292 => Some(MetricType::SpamModelNotReady),
            293 => Some(MetricType::SpfPass),
            294 => Some(MetricType::SpfFail),
            295 => Some(MetricType::SpfSoftFail),
            296 => Some(MetricType::SpfNeutral),
            297 => Some(MetricType::SpfTempError),
            298 => Some(MetricType::SpfPermError),
            299 => Some(MetricType::SpfNone),
            7 => Some(MetricType::StoreDataReadTime),
            8 => Some(MetricType::StoreDataWriteTime),
            9 => Some(MetricType::StoreBlobReadTime),
            10 => Some(MetricType::StoreBlobWriteTime),
            300 => Some(MetricType::StoreAssertValueFailed),
            301 => Some(MetricType::StoreFoundationdbError),
            302 => Some(MetricType::StoreMysqlError),
            303 => Some(MetricType::StorePostgresqlError),
            304 => Some(MetricType::StoreRocksdbError),
            305 => Some(MetricType::StoreSqliteError),
            306 => Some(MetricType::StoreLdapError),
            307 => Some(MetricType::StoreElasticsearchError),
            308 => Some(MetricType::StoreRedisError),
            309 => Some(MetricType::StoreS3Error),
            310 => Some(MetricType::StoreAzureError),
            311 => Some(MetricType::StoreFilesystemError),
            312 => Some(MetricType::StorePoolError),
            313 => Some(MetricType::StoreDataCorruption),
            314 => Some(MetricType::StoreDecompressError),
            315 => Some(MetricType::StoreDeserializeError),
            316 => Some(MetricType::StoreNotFound),
            317 => Some(MetricType::StoreNotConfigured),
            318 => Some(MetricType::StoreNotSupported),
            319 => Some(MetricType::StoreUnexpectedError),
            320 => Some(MetricType::StoreCryptoError),
            321 => Some(MetricType::StoreHttpStoreError),
            322 => Some(MetricType::StoreBlobMissingMarker),
            323 => Some(MetricType::StoreDataWrite),
            324 => Some(MetricType::StoreDataIterate),
            325 => Some(MetricType::StoreBlobRead),
            326 => Some(MetricType::StoreBlobWrite),
            327 => Some(MetricType::StoreBlobDelete),
            328 => Some(MetricType::TaskManagerBlobNotFound),
            329 => Some(MetricType::TaskManagerMetadataNotFound),
            338 => Some(MetricType::TelemetryAlertEvent),
            212 => Some(MetricType::TelemetryAlertMessage),
            330 => Some(MetricType::TelemetryLogError),
            331 => Some(MetricType::TelemetryWebhookError),
            332 => Some(MetricType::TelemetryOtelExporterError),
            333 => Some(MetricType::TelemetryOtelMetricsExporterError),
            334 => Some(MetricType::TelemetryPrometheusExporterError),
            335 => Some(MetricType::TelemetryJournalError),
            336 => Some(MetricType::TlsHandshakeError),
            25 => Some(MetricType::UserCount),
            _ => None,
        }
    }

    pub fn event_id(&self) -> usize {
        match self {
            MetricType::AcmeAuthError => 1,
            MetricType::AcmeAuthTooManyAttempts => 4,
            MetricType::AcmeOrderCompleted => 16,
            MetricType::AcmeOrderInvalid => 17,
            MetricType::AcmeClientMissingSni => 6,
            MetricType::AcmeTlsAlpnError => 24,
            MetricType::AcmeTokenNotFound => 26,
            MetricType::AcmeError => 15,
            MetricType::ArcChainTooLong => 28,
            MetricType::ArcInvalidInstance => 31,
            MetricType::ArcInvalidCv => 30,
            MetricType::ArcHasHeaderTag => 29,
            MetricType::ArcBrokenChain => 27,
            MetricType::AuthSuccess => 37,
            MetricType::AuthFailed => 35,
            MetricType::AuthTooManyAttempts => 38,
            MetricType::AuthError => 34,
            MetricType::CalendarAlarmSent => 579,
            MetricType::CalendarAlarmFailed => 582,
            MetricType::CalendarItipMessageSent => 583,
            MetricType::CalendarItipMessageReceived => 584,
            MetricType::CalendarItipMessageError => 585,
            MetricType::ClusterSubscriberError => 41,
            MetricType::ClusterSubscriberDisconnected => 42,
            MetricType::ClusterPublisherError => 45,
            MetricType::DaneAuthenticationSuccess => 67,
            MetricType::DaneAuthenticationFailure => 66,
            MetricType::DaneNoCertificatesFound => 69,
            MetricType::DaneCertificateParseError => 68,
            MetricType::DaneTlsaRecordFetchError => 71,
            MetricType::DaneTlsaRecordNotFound => 75,
            MetricType::DaneTlsaRecordNotDnssecSigned => 74,
            MetricType::DaneTlsaRecordInvalid => 72,
            MetricType::DeliveryAttemptStart => 77,
            MetricType::DeliveryAttemptEnd => 76,
            MetricType::DeliveryCompleted => 80,
            MetricType::DeliveryMxLookupFailed => 102,
            MetricType::DeliveryIpLookupFailed => 96,
            MetricType::DeliveryNullMx => 103,
            MetricType::DeliveryGreetingFailed => 93,
            MetricType::DeliveryEhloRejected => 91,
            MetricType::DeliveryAuthFailed => 79,
            MetricType::DeliveryMailFromRejected => 98,
            MetricType::DeliveryDelivered => 84,
            MetricType::DeliveryRcptToRejected => 109,
            MetricType::DeliveryRcptToFailed => 108,
            MetricType::DeliveryMessageRejected => 99,
            MetricType::DeliveryStartTlsUnavailable => 113,
            MetricType::DeliveryStartTlsError => 112,
            MetricType::DeliveryStartTlsDisabled => 111,
            MetricType::DeliveryImplicitTlsError => 94,
            MetricType::DeliveryConcurrencyLimitExceeded => 81,
            MetricType::DeliveryRateLimitExceeded => 104,
            MetricType::DeliveryDoubleBounce => 86,
            MetricType::DeliveryDsnSuccess => 88,
            MetricType::DeliveryDsnTempFail => 89,
            MetricType::DeliveryDsnPermFail => 87,
            MetricType::DkimPass => 121,
            MetricType::DkimNeutral => 119,
            MetricType::DkimFail => 114,
            MetricType::DkimPermError => 122,
            MetricType::DkimTempError => 127,
            MetricType::DkimNone => 120,
            MetricType::DkimUnsupportedVersion => 131,
            MetricType::DkimUnsupportedAlgorithm => 128,
            MetricType::DkimUnsupportedCanonicalization => 129,
            MetricType::DkimUnsupportedKeyType => 130,
            MetricType::DkimFailedBodyHashMatch => 116,
            MetricType::DkimFailedVerification => 117,
            MetricType::DkimFailedAuidMatch => 115,
            MetricType::DkimRevokedPublicKey => 123,
            MetricType::DkimIncompatibleAlgorithms => 118,
            MetricType::DkimSignatureExpired => 124,
            MetricType::DkimSignatureLength => 125,
            MetricType::DkimSignerNotFound => 126,
            MetricType::DmarcPass => 134,
            MetricType::DmarcFail => 132,
            MetricType::DmarcPermError => 135,
            MetricType::DmarcTempError => 136,
            MetricType::DmarcNone => 133,
            MetricType::DnsRecordCreationFailed => 9,
            MetricType::DnsRecordDeletionFailed => 10,
            MetricType::DnsRecordLookupFailed => 11,
            MetricType::DnsRecordPropagationTimeout => 14,
            MetricType::EvalError => 138,
            MetricType::EvalDirectoryNotFound => 137,
            MetricType::EvalStoreNotFound => 140,
            MetricType::HttpConnectionStart => 153,
            MetricType::HttpError => 154,
            MetricType::HttpRequestBody => 155,
            MetricType::HttpResponseBody => 157,
            MetricType::HttpXForwardedMissing => 158,
            MetricType::ImapConnectionStart => 163,
            MetricType::ImapConnectionEnd => 162,
            MetricType::IncomingReportDmarcReport => 200,
            MetricType::IncomingReportDmarcReportWithWarnings => 201,
            MetricType::IncomingReportTlsReport => 206,
            MetricType::IncomingReportTlsReportWithWarnings => 207,
            MetricType::IncomingReportAbuseReport => 195,
            MetricType::IncomingReportAuthFailureReport => 197,
            MetricType::IncomingReportFraudReport => 202,
            MetricType::IncomingReportNotSpamReport => 204,
            MetricType::IncomingReportVirusReport => 209,
            MetricType::IncomingReportOtherReport => 205,
            MetricType::IncomingReportMessageParseFailed => 203,
            MetricType::IncomingReportDmarcParseFailed => 199,
            MetricType::IncomingReportTlsRpcParseFailed => 208,
            MetricType::IncomingReportArfParseFailed => 196,
            MetricType::IncomingReportDecompressError => 198,
            MetricType::IprevPass => 212,
            MetricType::IprevFail => 210,
            MetricType::IprevPermError => 213,
            MetricType::IprevTempError => 214,
            MetricType::IprevNone => 211,
            MetricType::JmapMethodCall => 223,
            MetricType::JmapInvalidArguments => 221,
            MetricType::JmapRequestTooLarge => 227,
            MetricType::JmapUnsupportedFilter => 232,
            MetricType::JmapUnsupportedSort => 233,
            MetricType::JmapUnknownMethod => 231,
            MetricType::JmapForbidden => 220,
            MetricType::JmapNotJson => 225,
            MetricType::JmapNotRequest => 226,
            MetricType::JmapWebsocketStart => 235,
            MetricType::JmapWebsocketError => 234,
            MetricType::LimitSizeRequest => 243,
            MetricType::LimitSizeUpload => 244,
            MetricType::LimitCallsIn => 238,
            MetricType::LimitConcurrentRequest => 240,
            MetricType::LimitConcurrentUpload => 241,
            MetricType::LimitConcurrentConnection => 239,
            MetricType::LimitQuota => 242,
            MetricType::LimitBlobQuota => 237,
            MetricType::LimitTenantQuota => 553,
            MetricType::LimitTooManyRequests => 245,
            MetricType::MailAuthParseError => 254,
            MetricType::MailAuthMissingParameters => 252,
            MetricType::MailAuthNoHeadersFound => 253,
            MetricType::MailAuthCrypto => 247,
            MetricType::MailAuthIo => 251,
            MetricType::MailAuthBase64 => 246,
            MetricType::MailAuthDnsError => 248,
            MetricType::MailAuthDnsRecordNotFound => 250,
            MetricType::MailAuthDnsInvalidRecordType => 249,
            MetricType::MailAuthPolicyNotAligned => 255,
            MetricType::ManageSieveConnectionStart => 259,
            MetricType::ManageSieveConnectionEnd => 258,
            MetricType::MessageIngestHam => 283,
            MetricType::MessageIngestSpam => 286,
            MetricType::MessageIngestImapAppend => 284,
            MetricType::MessageIngestJmapAppend => 285,
            MetricType::MessageIngestDuplicate => 281,
            MetricType::MessageIngestError => 282,
            MetricType::MessageIngestSearchIndex => 142,
            MetricType::MilterActionAccept => 287,
            MetricType::MilterActionDiscard => 289,
            MetricType::MilterActionReject => 290,
            MetricType::MilterActionTempFail => 293,
            MetricType::MilterActionReplyCode => 291,
            MetricType::MilterActionConnectionFailure => 288,
            MetricType::MilterActionShutdown => 292,
            MetricType::MtaHookActionAccept => 304,
            MetricType::MtaHookActionDiscard => 305,
            MetricType::MtaHookActionReject => 307,
            MetricType::MtaHookActionQuarantine => 306,
            MetricType::MtaHookError => 308,
            MetricType::MtaStsAuthorized => 309,
            MetricType::MtaStsNotAuthorized => 311,
            MetricType::MtaStsInvalidPolicy => 310,
            MetricType::NetworkTimeout => 327,
            MetricType::OutgoingReportSpfReport => 342,
            MetricType::OutgoingReportSpfRateLimited => 341,
            MetricType::OutgoingReportDkimReport => 330,
            MetricType::OutgoingReportDkimRateLimited => 329,
            MetricType::OutgoingReportDmarcReport => 333,
            MetricType::OutgoingReportDmarcRateLimited => 332,
            MetricType::OutgoingReportDmarcAggregateReport => 331,
            MetricType::OutgoingReportTlsAggregate => 344,
            MetricType::OutgoingReportHttpSubmission => 334,
            MetricType::OutgoingReportUnauthorizedReportingAddress => 345,
            MetricType::OutgoingReportReportingAddressValidationError => 340,
            MetricType::OutgoingReportNotFound => 339,
            MetricType::OutgoingReportSubmissionError => 343,
            MetricType::OutgoingReportNoRecipientsFound => 338,
            MetricType::Pop3ConnectionStart => 348,
            MetricType::Pop3ConnectionEnd => 347,
            MetricType::PushSubscriptionSuccess => 373,
            MetricType::PushSubscriptionError => 371,
            MetricType::PushSubscriptionNotFound => 372,
            MetricType::QueueMessageQueued => 380,
            MetricType::QueueAuthenticatedMessageQueued => 381,
            MetricType::QueueReportQueued => 382,
            MetricType::QueueDsnQueued => 379,
            MetricType::QueueAutogeneratedQueued => 378,
            MetricType::QueueRescheduled => 385,
            MetricType::QueueBlobNotFound => 374,
            MetricType::QueueRateLimitExceeded => 384,
            MetricType::QueueConcurrencyLimitExceeded => 375,
            MetricType::QueueQuotaExceeded => 383,
            MetricType::ResourceNotFound => 389,
            MetricType::ResourceBadParameters => 386,
            MetricType::ResourceError => 388,
            MetricType::SecurityAuthenticationBan => 33,
            MetricType::SecurityAbuseBan => 549,
            MetricType::SecurityScanBan => 558,
            MetricType::SecurityLoiterBan => 550,
            MetricType::SecurityIpBlocked => 318,
            MetricType::SecurityUnauthorized => 552,
            MetricType::ServerThreadError => 395,
            MetricType::SieveActionAccept => 396,
            MetricType::SieveActionAcceptReplace => 397,
            MetricType::SieveActionDiscard => 398,
            MetricType::SieveActionReject => 399,
            MetricType::SieveSendMessage => 406,
            MetricType::SieveMessageTooLarge => 401,
            MetricType::SieveRuntimeError => 404,
            MetricType::SieveUnexpectedError => 407,
            MetricType::SieveNotSupported => 402,
            MetricType::SieveQuotaExceeded => 403,
            MetricType::SmtpConnectionStart => 417,
            MetricType::SmtpConnectionEnd => 416,
            MetricType::SmtpError => 428,
            MetricType::SmtpConcurrencyLimitExceeded => 415,
            MetricType::SmtpTransferLimitExceeded => 485,
            MetricType::SmtpRateLimitExceeded => 461,
            MetricType::SmtpTimeLimitExceeded => 481,
            MetricType::SmtpMessageParseFailed => 450,
            MetricType::SmtpMessageTooLarge => 451,
            MetricType::SmtpLoopDetected => 443,
            MetricType::SmtpDkimPass => 422,
            MetricType::SmtpDkimFail => 421,
            MetricType::SmtpArcPass => 410,
            MetricType::SmtpArcFail => 409,
            MetricType::SmtpSpfEhloPass => 474,
            MetricType::SmtpSpfEhloFail => 473,
            MetricType::SmtpSpfFromPass => 476,
            MetricType::SmtpSpfFromFail => 475,
            MetricType::SmtpDmarcPass => 424,
            MetricType::SmtpDmarcFail => 423,
            MetricType::SmtpIprevPass => 441,
            MetricType::SmtpIprevFail => 440,
            MetricType::SmtpTooManyMessages => 483,
            MetricType::SmtpInvalidEhlo => 436,
            MetricType::SmtpDidNotSayEhlo => 420,
            MetricType::SmtpMailFromUnauthenticated => 447,
            MetricType::SmtpMailFromUnauthorized => 448,
            MetricType::SmtpMailFromMissing => 445,
            MetricType::SmtpMultipleMailFrom => 456,
            MetricType::SmtpMailboxDoesNotExist => 449,
            MetricType::SmtpRelayNotAllowed => 468,
            MetricType::SmtpRcptToDuplicate => 465,
            MetricType::SmtpRcptToMissing => 466,
            MetricType::SmtpTooManyRecipients => 484,
            MetricType::SmtpTooManyInvalidRcpt => 482,
            MetricType::SmtpAuthMechanismNotSupported => 412,
            MetricType::SmtpAuthExchangeTooLong => 411,
            MetricType::SmtpCommandNotImplemented => 414,
            MetricType::SmtpInvalidCommand => 435,
            MetricType::SmtpSyntaxError => 480,
            MetricType::SmtpRequestTooLarge => 470,
            MetricType::SpamPyzorError => 494,
            MetricType::SpamDnsblError => 563,
            MetricType::SpamTrainCompleted => 495,
            MetricType::SpamTrainSampleAdded => 143,
            MetricType::SpamClassify => 490,
            MetricType::SpamModelNotReady => 496,
            MetricType::SpfPass => 501,
            MetricType::SpfFail => 498,
            MetricType::SpfSoftFail => 503,
            MetricType::SpfNeutral => 499,
            MetricType::SpfTempError => 504,
            MetricType::SpfPermError => 502,
            MetricType::SpfNone => 500,
            MetricType::StoreAssertValueFailed => 505,
            MetricType::StoreFoundationdbError => 518,
            MetricType::StoreMysqlError => 522,
            MetricType::StorePostgresqlError => 527,
            MetricType::StoreRocksdbError => 529,
            MetricType::StoreSqliteError => 532,
            MetricType::StoreLdapError => 520,
            MetricType::StoreElasticsearchError => 516,
            MetricType::StoreRedisError => 528,
            MetricType::StoreS3Error => 530,
            MetricType::StoreAzureError => 559,
            MetricType::StoreFilesystemError => 517,
            MetricType::StorePoolError => 526,
            MetricType::StoreDataCorruption => 511,
            MetricType::StoreDecompressError => 514,
            MetricType::StoreDeserializeError => 515,
            MetricType::StoreNotFound => 524,
            MetricType::StoreNotConfigured => 523,
            MetricType::StoreNotSupported => 525,
            MetricType::StoreUnexpectedError => 533,
            MetricType::StoreCryptoError => 510,
            MetricType::StoreHttpStoreError => 493,
            MetricType::StoreBlobMissingMarker => 507,
            MetricType::StoreDataWrite => 513,
            MetricType::StoreDataIterate => 512,
            MetricType::StoreBlobRead => 508,
            MetricType::StoreBlobWrite => 509,
            MetricType::StoreBlobDelete => 506,
            MetricType::TaskManagerBlobNotFound => 141,
            MetricType::TaskManagerMetadataNotFound => 145,
            MetricType::TelemetryAlertEvent => 548,
            MetricType::TelemetryAlertMessage => 365,
            MetricType::TelemetryLogError => 535,
            MetricType::TelemetryWebhookError => 539,
            MetricType::TelemetryOtelExporterError => 536,
            MetricType::TelemetryOtelMetricsExporterError => 537,
            MetricType::TelemetryPrometheusExporterError => 538,
            MetricType::TelemetryJournalError => 534,
            MetricType::TlsHandshakeError => 544,
            _ => usize::MAX,
        }
    }

    pub fn description(&self) -> &'static str {
        match self {
            MetricType::AcmeAuthError => "ACME authentication error",
            MetricType::AcmeAuthTooManyAttempts => "Too many ACME authentication attempts",
            MetricType::AcmeOrderCompleted => "ACME order completed",
            MetricType::AcmeOrderInvalid => "ACME order invalid",
            MetricType::AcmeClientMissingSni => "ACME client missing SNI",
            MetricType::AcmeTlsAlpnError => "ACME TLS ALPN error",
            MetricType::AcmeTokenNotFound => "ACME token not found",
            MetricType::AcmeError => "ACME error",
            MetricType::ArcChainTooLong => "ARC chain too long",
            MetricType::ArcInvalidInstance => "Invalid ARC instance",
            MetricType::ArcInvalidCv => "Invalid ARC CV",
            MetricType::ArcHasHeaderTag => "ARC has header tag",
            MetricType::ArcBrokenChain => "Broken ARC chain",
            MetricType::AuthSuccess => "Authentication successful",
            MetricType::AuthFailed => "Authentication failed",
            MetricType::AuthTooManyAttempts => "Too many authentication attempts",
            MetricType::AuthError => "Authentication error",
            MetricType::CalendarAlarmSent => "Calendar alarm sent",
            MetricType::CalendarAlarmFailed => "Calendar alarm could not be sent",
            MetricType::CalendarItipMessageSent => "Calendar iTIP message sent",
            MetricType::CalendarItipMessageReceived => "Calendar iTIP message received",
            MetricType::CalendarItipMessageError => "iTIP message error",
            MetricType::ClusterSubscriberError => "PubSub subscriber error",
            MetricType::ClusterSubscriberDisconnected => "PubSub subscriber disconnected",
            MetricType::ClusterPublisherError => "PubSub publisher error",
            MetricType::DaneAuthenticationSuccess => "DANE authentication successful",
            MetricType::DaneAuthenticationFailure => "DANE authentication failed",
            MetricType::DaneNoCertificatesFound => "No certificates found for DANE",
            MetricType::DaneCertificateParseError => "Error parsing certificate for DANE",
            MetricType::DaneTlsaRecordFetchError => "Error fetching TLSA record",
            MetricType::DaneTlsaRecordNotFound => "TLSA record not found",
            MetricType::DaneTlsaRecordNotDnssecSigned => "TLSA record not DNSSEC signed",
            MetricType::DaneTlsaRecordInvalid => "Invalid TLSA record",
            MetricType::DeliveryTotalTime => {
                "Total message delivery time from submission to delivery"
            }
            MetricType::DeliveryAttemptTime => "Message delivery time",
            MetricType::DeliveryActiveConnections => "Active delivery connections",
            MetricType::DeliveryAttemptStart => "Delivery attempt started",
            MetricType::DeliveryAttemptEnd => "Delivery attempt ended",
            MetricType::DeliveryCompleted => "Delivery completed",
            MetricType::DeliveryMxLookupFailed => "MX record lookup failed",
            MetricType::DeliveryIpLookupFailed => "IP address lookup failed",
            MetricType::DeliveryNullMx => "Null MX record found",
            MetricType::DeliveryGreetingFailed => "SMTP greeting failed",
            MetricType::DeliveryEhloRejected => "SMTP EHLO rejected",
            MetricType::DeliveryAuthFailed => "SMTP authentication failed",
            MetricType::DeliveryMailFromRejected => "SMTP MAIL FROM rejected",
            MetricType::DeliveryDelivered => "Message delivered",
            MetricType::DeliveryRcptToRejected => "SMTP RCPT TO rejected",
            MetricType::DeliveryRcptToFailed => "SMTP RCPT TO failed",
            MetricType::DeliveryMessageRejected => "Message rejected by remote server",
            MetricType::DeliveryStartTlsUnavailable => "STARTTLS unavailable",
            MetricType::DeliveryStartTlsError => "STARTTLS error",
            MetricType::DeliveryStartTlsDisabled => "STARTTLS disabled",
            MetricType::DeliveryImplicitTlsError => "Implicit TLS error",
            MetricType::DeliveryConcurrencyLimitExceeded => "Concurrency limit exceeded",
            MetricType::DeliveryRateLimitExceeded => "Rate limit exceeded",
            MetricType::DeliveryDoubleBounce => "Discarding message after double bounce",
            MetricType::DeliveryDsnSuccess => "DSN success notification",
            MetricType::DeliveryDsnTempFail => "DSN temporary failure notification",
            MetricType::DeliveryDsnPermFail => "DSN permanent failure notification",
            MetricType::DkimPass => "DKIM verification passed",
            MetricType::DkimNeutral => "DKIM verification neutral",
            MetricType::DkimFail => "DKIM verification failed",
            MetricType::DkimPermError => "DKIM permanent error",
            MetricType::DkimTempError => "DKIM temporary error",
            MetricType::DkimNone => "No DKIM signature",
            MetricType::DkimUnsupportedVersion => "Unsupported DKIM version",
            MetricType::DkimUnsupportedAlgorithm => "Unsupported DKIM algorithm",
            MetricType::DkimUnsupportedCanonicalization => "Unsupported DKIM canonicalization",
            MetricType::DkimUnsupportedKeyType => "Unsupported DKIM key type",
            MetricType::DkimFailedBodyHashMatch => "DKIM body hash mismatch",
            MetricType::DkimFailedVerification => "DKIM verification failed",
            MetricType::DkimFailedAuidMatch => "DKIM AUID mismatch",
            MetricType::DkimRevokedPublicKey => "DKIM public key revoked",
            MetricType::DkimIncompatibleAlgorithms => "Incompatible DKIM algorithms",
            MetricType::DkimSignatureExpired => "DKIM signature expired",
            MetricType::DkimSignatureLength => "DKIM signature length issue",
            MetricType::DkimSignerNotFound => "DKIM signer not found",
            MetricType::DmarcPass => "DMARC check passed",
            MetricType::DmarcFail => "DMARC check failed",
            MetricType::DmarcPermError => "DMARC permanent error",
            MetricType::DmarcTempError => "DMARC temporary error",
            MetricType::DmarcNone => "No DMARC record",
            MetricType::DnsLookupTime => "DNS lookup time",
            MetricType::DnsRecordCreationFailed => "DNS record creation failed",
            MetricType::DnsRecordDeletionFailed => "DNS record deletion failed",
            MetricType::DnsRecordLookupFailed => "DNS record lookup failed",
            MetricType::DnsRecordPropagationTimeout => "DNS record propagation timeout",
            MetricType::DomainCount => "Total number of domains",
            MetricType::EvalError => "Expression evaluation error",
            MetricType::EvalDirectoryNotFound => "Directory not found while evaluating expression",
            MetricType::EvalStoreNotFound => "Store not found while evaluating expression",
            MetricType::HttpRequestTime => "HTTP request duration",
            MetricType::HttpActiveConnections => "Active HTTP connections",
            MetricType::HttpConnectionStart => "HTTP connection started",
            MetricType::HttpError => "HTTP error occurred",
            MetricType::HttpRequestBody => "HTTP request body",
            MetricType::HttpResponseBody => "HTTP response body",
            MetricType::HttpXForwardedMissing => "X-Forwarded-For header is missing",
            MetricType::ImapRequestTime => "IMAP request duration",
            MetricType::ImapActiveConnections => "Active IMAP connections",
            MetricType::ImapConnectionStart => "IMAP connection started",
            MetricType::ImapConnectionEnd => "IMAP connection ended",
            MetricType::IncomingReportDmarcReport => "DMARC report received",
            MetricType::IncomingReportDmarcReportWithWarnings => {
                "DMARC report received with warnings"
            }
            MetricType::IncomingReportTlsReport => "TLS report received",
            MetricType::IncomingReportTlsReportWithWarnings => "TLS report received with warnings",
            MetricType::IncomingReportAbuseReport => "Abuse report received",
            MetricType::IncomingReportAuthFailureReport => "Authentication failure report received",
            MetricType::IncomingReportFraudReport => "Fraud report received",
            MetricType::IncomingReportNotSpamReport => "Not spam report received",
            MetricType::IncomingReportVirusReport => "Virus report received",
            MetricType::IncomingReportOtherReport => "Other type of report received",
            MetricType::IncomingReportMessageParseFailed => {
                "Failed to parse incoming report message"
            }
            MetricType::IncomingReportDmarcParseFailed => "Failed to parse DMARC report",
            MetricType::IncomingReportTlsRpcParseFailed => "Failed to parse TLS RPC report",
            MetricType::IncomingReportArfParseFailed => "Failed to parse ARF report",
            MetricType::IncomingReportDecompressError => "Error decompressing report",
            MetricType::IprevPass => "IPREV check passed",
            MetricType::IprevFail => "IPREV check failed",
            MetricType::IprevPermError => "IPREV permanent error",
            MetricType::IprevTempError => "IPREV temporary error",
            MetricType::IprevNone => "No IPREV record",
            MetricType::JmapMethodCall => "JMAP method call",
            MetricType::JmapInvalidArguments => "Invalid JMAP arguments",
            MetricType::JmapRequestTooLarge => "JMAP request too large",
            MetricType::JmapUnsupportedFilter => "Unsupported JMAP filter",
            MetricType::JmapUnsupportedSort => "Unsupported JMAP sort",
            MetricType::JmapUnknownMethod => "Unknown JMAP method",
            MetricType::JmapForbidden => "JMAP operation forbidden",
            MetricType::JmapNotJson => "JMAP request is not JSON",
            MetricType::JmapNotRequest => "JMAP input is not a request",
            MetricType::JmapWebsocketStart => "JMAP WebSocket connection started",
            MetricType::JmapWebsocketError => "JMAP WebSocket error",
            MetricType::LimitSizeRequest => "Request size limit reached",
            MetricType::LimitSizeUpload => "Upload size limit reached",
            MetricType::LimitCallsIn => "Incoming calls limit reached",
            MetricType::LimitConcurrentRequest => "Concurrent request limit reached",
            MetricType::LimitConcurrentUpload => "Concurrent upload limit reached",
            MetricType::LimitConcurrentConnection => "Concurrent connection limit reached",
            MetricType::LimitQuota => "Quota limit reached",
            MetricType::LimitBlobQuota => "Blob quota limit reached",
            MetricType::LimitTenantQuota => "Tenant quota limit reached",
            MetricType::LimitTooManyRequests => "Too many requests",
            MetricType::MailAuthParseError => "Mail authentication parse error",
            MetricType::MailAuthMissingParameters => "Missing mail authentication parameters",
            MetricType::MailAuthNoHeadersFound => "No headers found in message",
            MetricType::MailAuthCrypto => "Crypto error during mail authentication",
            MetricType::MailAuthIo => "I/O error during mail authentication",
            MetricType::MailAuthBase64 => "Base64 error during mail authentication",
            MetricType::MailAuthDnsError => "DNS error",
            MetricType::MailAuthDnsRecordNotFound => "DNS record not found",
            MetricType::MailAuthDnsInvalidRecordType => "Invalid DNS record type",
            MetricType::MailAuthPolicyNotAligned => "Policy not aligned",
            MetricType::ManageSieveConnectionStart => "ManageSieve connection started",
            MetricType::ManageSieveConnectionEnd => "ManageSieve connection ended",
            MetricType::MessageSize => "Received message size",
            MetricType::MessageAuthenticatedSize => {
                "Received message size from authenticated users"
            }
            MetricType::MessageIngestTime => "Message ingestion time",
            MetricType::MessageIngestIndexTime => "Message full-text indexing time",
            MetricType::MessageIngestHam => "Message ingested",
            MetricType::MessageIngestSpam => "Possible spam message ingested",
            MetricType::MessageIngestImapAppend => "Message appended via IMAP",
            MetricType::MessageIngestJmapAppend => "Message appended via JMAP",
            MetricType::MessageIngestDuplicate => "Skipping duplicate message",
            MetricType::MessageIngestError => "Message ingestion error",
            MetricType::MessageIngestSearchIndex => "Search index updated",
            MetricType::MilterActionAccept => "Milter action: Accept",
            MetricType::MilterActionDiscard => "Milter action: Discard",
            MetricType::MilterActionReject => "Milter action: Reject",
            MetricType::MilterActionTempFail => "Milter action: Temporary failure",
            MetricType::MilterActionReplyCode => "Milter action: Reply code",
            MetricType::MilterActionConnectionFailure => "Milter action: Connection failure",
            MetricType::MilterActionShutdown => "Milter action: Shutdown",
            MetricType::MtaHookActionAccept => "MTA hook action: Accept",
            MetricType::MtaHookActionDiscard => "MTA hook action: Discard",
            MetricType::MtaHookActionReject => "MTA hook action: Reject",
            MetricType::MtaHookActionQuarantine => "MTA hook action: Quarantine",
            MetricType::MtaHookError => "MTA hook error",
            MetricType::MtaStsAuthorized => "Host authorized by MTA-STS policy",
            MetricType::MtaStsNotAuthorized => "Host not authorized by MTA-STS policy",
            MetricType::MtaStsInvalidPolicy => "Invalid MTA-STS policy",
            MetricType::NetworkTimeout => "Network timeout",
            MetricType::OutgoingReportSize => "Outgoing report size",
            MetricType::OutgoingReportSpfReport => "SPF report sent",
            MetricType::OutgoingReportSpfRateLimited => "SPF report rate limited",
            MetricType::OutgoingReportDkimReport => "DKIM report sent",
            MetricType::OutgoingReportDkimRateLimited => "DKIM report rate limited",
            MetricType::OutgoingReportDmarcReport => "DMARC report sent",
            MetricType::OutgoingReportDmarcRateLimited => "DMARC report rate limited",
            MetricType::OutgoingReportDmarcAggregateReport => "DMARC aggregate is being prepared",
            MetricType::OutgoingReportTlsAggregate => "TLS aggregate report is being prepared",
            MetricType::OutgoingReportHttpSubmission => "Report submitted via HTTP",
            MetricType::OutgoingReportUnauthorizedReportingAddress => {
                "Unauthorized reporting address"
            }
            MetricType::OutgoingReportReportingAddressValidationError => {
                "Error validating reporting address"
            }
            MetricType::OutgoingReportNotFound => "Report not found",
            MetricType::OutgoingReportSubmissionError => "Error submitting report",
            MetricType::OutgoingReportNoRecipientsFound => "No recipients found for report",
            MetricType::Pop3RequestTime => "POP3 request duration",
            MetricType::Pop3ActiveConnections => "Active POP3 connections",
            MetricType::Pop3ConnectionStart => "POP3 connection started",
            MetricType::Pop3ConnectionEnd => "POP3 connection ended",
            MetricType::PushSubscriptionSuccess => "Push subscription successful",
            MetricType::PushSubscriptionError => "Push subscription error",
            MetricType::PushSubscriptionNotFound => "Push subscription not found",
            MetricType::QueueCount => "Total number of messages in the queue",
            MetricType::QueueMessageQueued => "Queued message for delivery",
            MetricType::QueueAuthenticatedMessageQueued => "Queued message submission for delivery",
            MetricType::QueueReportQueued => "Queued report for delivery",
            MetricType::QueueDsnQueued => "Queued DSN for delivery",
            MetricType::QueueAutogeneratedQueued => "Queued autogenerated message for delivery",
            MetricType::QueueRescheduled => "Message rescheduled for delivery",
            MetricType::QueueBlobNotFound => "Message blob not found",
            MetricType::QueueRateLimitExceeded => "Rate limit exceeded",
            MetricType::QueueConcurrencyLimitExceeded => "Concurrency limit exceeded",
            MetricType::QueueQuotaExceeded => "Quota exceeded",
            MetricType::ResourceNotFound => "Resource not found",
            MetricType::ResourceBadParameters => "Bad resource parameters",
            MetricType::ResourceError => "Resource error",
            MetricType::SecurityAuthenticationBan => "Banned due to authentication errors",
            MetricType::SecurityAbuseBan => "Banned due to abuse",
            MetricType::SecurityScanBan => "Banned due to scan",
            MetricType::SecurityLoiterBan => "Banned due to loitering",
            MetricType::SecurityIpBlocked => "Blocked IP address",
            MetricType::SecurityUnauthorized => "Unauthorized access",
            MetricType::ServerMemory => "Server memory usage",
            MetricType::ServerThreadError => "Server thread error",
            MetricType::SieveRequestTime => "ManageSieve request duration",
            MetricType::SieveActiveConnections => "Active ManageSieve connections",
            MetricType::SieveActionAccept => "Sieve action: Accept",
            MetricType::SieveActionAcceptReplace => "Sieve action: Accept and replace",
            MetricType::SieveActionDiscard => "Sieve action: Discard",
            MetricType::SieveActionReject => "Sieve action: Reject",
            MetricType::SieveSendMessage => "Sieve sending message",
            MetricType::SieveMessageTooLarge => "Sieve message too large",
            MetricType::SieveRuntimeError => "Sieve runtime error",
            MetricType::SieveUnexpectedError => "Unexpected Sieve error",
            MetricType::SieveNotSupported => "Sieve action not supported",
            MetricType::SieveQuotaExceeded => "Sieve quota exceeded",
            MetricType::SmtpRequestTime => "SMTP request duration",
            MetricType::SmtpActiveConnections => "Active SMTP connections",
            MetricType::SmtpConnectionStart => "SMTP connection started",
            MetricType::SmtpConnectionEnd => "SMTP connection ended",
            MetricType::SmtpError => "SMTP error occurred",
            MetricType::SmtpConcurrencyLimitExceeded => "Concurrency limit exceeded",
            MetricType::SmtpTransferLimitExceeded => "Transfer limit exceeded",
            MetricType::SmtpRateLimitExceeded => "Rate limit exceeded",
            MetricType::SmtpTimeLimitExceeded => "Time limit exceeded",
            MetricType::SmtpMessageParseFailed => "Message parsing failed",
            MetricType::SmtpMessageTooLarge => "Message too large",
            MetricType::SmtpLoopDetected => "Mail loop detected",
            MetricType::SmtpDkimPass => "DKIM verification passed",
            MetricType::SmtpDkimFail => "DKIM verification failed",
            MetricType::SmtpArcPass => "ARC verification passed",
            MetricType::SmtpArcFail => "ARC verification failed",
            MetricType::SmtpSpfEhloPass => "SPF EHLO check passed",
            MetricType::SmtpSpfEhloFail => "SPF EHLO check failed",
            MetricType::SmtpSpfFromPass => "SPF From check passed",
            MetricType::SmtpSpfFromFail => "SPF From check failed",
            MetricType::SmtpDmarcPass => "DMARC check passed",
            MetricType::SmtpDmarcFail => "DMARC check failed",
            MetricType::SmtpIprevPass => "IPREV check passed",
            MetricType::SmtpIprevFail => "IPREV check failed",
            MetricType::SmtpTooManyMessages => "Too many messages",
            MetricType::SmtpInvalidEhlo => "Invalid EHLO command",
            MetricType::SmtpDidNotSayEhlo => "Client did not say EHLO",
            MetricType::SmtpMailFromUnauthenticated => "MAIL FROM without authentication",
            MetricType::SmtpMailFromUnauthorized => "MAIL FROM unauthorized",
            MetricType::SmtpMailFromMissing => "MAIL FROM address missing",
            MetricType::SmtpMultipleMailFrom => "Multiple MAIL FROM commands",
            MetricType::SmtpMailboxDoesNotExist => "Mailbox does not exist",
            MetricType::SmtpRelayNotAllowed => "Relay not allowed",
            MetricType::SmtpRcptToDuplicate => "Duplicate RCPT TO",
            MetricType::SmtpRcptToMissing => "RCPT TO address missing",
            MetricType::SmtpTooManyRecipients => "Too many recipients",
            MetricType::SmtpTooManyInvalidRcpt => "Too many invalid recipients",
            MetricType::SmtpAuthMechanismNotSupported => "Auth mechanism not supported",
            MetricType::SmtpAuthExchangeTooLong => "Auth exchange too long",
            MetricType::SmtpCommandNotImplemented => "Command not implemented",
            MetricType::SmtpInvalidCommand => "Invalid command",
            MetricType::SmtpSyntaxError => "Syntax error",
            MetricType::SmtpRequestTooLarge => "Request too large",
            MetricType::SpamPyzorError => "Pyzor error",
            MetricType::SpamDnsblError => "Error querying DNSBL",
            MetricType::SpamTrainCompleted => "Spam classifier training completed",
            MetricType::SpamTrainSampleAdded => "New training sample added",
            MetricType::SpamClassify => "Classifying message for spam",
            MetricType::SpamModelNotReady => "Spam classifier model not ready",
            MetricType::SpfPass => "SPF check passed",
            MetricType::SpfFail => "SPF check failed",
            MetricType::SpfSoftFail => "SPF soft fail",
            MetricType::SpfNeutral => "SPF neutral result",
            MetricType::SpfTempError => "SPF temporary error",
            MetricType::SpfPermError => "SPF permanent error",
            MetricType::SpfNone => "No SPF record",
            MetricType::StoreDataReadTime => "Data store read time",
            MetricType::StoreDataWriteTime => "Data store write time",
            MetricType::StoreBlobReadTime => "Blob store read time",
            MetricType::StoreBlobWriteTime => "Blob store write time",
            MetricType::StoreAssertValueFailed => "Another process modified the record",
            MetricType::StoreFoundationdbError => "FoundationDB error",
            MetricType::StoreMysqlError => "MySQL error",
            MetricType::StorePostgresqlError => "PostgreSQL error",
            MetricType::StoreRocksdbError => "RocksDB error",
            MetricType::StoreSqliteError => "SQLite error",
            MetricType::StoreLdapError => "LDAP error",
            MetricType::StoreElasticsearchError => "ElasticSearch error",
            MetricType::StoreRedisError => "Redis error",
            MetricType::StoreS3Error => "S3 error",
            MetricType::StoreAzureError => "Azure error",
            MetricType::StoreFilesystemError => "Filesystem error",
            MetricType::StorePoolError => "Connection pool error",
            MetricType::StoreDataCorruption => "Data corruption detected",
            MetricType::StoreDecompressError => "Decompression error",
            MetricType::StoreDeserializeError => "Deserialization error",
            MetricType::StoreNotFound => "Record not found in database",
            MetricType::StoreNotConfigured => "Store not configured",
            MetricType::StoreNotSupported => "Operation not supported by store",
            MetricType::StoreUnexpectedError => "Unexpected store error",
            MetricType::StoreCryptoError => "Store crypto error",
            MetricType::StoreHttpStoreError => "Error updating HTTP store",
            MetricType::StoreBlobMissingMarker => "Blob missing marker",
            MetricType::StoreDataWrite => "Write batch operation",
            MetricType::StoreDataIterate => "Data store iteration operation",
            MetricType::StoreBlobRead => "Blob read operation",
            MetricType::StoreBlobWrite => "Blob write operation",
            MetricType::StoreBlobDelete => "Blob delete operation",
            MetricType::TaskManagerBlobNotFound => "Blob not found for task",
            MetricType::TaskManagerMetadataNotFound => "Metadata not found for task",
            MetricType::TelemetryAlertEvent => "Alert event triggered",
            MetricType::TelemetryAlertMessage => "Alert message sent",
            MetricType::TelemetryLogError => "Log collector error",
            MetricType::TelemetryWebhookError => "Webhook collector error",
            MetricType::TelemetryOtelExporterError => "OpenTelemetry exporter error",
            MetricType::TelemetryOtelMetricsExporterError => "OpenTelemetry metrics exporter error",
            MetricType::TelemetryPrometheusExporterError => "Prometheus exporter error",
            MetricType::TelemetryJournalError => "Journal collector error",
            MetricType::TlsHandshakeError => "TLS handshake error",
            MetricType::UserCount => "Total number of users",
        }
    }

    pub fn unit(&self) -> &'static str {
        match self {
            MetricType::MessageSize
            | MetricType::MessageAuthenticatedSize
            | MetricType::OutgoingReportSize
            | MetricType::ServerMemory => "bytes",
            MetricType::DeliveryActiveConnections
            | MetricType::HttpActiveConnections
            | MetricType::ImapActiveConnections
            | MetricType::Pop3ActiveConnections
            | MetricType::SieveActiveConnections
            | MetricType::SmtpActiveConnections => "connections",
            MetricType::AcmeAuthError
            | MetricType::AcmeAuthTooManyAttempts
            | MetricType::AcmeOrderCompleted
            | MetricType::AcmeOrderInvalid
            | MetricType::AcmeClientMissingSni
            | MetricType::AcmeTlsAlpnError
            | MetricType::AcmeTokenNotFound
            | MetricType::AcmeError
            | MetricType::ArcChainTooLong
            | MetricType::ArcInvalidInstance
            | MetricType::ArcInvalidCv
            | MetricType::ArcHasHeaderTag
            | MetricType::ArcBrokenChain
            | MetricType::AuthSuccess
            | MetricType::AuthFailed
            | MetricType::AuthTooManyAttempts
            | MetricType::AuthError
            | MetricType::CalendarAlarmSent
            | MetricType::CalendarAlarmFailed
            | MetricType::CalendarItipMessageSent
            | MetricType::CalendarItipMessageReceived
            | MetricType::CalendarItipMessageError
            | MetricType::ClusterSubscriberError
            | MetricType::ClusterSubscriberDisconnected
            | MetricType::ClusterPublisherError
            | MetricType::DaneAuthenticationSuccess
            | MetricType::DaneAuthenticationFailure
            | MetricType::DaneNoCertificatesFound
            | MetricType::DaneCertificateParseError
            | MetricType::DaneTlsaRecordFetchError
            | MetricType::DaneTlsaRecordNotFound
            | MetricType::DaneTlsaRecordNotDnssecSigned
            | MetricType::DaneTlsaRecordInvalid
            | MetricType::DeliveryAttemptStart
            | MetricType::DeliveryAttemptEnd
            | MetricType::DeliveryCompleted
            | MetricType::DeliveryMxLookupFailed
            | MetricType::DeliveryIpLookupFailed
            | MetricType::DeliveryNullMx
            | MetricType::DeliveryGreetingFailed
            | MetricType::DeliveryEhloRejected
            | MetricType::DeliveryAuthFailed
            | MetricType::DeliveryMailFromRejected
            | MetricType::DeliveryDelivered
            | MetricType::DeliveryRcptToRejected
            | MetricType::DeliveryRcptToFailed
            | MetricType::DeliveryMessageRejected
            | MetricType::DeliveryStartTlsUnavailable
            | MetricType::DeliveryStartTlsError
            | MetricType::DeliveryStartTlsDisabled
            | MetricType::DeliveryImplicitTlsError
            | MetricType::DeliveryConcurrencyLimitExceeded
            | MetricType::DeliveryRateLimitExceeded
            | MetricType::DeliveryDoubleBounce
            | MetricType::DeliveryDsnSuccess
            | MetricType::DeliveryDsnTempFail
            | MetricType::DeliveryDsnPermFail
            | MetricType::DkimPass
            | MetricType::DkimNeutral
            | MetricType::DkimFail
            | MetricType::DkimPermError
            | MetricType::DkimTempError
            | MetricType::DkimNone
            | MetricType::DkimUnsupportedVersion
            | MetricType::DkimUnsupportedAlgorithm
            | MetricType::DkimUnsupportedCanonicalization
            | MetricType::DkimUnsupportedKeyType
            | MetricType::DkimFailedBodyHashMatch
            | MetricType::DkimFailedVerification
            | MetricType::DkimFailedAuidMatch
            | MetricType::DkimRevokedPublicKey
            | MetricType::DkimIncompatibleAlgorithms
            | MetricType::DkimSignatureExpired
            | MetricType::DkimSignatureLength
            | MetricType::DkimSignerNotFound
            | MetricType::DmarcPass
            | MetricType::DmarcFail
            | MetricType::DmarcPermError
            | MetricType::DmarcTempError
            | MetricType::DmarcNone
            | MetricType::DnsRecordCreationFailed
            | MetricType::DnsRecordDeletionFailed
            | MetricType::DnsRecordLookupFailed
            | MetricType::DnsRecordPropagationTimeout
            | MetricType::EvalError
            | MetricType::EvalDirectoryNotFound
            | MetricType::EvalStoreNotFound
            | MetricType::HttpConnectionStart
            | MetricType::HttpError
            | MetricType::HttpRequestBody
            | MetricType::HttpResponseBody
            | MetricType::HttpXForwardedMissing
            | MetricType::ImapConnectionStart
            | MetricType::ImapConnectionEnd
            | MetricType::IncomingReportDmarcReport
            | MetricType::IncomingReportDmarcReportWithWarnings
            | MetricType::IncomingReportTlsReport
            | MetricType::IncomingReportTlsReportWithWarnings
            | MetricType::IncomingReportAbuseReport
            | MetricType::IncomingReportAuthFailureReport
            | MetricType::IncomingReportFraudReport
            | MetricType::IncomingReportNotSpamReport
            | MetricType::IncomingReportVirusReport
            | MetricType::IncomingReportOtherReport
            | MetricType::IncomingReportMessageParseFailed
            | MetricType::IncomingReportDmarcParseFailed
            | MetricType::IncomingReportTlsRpcParseFailed
            | MetricType::IncomingReportArfParseFailed
            | MetricType::IncomingReportDecompressError
            | MetricType::IprevPass
            | MetricType::IprevFail
            | MetricType::IprevPermError
            | MetricType::IprevTempError
            | MetricType::IprevNone
            | MetricType::JmapMethodCall
            | MetricType::JmapInvalidArguments
            | MetricType::JmapRequestTooLarge
            | MetricType::JmapUnsupportedFilter
            | MetricType::JmapUnsupportedSort
            | MetricType::JmapUnknownMethod
            | MetricType::JmapForbidden
            | MetricType::JmapNotJson
            | MetricType::JmapNotRequest
            | MetricType::JmapWebsocketStart
            | MetricType::JmapWebsocketError
            | MetricType::LimitSizeRequest
            | MetricType::LimitSizeUpload
            | MetricType::LimitCallsIn
            | MetricType::LimitConcurrentRequest
            | MetricType::LimitConcurrentUpload
            | MetricType::LimitConcurrentConnection
            | MetricType::LimitQuota
            | MetricType::LimitBlobQuota
            | MetricType::LimitTenantQuota
            | MetricType::LimitTooManyRequests
            | MetricType::MailAuthParseError
            | MetricType::MailAuthMissingParameters
            | MetricType::MailAuthNoHeadersFound
            | MetricType::MailAuthCrypto
            | MetricType::MailAuthIo
            | MetricType::MailAuthBase64
            | MetricType::MailAuthDnsError
            | MetricType::MailAuthDnsRecordNotFound
            | MetricType::MailAuthDnsInvalidRecordType
            | MetricType::MailAuthPolicyNotAligned
            | MetricType::ManageSieveConnectionStart
            | MetricType::ManageSieveConnectionEnd
            | MetricType::MessageIngestHam
            | MetricType::MessageIngestSpam
            | MetricType::MessageIngestImapAppend
            | MetricType::MessageIngestJmapAppend
            | MetricType::MessageIngestDuplicate
            | MetricType::MessageIngestError
            | MetricType::MessageIngestSearchIndex
            | MetricType::MilterActionAccept
            | MetricType::MilterActionDiscard
            | MetricType::MilterActionReject
            | MetricType::MilterActionTempFail
            | MetricType::MilterActionReplyCode
            | MetricType::MilterActionConnectionFailure
            | MetricType::MilterActionShutdown
            | MetricType::MtaHookActionAccept
            | MetricType::MtaHookActionDiscard
            | MetricType::MtaHookActionReject
            | MetricType::MtaHookActionQuarantine
            | MetricType::MtaHookError
            | MetricType::MtaStsAuthorized
            | MetricType::MtaStsNotAuthorized
            | MetricType::MtaStsInvalidPolicy
            | MetricType::NetworkTimeout
            | MetricType::OutgoingReportSpfReport
            | MetricType::OutgoingReportSpfRateLimited
            | MetricType::OutgoingReportDkimReport
            | MetricType::OutgoingReportDkimRateLimited
            | MetricType::OutgoingReportDmarcReport
            | MetricType::OutgoingReportDmarcRateLimited
            | MetricType::OutgoingReportDmarcAggregateReport
            | MetricType::OutgoingReportTlsAggregate
            | MetricType::OutgoingReportHttpSubmission
            | MetricType::OutgoingReportUnauthorizedReportingAddress
            | MetricType::OutgoingReportReportingAddressValidationError
            | MetricType::OutgoingReportNotFound
            | MetricType::OutgoingReportSubmissionError
            | MetricType::OutgoingReportNoRecipientsFound
            | MetricType::Pop3ConnectionStart
            | MetricType::Pop3ConnectionEnd
            | MetricType::PushSubscriptionSuccess
            | MetricType::PushSubscriptionError
            | MetricType::PushSubscriptionNotFound
            | MetricType::QueueMessageQueued
            | MetricType::QueueAuthenticatedMessageQueued
            | MetricType::QueueReportQueued
            | MetricType::QueueDsnQueued
            | MetricType::QueueAutogeneratedQueued
            | MetricType::QueueRescheduled
            | MetricType::QueueBlobNotFound
            | MetricType::QueueRateLimitExceeded
            | MetricType::QueueConcurrencyLimitExceeded
            | MetricType::QueueQuotaExceeded
            | MetricType::ResourceNotFound
            | MetricType::ResourceBadParameters
            | MetricType::ResourceError
            | MetricType::SecurityAuthenticationBan
            | MetricType::SecurityAbuseBan
            | MetricType::SecurityScanBan
            | MetricType::SecurityLoiterBan
            | MetricType::SecurityIpBlocked
            | MetricType::SecurityUnauthorized
            | MetricType::ServerThreadError
            | MetricType::SieveActionAccept
            | MetricType::SieveActionAcceptReplace
            | MetricType::SieveActionDiscard
            | MetricType::SieveActionReject
            | MetricType::SieveSendMessage
            | MetricType::SieveMessageTooLarge
            | MetricType::SieveRuntimeError
            | MetricType::SieveUnexpectedError
            | MetricType::SieveNotSupported
            | MetricType::SieveQuotaExceeded
            | MetricType::SmtpConnectionStart
            | MetricType::SmtpConnectionEnd
            | MetricType::SmtpError
            | MetricType::SmtpConcurrencyLimitExceeded
            | MetricType::SmtpTransferLimitExceeded
            | MetricType::SmtpRateLimitExceeded
            | MetricType::SmtpTimeLimitExceeded
            | MetricType::SmtpMessageParseFailed
            | MetricType::SmtpMessageTooLarge
            | MetricType::SmtpLoopDetected
            | MetricType::SmtpDkimPass
            | MetricType::SmtpDkimFail
            | MetricType::SmtpArcPass
            | MetricType::SmtpArcFail
            | MetricType::SmtpSpfEhloPass
            | MetricType::SmtpSpfEhloFail
            | MetricType::SmtpSpfFromPass
            | MetricType::SmtpSpfFromFail
            | MetricType::SmtpDmarcPass
            | MetricType::SmtpDmarcFail
            | MetricType::SmtpIprevPass
            | MetricType::SmtpIprevFail
            | MetricType::SmtpTooManyMessages
            | MetricType::SmtpInvalidEhlo
            | MetricType::SmtpDidNotSayEhlo
            | MetricType::SmtpMailFromUnauthenticated
            | MetricType::SmtpMailFromUnauthorized
            | MetricType::SmtpMailFromMissing
            | MetricType::SmtpMultipleMailFrom
            | MetricType::SmtpMailboxDoesNotExist
            | MetricType::SmtpRelayNotAllowed
            | MetricType::SmtpRcptToDuplicate
            | MetricType::SmtpRcptToMissing
            | MetricType::SmtpTooManyRecipients
            | MetricType::SmtpTooManyInvalidRcpt
            | MetricType::SmtpAuthMechanismNotSupported
            | MetricType::SmtpAuthExchangeTooLong
            | MetricType::SmtpCommandNotImplemented
            | MetricType::SmtpInvalidCommand
            | MetricType::SmtpSyntaxError
            | MetricType::SmtpRequestTooLarge
            | MetricType::SpamPyzorError
            | MetricType::SpamDnsblError
            | MetricType::SpamTrainCompleted
            | MetricType::SpamTrainSampleAdded
            | MetricType::SpamClassify
            | MetricType::SpamModelNotReady
            | MetricType::SpfPass
            | MetricType::SpfFail
            | MetricType::SpfSoftFail
            | MetricType::SpfNeutral
            | MetricType::SpfTempError
            | MetricType::SpfPermError
            | MetricType::SpfNone
            | MetricType::StoreAssertValueFailed
            | MetricType::StoreFoundationdbError
            | MetricType::StoreMysqlError
            | MetricType::StorePostgresqlError
            | MetricType::StoreRocksdbError
            | MetricType::StoreSqliteError
            | MetricType::StoreLdapError
            | MetricType::StoreElasticsearchError
            | MetricType::StoreRedisError
            | MetricType::StoreS3Error
            | MetricType::StoreAzureError
            | MetricType::StoreFilesystemError
            | MetricType::StorePoolError
            | MetricType::StoreDataCorruption
            | MetricType::StoreDecompressError
            | MetricType::StoreDeserializeError
            | MetricType::StoreNotFound
            | MetricType::StoreNotConfigured
            | MetricType::StoreNotSupported
            | MetricType::StoreUnexpectedError
            | MetricType::StoreCryptoError
            | MetricType::StoreHttpStoreError
            | MetricType::StoreBlobMissingMarker
            | MetricType::StoreDataWrite
            | MetricType::StoreDataIterate
            | MetricType::StoreBlobRead
            | MetricType::StoreBlobWrite
            | MetricType::StoreBlobDelete
            | MetricType::TaskManagerBlobNotFound
            | MetricType::TaskManagerMetadataNotFound
            | MetricType::TelemetryAlertEvent
            | MetricType::TelemetryAlertMessage
            | MetricType::TelemetryLogError
            | MetricType::TelemetryWebhookError
            | MetricType::TelemetryOtelExporterError
            | MetricType::TelemetryOtelMetricsExporterError
            | MetricType::TelemetryPrometheusExporterError
            | MetricType::TelemetryJournalError
            | MetricType::TlsHandshakeError => "count",
            MetricType::DomainCount => "domains",
            MetricType::QueueCount => "messages",
            MetricType::DeliveryTotalTime
            | MetricType::DeliveryAttemptTime
            | MetricType::DnsLookupTime
            | MetricType::HttpRequestTime
            | MetricType::ImapRequestTime
            | MetricType::MessageIngestTime
            | MetricType::MessageIngestIndexTime
            | MetricType::Pop3RequestTime
            | MetricType::SieveRequestTime
            | MetricType::SmtpRequestTime
            | MetricType::StoreDataReadTime
            | MetricType::StoreDataWriteTime
            | MetricType::StoreBlobReadTime
            | MetricType::StoreBlobWriteTime => "milliseconds",
            MetricType::UserCount => "users",
        }
    }

    pub const fn variants() -> &'static [Self] {
        &[
            MetricType::AcmeAuthError,
            MetricType::AcmeAuthTooManyAttempts,
            MetricType::AcmeOrderCompleted,
            MetricType::AcmeOrderInvalid,
            MetricType::AcmeClientMissingSni,
            MetricType::AcmeTlsAlpnError,
            MetricType::AcmeTokenNotFound,
            MetricType::AcmeError,
            MetricType::ArcChainTooLong,
            MetricType::ArcInvalidInstance,
            MetricType::ArcInvalidCv,
            MetricType::ArcHasHeaderTag,
            MetricType::ArcBrokenChain,
            MetricType::AuthSuccess,
            MetricType::AuthFailed,
            MetricType::AuthTooManyAttempts,
            MetricType::AuthError,
            MetricType::CalendarAlarmSent,
            MetricType::CalendarAlarmFailed,
            MetricType::CalendarItipMessageSent,
            MetricType::CalendarItipMessageReceived,
            MetricType::CalendarItipMessageError,
            MetricType::ClusterSubscriberError,
            MetricType::ClusterSubscriberDisconnected,
            MetricType::ClusterPublisherError,
            MetricType::DaneAuthenticationSuccess,
            MetricType::DaneAuthenticationFailure,
            MetricType::DaneNoCertificatesFound,
            MetricType::DaneCertificateParseError,
            MetricType::DaneTlsaRecordFetchError,
            MetricType::DaneTlsaRecordNotFound,
            MetricType::DaneTlsaRecordNotDnssecSigned,
            MetricType::DaneTlsaRecordInvalid,
            MetricType::DeliveryTotalTime,
            MetricType::DeliveryAttemptTime,
            MetricType::DeliveryActiveConnections,
            MetricType::DeliveryAttemptStart,
            MetricType::DeliveryAttemptEnd,
            MetricType::DeliveryCompleted,
            MetricType::DeliveryMxLookupFailed,
            MetricType::DeliveryIpLookupFailed,
            MetricType::DeliveryNullMx,
            MetricType::DeliveryGreetingFailed,
            MetricType::DeliveryEhloRejected,
            MetricType::DeliveryAuthFailed,
            MetricType::DeliveryMailFromRejected,
            MetricType::DeliveryDelivered,
            MetricType::DeliveryRcptToRejected,
            MetricType::DeliveryRcptToFailed,
            MetricType::DeliveryMessageRejected,
            MetricType::DeliveryStartTlsUnavailable,
            MetricType::DeliveryStartTlsError,
            MetricType::DeliveryStartTlsDisabled,
            MetricType::DeliveryImplicitTlsError,
            MetricType::DeliveryConcurrencyLimitExceeded,
            MetricType::DeliveryRateLimitExceeded,
            MetricType::DeliveryDoubleBounce,
            MetricType::DeliveryDsnSuccess,
            MetricType::DeliveryDsnTempFail,
            MetricType::DeliveryDsnPermFail,
            MetricType::DkimPass,
            MetricType::DkimNeutral,
            MetricType::DkimFail,
            MetricType::DkimPermError,
            MetricType::DkimTempError,
            MetricType::DkimNone,
            MetricType::DkimUnsupportedVersion,
            MetricType::DkimUnsupportedAlgorithm,
            MetricType::DkimUnsupportedCanonicalization,
            MetricType::DkimUnsupportedKeyType,
            MetricType::DkimFailedBodyHashMatch,
            MetricType::DkimFailedVerification,
            MetricType::DkimFailedAuidMatch,
            MetricType::DkimRevokedPublicKey,
            MetricType::DkimIncompatibleAlgorithms,
            MetricType::DkimSignatureExpired,
            MetricType::DkimSignatureLength,
            MetricType::DkimSignerNotFound,
            MetricType::DmarcPass,
            MetricType::DmarcFail,
            MetricType::DmarcPermError,
            MetricType::DmarcTempError,
            MetricType::DmarcNone,
            MetricType::DnsLookupTime,
            MetricType::DnsRecordCreationFailed,
            MetricType::DnsRecordDeletionFailed,
            MetricType::DnsRecordLookupFailed,
            MetricType::DnsRecordPropagationTimeout,
            MetricType::DomainCount,
            MetricType::EvalError,
            MetricType::EvalDirectoryNotFound,
            MetricType::EvalStoreNotFound,
            MetricType::HttpRequestTime,
            MetricType::HttpActiveConnections,
            MetricType::HttpConnectionStart,
            MetricType::HttpError,
            MetricType::HttpRequestBody,
            MetricType::HttpResponseBody,
            MetricType::HttpXForwardedMissing,
            MetricType::ImapRequestTime,
            MetricType::ImapActiveConnections,
            MetricType::ImapConnectionStart,
            MetricType::ImapConnectionEnd,
            MetricType::IncomingReportDmarcReport,
            MetricType::IncomingReportDmarcReportWithWarnings,
            MetricType::IncomingReportTlsReport,
            MetricType::IncomingReportTlsReportWithWarnings,
            MetricType::IncomingReportAbuseReport,
            MetricType::IncomingReportAuthFailureReport,
            MetricType::IncomingReportFraudReport,
            MetricType::IncomingReportNotSpamReport,
            MetricType::IncomingReportVirusReport,
            MetricType::IncomingReportOtherReport,
            MetricType::IncomingReportMessageParseFailed,
            MetricType::IncomingReportDmarcParseFailed,
            MetricType::IncomingReportTlsRpcParseFailed,
            MetricType::IncomingReportArfParseFailed,
            MetricType::IncomingReportDecompressError,
            MetricType::IprevPass,
            MetricType::IprevFail,
            MetricType::IprevPermError,
            MetricType::IprevTempError,
            MetricType::IprevNone,
            MetricType::JmapMethodCall,
            MetricType::JmapInvalidArguments,
            MetricType::JmapRequestTooLarge,
            MetricType::JmapUnsupportedFilter,
            MetricType::JmapUnsupportedSort,
            MetricType::JmapUnknownMethod,
            MetricType::JmapForbidden,
            MetricType::JmapNotJson,
            MetricType::JmapNotRequest,
            MetricType::JmapWebsocketStart,
            MetricType::JmapWebsocketError,
            MetricType::LimitSizeRequest,
            MetricType::LimitSizeUpload,
            MetricType::LimitCallsIn,
            MetricType::LimitConcurrentRequest,
            MetricType::LimitConcurrentUpload,
            MetricType::LimitConcurrentConnection,
            MetricType::LimitQuota,
            MetricType::LimitBlobQuota,
            MetricType::LimitTenantQuota,
            MetricType::LimitTooManyRequests,
            MetricType::MailAuthParseError,
            MetricType::MailAuthMissingParameters,
            MetricType::MailAuthNoHeadersFound,
            MetricType::MailAuthCrypto,
            MetricType::MailAuthIo,
            MetricType::MailAuthBase64,
            MetricType::MailAuthDnsError,
            MetricType::MailAuthDnsRecordNotFound,
            MetricType::MailAuthDnsInvalidRecordType,
            MetricType::MailAuthPolicyNotAligned,
            MetricType::ManageSieveConnectionStart,
            MetricType::ManageSieveConnectionEnd,
            MetricType::MessageSize,
            MetricType::MessageAuthenticatedSize,
            MetricType::MessageIngestTime,
            MetricType::MessageIngestIndexTime,
            MetricType::MessageIngestHam,
            MetricType::MessageIngestSpam,
            MetricType::MessageIngestImapAppend,
            MetricType::MessageIngestJmapAppend,
            MetricType::MessageIngestDuplicate,
            MetricType::MessageIngestError,
            MetricType::MessageIngestSearchIndex,
            MetricType::MilterActionAccept,
            MetricType::MilterActionDiscard,
            MetricType::MilterActionReject,
            MetricType::MilterActionTempFail,
            MetricType::MilterActionReplyCode,
            MetricType::MilterActionConnectionFailure,
            MetricType::MilterActionShutdown,
            MetricType::MtaHookActionAccept,
            MetricType::MtaHookActionDiscard,
            MetricType::MtaHookActionReject,
            MetricType::MtaHookActionQuarantine,
            MetricType::MtaHookError,
            MetricType::MtaStsAuthorized,
            MetricType::MtaStsNotAuthorized,
            MetricType::MtaStsInvalidPolicy,
            MetricType::NetworkTimeout,
            MetricType::OutgoingReportSize,
            MetricType::OutgoingReportSpfReport,
            MetricType::OutgoingReportSpfRateLimited,
            MetricType::OutgoingReportDkimReport,
            MetricType::OutgoingReportDkimRateLimited,
            MetricType::OutgoingReportDmarcReport,
            MetricType::OutgoingReportDmarcRateLimited,
            MetricType::OutgoingReportDmarcAggregateReport,
            MetricType::OutgoingReportTlsAggregate,
            MetricType::OutgoingReportHttpSubmission,
            MetricType::OutgoingReportUnauthorizedReportingAddress,
            MetricType::OutgoingReportReportingAddressValidationError,
            MetricType::OutgoingReportNotFound,
            MetricType::OutgoingReportSubmissionError,
            MetricType::OutgoingReportNoRecipientsFound,
            MetricType::Pop3RequestTime,
            MetricType::Pop3ActiveConnections,
            MetricType::Pop3ConnectionStart,
            MetricType::Pop3ConnectionEnd,
            MetricType::PushSubscriptionSuccess,
            MetricType::PushSubscriptionError,
            MetricType::PushSubscriptionNotFound,
            MetricType::QueueCount,
            MetricType::QueueMessageQueued,
            MetricType::QueueAuthenticatedMessageQueued,
            MetricType::QueueReportQueued,
            MetricType::QueueDsnQueued,
            MetricType::QueueAutogeneratedQueued,
            MetricType::QueueRescheduled,
            MetricType::QueueBlobNotFound,
            MetricType::QueueRateLimitExceeded,
            MetricType::QueueConcurrencyLimitExceeded,
            MetricType::QueueQuotaExceeded,
            MetricType::ResourceNotFound,
            MetricType::ResourceBadParameters,
            MetricType::ResourceError,
            MetricType::SecurityAuthenticationBan,
            MetricType::SecurityAbuseBan,
            MetricType::SecurityScanBan,
            MetricType::SecurityLoiterBan,
            MetricType::SecurityIpBlocked,
            MetricType::SecurityUnauthorized,
            MetricType::ServerMemory,
            MetricType::ServerThreadError,
            MetricType::SieveRequestTime,
            MetricType::SieveActiveConnections,
            MetricType::SieveActionAccept,
            MetricType::SieveActionAcceptReplace,
            MetricType::SieveActionDiscard,
            MetricType::SieveActionReject,
            MetricType::SieveSendMessage,
            MetricType::SieveMessageTooLarge,
            MetricType::SieveRuntimeError,
            MetricType::SieveUnexpectedError,
            MetricType::SieveNotSupported,
            MetricType::SieveQuotaExceeded,
            MetricType::SmtpRequestTime,
            MetricType::SmtpActiveConnections,
            MetricType::SmtpConnectionStart,
            MetricType::SmtpConnectionEnd,
            MetricType::SmtpError,
            MetricType::SmtpConcurrencyLimitExceeded,
            MetricType::SmtpTransferLimitExceeded,
            MetricType::SmtpRateLimitExceeded,
            MetricType::SmtpTimeLimitExceeded,
            MetricType::SmtpMessageParseFailed,
            MetricType::SmtpMessageTooLarge,
            MetricType::SmtpLoopDetected,
            MetricType::SmtpDkimPass,
            MetricType::SmtpDkimFail,
            MetricType::SmtpArcPass,
            MetricType::SmtpArcFail,
            MetricType::SmtpSpfEhloPass,
            MetricType::SmtpSpfEhloFail,
            MetricType::SmtpSpfFromPass,
            MetricType::SmtpSpfFromFail,
            MetricType::SmtpDmarcPass,
            MetricType::SmtpDmarcFail,
            MetricType::SmtpIprevPass,
            MetricType::SmtpIprevFail,
            MetricType::SmtpTooManyMessages,
            MetricType::SmtpInvalidEhlo,
            MetricType::SmtpDidNotSayEhlo,
            MetricType::SmtpMailFromUnauthenticated,
            MetricType::SmtpMailFromUnauthorized,
            MetricType::SmtpMailFromMissing,
            MetricType::SmtpMultipleMailFrom,
            MetricType::SmtpMailboxDoesNotExist,
            MetricType::SmtpRelayNotAllowed,
            MetricType::SmtpRcptToDuplicate,
            MetricType::SmtpRcptToMissing,
            MetricType::SmtpTooManyRecipients,
            MetricType::SmtpTooManyInvalidRcpt,
            MetricType::SmtpAuthMechanismNotSupported,
            MetricType::SmtpAuthExchangeTooLong,
            MetricType::SmtpCommandNotImplemented,
            MetricType::SmtpInvalidCommand,
            MetricType::SmtpSyntaxError,
            MetricType::SmtpRequestTooLarge,
            MetricType::SpamPyzorError,
            MetricType::SpamDnsblError,
            MetricType::SpamTrainCompleted,
            MetricType::SpamTrainSampleAdded,
            MetricType::SpamClassify,
            MetricType::SpamModelNotReady,
            MetricType::SpfPass,
            MetricType::SpfFail,
            MetricType::SpfSoftFail,
            MetricType::SpfNeutral,
            MetricType::SpfTempError,
            MetricType::SpfPermError,
            MetricType::SpfNone,
            MetricType::StoreDataReadTime,
            MetricType::StoreDataWriteTime,
            MetricType::StoreBlobReadTime,
            MetricType::StoreBlobWriteTime,
            MetricType::StoreAssertValueFailed,
            MetricType::StoreFoundationdbError,
            MetricType::StoreMysqlError,
            MetricType::StorePostgresqlError,
            MetricType::StoreRocksdbError,
            MetricType::StoreSqliteError,
            MetricType::StoreLdapError,
            MetricType::StoreElasticsearchError,
            MetricType::StoreRedisError,
            MetricType::StoreS3Error,
            MetricType::StoreAzureError,
            MetricType::StoreFilesystemError,
            MetricType::StorePoolError,
            MetricType::StoreDataCorruption,
            MetricType::StoreDecompressError,
            MetricType::StoreDeserializeError,
            MetricType::StoreNotFound,
            MetricType::StoreNotConfigured,
            MetricType::StoreNotSupported,
            MetricType::StoreUnexpectedError,
            MetricType::StoreCryptoError,
            MetricType::StoreHttpStoreError,
            MetricType::StoreBlobMissingMarker,
            MetricType::StoreDataWrite,
            MetricType::StoreDataIterate,
            MetricType::StoreBlobRead,
            MetricType::StoreBlobWrite,
            MetricType::StoreBlobDelete,
            MetricType::TaskManagerBlobNotFound,
            MetricType::TaskManagerMetadataNotFound,
            MetricType::TelemetryAlertEvent,
            MetricType::TelemetryAlertMessage,
            MetricType::TelemetryLogError,
            MetricType::TelemetryWebhookError,
            MetricType::TelemetryOtelExporterError,
            MetricType::TelemetryOtelMetricsExporterError,
            MetricType::TelemetryPrometheusExporterError,
            MetricType::TelemetryJournalError,
            MetricType::TlsHandshakeError,
            MetricType::UserCount,
        ]
    }
}

impl Key {
    pub fn parse(value: &str) -> Option<Self> {
        hashify::map! {
            value.as_bytes(),
            Key,
            b"accountName" => Key::AccountName,
            b"accountId" => Key::AccountId,
            b"blobId" => Key::BlobId,
            b"causedBy" => Key::CausedBy,
            b"changeId" => Key::ChangeId,
            b"code" => Key::Code,
            b"collection" => Key::Collection,
            b"contents" => Key::Contents,
            b"details" => Key::Details,
            b"dkimFail" => Key::DkimFail,
            b"dkimNone" => Key::DkimNone,
            b"dkimPass" => Key::DkimPass,
            b"dmarcNone" => Key::DmarcNone,
            b"dmarcPass" => Key::DmarcPass,
            b"dmarcQuarantine" => Key::DmarcQuarantine,
            b"dmarcReject" => Key::DmarcReject,
            b"documentId" => Key::DocumentId,
            b"domain" => Key::Domain,
            b"due" => Key::Due,
            b"elapsed" => Key::Elapsed,
            b"expires" => Key::Expires,
            b"from" => Key::From,
            b"hostname" => Key::Hostname,
            b"id" => Key::Id,
            b"key" => Key::Key,
            b"limit" => Key::Limit,
            b"listenerId" => Key::ListenerId,
            b"localIp" => Key::LocalIp,
            b"localPort" => Key::LocalPort,
            b"mailboxName" => Key::MailboxName,
            b"mailboxId" => Key::MailboxId,
            b"messageId" => Key::MessageId,
            b"nextDsn" => Key::NextDsn,
            b"nextRetry" => Key::NextRetry,
            b"path" => Key::Path,
            b"policy" => Key::Policy,
            b"queueId" => Key::QueueId,
            b"rangeFrom" => Key::RangeFrom,
            b"rangeTo" => Key::RangeTo,
            b"reason" => Key::Reason,
            b"remoteIp" => Key::RemoteIp,
            b"remotePort" => Key::RemotePort,
            b"reportId" => Key::ReportId,
            b"result" => Key::Result,
            b"size" => Key::Size,
            b"source" => Key::Source,
            b"spanId" => Key::SpanId,
            b"spfFail" => Key::SpfFail,
            b"spfNone" => Key::SpfNone,
            b"spfPass" => Key::SpfPass,
            b"strict" => Key::Strict,
            b"tls" => Key::Tls,
            b"to" => Key::To,
            b"total" => Key::Total,
            b"totalFailures" => Key::TotalFailures,
            b"totalSuccesses" => Key::TotalSuccesses,
            b"type" => Key::Type,
            b"uid" => Key::Uid,
            b"uidNext" => Key::UidNext,
            b"uidValidity" => Key::UidValidity,
            b"url" => Key::Url,
            b"validFrom" => Key::ValidFrom,
            b"validTo" => Key::ValidTo,
            b"value" => Key::Value,
            b"version" => Key::Version,
            b"queueName" => Key::QueueName,
        }
        .copied()
    }

    pub fn as_str(&self) -> &'static str {
        match self {
            Key::AccountName => "accountName",
            Key::AccountId => "accountId",
            Key::BlobId => "blobId",
            Key::CausedBy => "causedBy",
            Key::ChangeId => "changeId",
            Key::Code => "code",
            Key::Collection => "collection",
            Key::Contents => "contents",
            Key::Details => "details",
            Key::DkimFail => "dkimFail",
            Key::DkimNone => "dkimNone",
            Key::DkimPass => "dkimPass",
            Key::DmarcNone => "dmarcNone",
            Key::DmarcPass => "dmarcPass",
            Key::DmarcQuarantine => "dmarcQuarantine",
            Key::DmarcReject => "dmarcReject",
            Key::DocumentId => "documentId",
            Key::Domain => "domain",
            Key::Due => "due",
            Key::Elapsed => "elapsed",
            Key::Expires => "expires",
            Key::From => "from",
            Key::Hostname => "hostname",
            Key::Id => "id",
            Key::Key => "key",
            Key::Limit => "limit",
            Key::ListenerId => "listenerId",
            Key::LocalIp => "localIp",
            Key::LocalPort => "localPort",
            Key::MailboxName => "mailboxName",
            Key::MailboxId => "mailboxId",
            Key::MessageId => "messageId",
            Key::NextDsn => "nextDsn",
            Key::NextRetry => "nextRetry",
            Key::Path => "path",
            Key::Policy => "policy",
            Key::QueueId => "queueId",
            Key::RangeFrom => "rangeFrom",
            Key::RangeTo => "rangeTo",
            Key::Reason => "reason",
            Key::RemoteIp => "remoteIp",
            Key::RemotePort => "remotePort",
            Key::ReportId => "reportId",
            Key::Result => "result",
            Key::Size => "size",
            Key::Source => "source",
            Key::SpanId => "spanId",
            Key::SpfFail => "spfFail",
            Key::SpfNone => "spfNone",
            Key::SpfPass => "spfPass",
            Key::Strict => "strict",
            Key::Tls => "tls",
            Key::To => "to",
            Key::Total => "total",
            Key::TotalFailures => "totalFailures",
            Key::TotalSuccesses => "totalSuccesses",
            Key::Type => "type",
            Key::Uid => "uid",
            Key::UidNext => "uidNext",
            Key::UidValidity => "uidValidity",
            Key::Url => "url",
            Key::ValidFrom => "validFrom",
            Key::ValidTo => "validTo",
            Key::Value => "value",
            Key::Version => "version",
            Key::QueueName => "queueName",
        }
    }

    pub fn to_id(&self) -> u16 {
        *self as u16
    }

    pub fn from_id(id: u16) -> Option<Self> {
        match id {
            0 => Some(Key::AccountName),
            1 => Some(Key::AccountId),
            2 => Some(Key::BlobId),
            3 => Some(Key::CausedBy),
            4 => Some(Key::ChangeId),
            5 => Some(Key::Code),
            6 => Some(Key::Collection),
            7 => Some(Key::Contents),
            8 => Some(Key::Details),
            9 => Some(Key::DkimFail),
            10 => Some(Key::DkimNone),
            11 => Some(Key::DkimPass),
            12 => Some(Key::DmarcNone),
            13 => Some(Key::DmarcPass),
            14 => Some(Key::DmarcQuarantine),
            15 => Some(Key::DmarcReject),
            16 => Some(Key::DocumentId),
            17 => Some(Key::Domain),
            18 => Some(Key::Due),
            19 => Some(Key::Elapsed),
            20 => Some(Key::Expires),
            21 => Some(Key::From),
            22 => Some(Key::Hostname),
            23 => Some(Key::Id),
            24 => Some(Key::Key),
            25 => Some(Key::Limit),
            26 => Some(Key::ListenerId),
            27 => Some(Key::LocalIp),
            28 => Some(Key::LocalPort),
            29 => Some(Key::MailboxName),
            30 => Some(Key::MailboxId),
            31 => Some(Key::MessageId),
            32 => Some(Key::NextDsn),
            33 => Some(Key::NextRetry),
            34 => Some(Key::Path),
            35 => Some(Key::Policy),
            36 => Some(Key::QueueId),
            37 => Some(Key::RangeFrom),
            38 => Some(Key::RangeTo),
            39 => Some(Key::Reason),
            40 => Some(Key::RemoteIp),
            41 => Some(Key::RemotePort),
            42 => Some(Key::ReportId),
            43 => Some(Key::Result),
            44 => Some(Key::Size),
            45 => Some(Key::Source),
            46 => Some(Key::SpanId),
            47 => Some(Key::SpfFail),
            48 => Some(Key::SpfNone),
            49 => Some(Key::SpfPass),
            50 => Some(Key::Strict),
            51 => Some(Key::Tls),
            52 => Some(Key::To),
            53 => Some(Key::Total),
            54 => Some(Key::TotalFailures),
            55 => Some(Key::TotalSuccesses),
            56 => Some(Key::Type),
            57 => Some(Key::Uid),
            58 => Some(Key::UidNext),
            59 => Some(Key::UidValidity),
            60 => Some(Key::Url),
            61 => Some(Key::ValidFrom),
            62 => Some(Key::ValidTo),
            63 => Some(Key::Value),
            64 => Some(Key::Version),
            65 => Some(Key::QueueName),
            _ => None,
        }
    }

    pub const COUNT: usize = 66;
}

impl serde::Serialize for Key {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        serializer.serialize_str(self.as_str())
    }
}

impl<'de> serde::Deserialize<'de> for Key {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = Cow::<str>::deserialize(deserializer)?;
        Self::parse(&s).ok_or_else(|| serde::de::Error::unknown_variant(&s, &[]))
    }
}
