// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: com.atproto.moderation.defs
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

pub mod create_report;

use jacquard_common::CowStr;
use jacquard_derive::IntoStatic;
use serde::{Serialize, Deserialize};
/// Appeal a previously taken moderation action

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
pub struct ReasonAppeal;
impl core::fmt::Display for ReasonAppeal {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "reasonAppeal")
    }
}

/// Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
pub struct ReasonMisleading;
impl core::fmt::Display for ReasonMisleading {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "reasonMisleading")
    }
}

/// Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
pub struct ReasonOther;
impl core::fmt::Display for ReasonOther {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "reasonOther")
    }
}

/// Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
pub struct ReasonRude;
impl core::fmt::Display for ReasonRude {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "reasonRude")
    }
}

/// Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
pub struct ReasonSexual;
impl core::fmt::Display for ReasonSexual {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "reasonSexual")
    }
}

/// Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
pub struct ReasonSpam;
impl core::fmt::Display for ReasonSpam {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "reasonSpam")
    }
}


#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum ReasonType<'a> {
    ComAtprotoModerationDefsReasonSpam,
    ComAtprotoModerationDefsReasonViolation,
    ComAtprotoModerationDefsReasonMisleading,
    ComAtprotoModerationDefsReasonSexual,
    ComAtprotoModerationDefsReasonRude,
    ComAtprotoModerationDefsReasonOther,
    ComAtprotoModerationDefsReasonAppeal,
    ToolsOzoneReportDefsReasonAppeal,
    ToolsOzoneReportDefsReasonOther,
    ToolsOzoneReportDefsReasonViolenceAnimal,
    ToolsOzoneReportDefsReasonViolenceThreats,
    ToolsOzoneReportDefsReasonViolenceGraphicContent,
    ToolsOzoneReportDefsReasonViolenceGlorification,
    ToolsOzoneReportDefsReasonViolenceExtremistContent,
    ToolsOzoneReportDefsReasonViolenceTrafficking,
    ToolsOzoneReportDefsReasonViolenceOther,
    ToolsOzoneReportDefsReasonSexualAbuseContent,
    ToolsOzoneReportDefsReasonSexualNcii,
    ToolsOzoneReportDefsReasonSexualDeepfake,
    ToolsOzoneReportDefsReasonSexualAnimal,
    ToolsOzoneReportDefsReasonSexualUnlabeled,
    ToolsOzoneReportDefsReasonSexualOther,
    ToolsOzoneReportDefsReasonChildSafetyCsam,
    ToolsOzoneReportDefsReasonChildSafetyGroom,
    ToolsOzoneReportDefsReasonChildSafetyPrivacy,
    ToolsOzoneReportDefsReasonChildSafetyHarassment,
    ToolsOzoneReportDefsReasonChildSafetyOther,
    ToolsOzoneReportDefsReasonHarassmentTroll,
    ToolsOzoneReportDefsReasonHarassmentTargeted,
    ToolsOzoneReportDefsReasonHarassmentHateSpeech,
    ToolsOzoneReportDefsReasonHarassmentDoxxing,
    ToolsOzoneReportDefsReasonHarassmentOther,
    ToolsOzoneReportDefsReasonMisleadingBot,
    ToolsOzoneReportDefsReasonMisleadingImpersonation,
    ToolsOzoneReportDefsReasonMisleadingSpam,
    ToolsOzoneReportDefsReasonMisleadingScam,
    ToolsOzoneReportDefsReasonMisleadingElections,
    ToolsOzoneReportDefsReasonMisleadingOther,
    ToolsOzoneReportDefsReasonRuleSiteSecurity,
    ToolsOzoneReportDefsReasonRuleProhibitedSales,
    ToolsOzoneReportDefsReasonRuleBanEvasion,
    ToolsOzoneReportDefsReasonRuleOther,
    ToolsOzoneReportDefsReasonSelfHarmContent,
    ToolsOzoneReportDefsReasonSelfHarmEd,
    ToolsOzoneReportDefsReasonSelfHarmStunts,
    ToolsOzoneReportDefsReasonSelfHarmSubstances,
    ToolsOzoneReportDefsReasonSelfHarmOther,
    Other(CowStr<'a>),
}

impl<'a> ReasonType<'a> {
    pub fn as_str(&self) -> &str {
        match self {
            Self::ComAtprotoModerationDefsReasonSpam => {
                "com.atproto.moderation.defs#reasonSpam"
            }
            Self::ComAtprotoModerationDefsReasonViolation => {
                "com.atproto.moderation.defs#reasonViolation"
            }
            Self::ComAtprotoModerationDefsReasonMisleading => {
                "com.atproto.moderation.defs#reasonMisleading"
            }
            Self::ComAtprotoModerationDefsReasonSexual => {
                "com.atproto.moderation.defs#reasonSexual"
            }
            Self::ComAtprotoModerationDefsReasonRude => {
                "com.atproto.moderation.defs#reasonRude"
            }
            Self::ComAtprotoModerationDefsReasonOther => {
                "com.atproto.moderation.defs#reasonOther"
            }
            Self::ComAtprotoModerationDefsReasonAppeal => {
                "com.atproto.moderation.defs#reasonAppeal"
            }
            Self::ToolsOzoneReportDefsReasonAppeal => {
                "tools.ozone.report.defs#reasonAppeal"
            }
            Self::ToolsOzoneReportDefsReasonOther => {
                "tools.ozone.report.defs#reasonOther"
            }
            Self::ToolsOzoneReportDefsReasonViolenceAnimal => {
                "tools.ozone.report.defs#reasonViolenceAnimal"
            }
            Self::ToolsOzoneReportDefsReasonViolenceThreats => {
                "tools.ozone.report.defs#reasonViolenceThreats"
            }
            Self::ToolsOzoneReportDefsReasonViolenceGraphicContent => {
                "tools.ozone.report.defs#reasonViolenceGraphicContent"
            }
            Self::ToolsOzoneReportDefsReasonViolenceGlorification => {
                "tools.ozone.report.defs#reasonViolenceGlorification"
            }
            Self::ToolsOzoneReportDefsReasonViolenceExtremistContent => {
                "tools.ozone.report.defs#reasonViolenceExtremistContent"
            }
            Self::ToolsOzoneReportDefsReasonViolenceTrafficking => {
                "tools.ozone.report.defs#reasonViolenceTrafficking"
            }
            Self::ToolsOzoneReportDefsReasonViolenceOther => {
                "tools.ozone.report.defs#reasonViolenceOther"
            }
            Self::ToolsOzoneReportDefsReasonSexualAbuseContent => {
                "tools.ozone.report.defs#reasonSexualAbuseContent"
            }
            Self::ToolsOzoneReportDefsReasonSexualNcii => {
                "tools.ozone.report.defs#reasonSexualNCII"
            }
            Self::ToolsOzoneReportDefsReasonSexualDeepfake => {
                "tools.ozone.report.defs#reasonSexualDeepfake"
            }
            Self::ToolsOzoneReportDefsReasonSexualAnimal => {
                "tools.ozone.report.defs#reasonSexualAnimal"
            }
            Self::ToolsOzoneReportDefsReasonSexualUnlabeled => {
                "tools.ozone.report.defs#reasonSexualUnlabeled"
            }
            Self::ToolsOzoneReportDefsReasonSexualOther => {
                "tools.ozone.report.defs#reasonSexualOther"
            }
            Self::ToolsOzoneReportDefsReasonChildSafetyCsam => {
                "tools.ozone.report.defs#reasonChildSafetyCSAM"
            }
            Self::ToolsOzoneReportDefsReasonChildSafetyGroom => {
                "tools.ozone.report.defs#reasonChildSafetyGroom"
            }
            Self::ToolsOzoneReportDefsReasonChildSafetyPrivacy => {
                "tools.ozone.report.defs#reasonChildSafetyPrivacy"
            }
            Self::ToolsOzoneReportDefsReasonChildSafetyHarassment => {
                "tools.ozone.report.defs#reasonChildSafetyHarassment"
            }
            Self::ToolsOzoneReportDefsReasonChildSafetyOther => {
                "tools.ozone.report.defs#reasonChildSafetyOther"
            }
            Self::ToolsOzoneReportDefsReasonHarassmentTroll => {
                "tools.ozone.report.defs#reasonHarassmentTroll"
            }
            Self::ToolsOzoneReportDefsReasonHarassmentTargeted => {
                "tools.ozone.report.defs#reasonHarassmentTargeted"
            }
            Self::ToolsOzoneReportDefsReasonHarassmentHateSpeech => {
                "tools.ozone.report.defs#reasonHarassmentHateSpeech"
            }
            Self::ToolsOzoneReportDefsReasonHarassmentDoxxing => {
                "tools.ozone.report.defs#reasonHarassmentDoxxing"
            }
            Self::ToolsOzoneReportDefsReasonHarassmentOther => {
                "tools.ozone.report.defs#reasonHarassmentOther"
            }
            Self::ToolsOzoneReportDefsReasonMisleadingBot => {
                "tools.ozone.report.defs#reasonMisleadingBot"
            }
            Self::ToolsOzoneReportDefsReasonMisleadingImpersonation => {
                "tools.ozone.report.defs#reasonMisleadingImpersonation"
            }
            Self::ToolsOzoneReportDefsReasonMisleadingSpam => {
                "tools.ozone.report.defs#reasonMisleadingSpam"
            }
            Self::ToolsOzoneReportDefsReasonMisleadingScam => {
                "tools.ozone.report.defs#reasonMisleadingScam"
            }
            Self::ToolsOzoneReportDefsReasonMisleadingElections => {
                "tools.ozone.report.defs#reasonMisleadingElections"
            }
            Self::ToolsOzoneReportDefsReasonMisleadingOther => {
                "tools.ozone.report.defs#reasonMisleadingOther"
            }
            Self::ToolsOzoneReportDefsReasonRuleSiteSecurity => {
                "tools.ozone.report.defs#reasonRuleSiteSecurity"
            }
            Self::ToolsOzoneReportDefsReasonRuleProhibitedSales => {
                "tools.ozone.report.defs#reasonRuleProhibitedSales"
            }
            Self::ToolsOzoneReportDefsReasonRuleBanEvasion => {
                "tools.ozone.report.defs#reasonRuleBanEvasion"
            }
            Self::ToolsOzoneReportDefsReasonRuleOther => {
                "tools.ozone.report.defs#reasonRuleOther"
            }
            Self::ToolsOzoneReportDefsReasonSelfHarmContent => {
                "tools.ozone.report.defs#reasonSelfHarmContent"
            }
            Self::ToolsOzoneReportDefsReasonSelfHarmEd => {
                "tools.ozone.report.defs#reasonSelfHarmED"
            }
            Self::ToolsOzoneReportDefsReasonSelfHarmStunts => {
                "tools.ozone.report.defs#reasonSelfHarmStunts"
            }
            Self::ToolsOzoneReportDefsReasonSelfHarmSubstances => {
                "tools.ozone.report.defs#reasonSelfHarmSubstances"
            }
            Self::ToolsOzoneReportDefsReasonSelfHarmOther => {
                "tools.ozone.report.defs#reasonSelfHarmOther"
            }
            Self::Other(s) => s.as_ref(),
        }
    }
}

impl<'a> From<&'a str> for ReasonType<'a> {
    fn from(s: &'a str) -> Self {
        match s {
            "com.atproto.moderation.defs#reasonSpam" => {
                Self::ComAtprotoModerationDefsReasonSpam
            }
            "com.atproto.moderation.defs#reasonViolation" => {
                Self::ComAtprotoModerationDefsReasonViolation
            }
            "com.atproto.moderation.defs#reasonMisleading" => {
                Self::ComAtprotoModerationDefsReasonMisleading
            }
            "com.atproto.moderation.defs#reasonSexual" => {
                Self::ComAtprotoModerationDefsReasonSexual
            }
            "com.atproto.moderation.defs#reasonRude" => {
                Self::ComAtprotoModerationDefsReasonRude
            }
            "com.atproto.moderation.defs#reasonOther" => {
                Self::ComAtprotoModerationDefsReasonOther
            }
            "com.atproto.moderation.defs#reasonAppeal" => {
                Self::ComAtprotoModerationDefsReasonAppeal
            }
            "tools.ozone.report.defs#reasonAppeal" => {
                Self::ToolsOzoneReportDefsReasonAppeal
            }
            "tools.ozone.report.defs#reasonOther" => {
                Self::ToolsOzoneReportDefsReasonOther
            }
            "tools.ozone.report.defs#reasonViolenceAnimal" => {
                Self::ToolsOzoneReportDefsReasonViolenceAnimal
            }
            "tools.ozone.report.defs#reasonViolenceThreats" => {
                Self::ToolsOzoneReportDefsReasonViolenceThreats
            }
            "tools.ozone.report.defs#reasonViolenceGraphicContent" => {
                Self::ToolsOzoneReportDefsReasonViolenceGraphicContent
            }
            "tools.ozone.report.defs#reasonViolenceGlorification" => {
                Self::ToolsOzoneReportDefsReasonViolenceGlorification
            }
            "tools.ozone.report.defs#reasonViolenceExtremistContent" => {
                Self::ToolsOzoneReportDefsReasonViolenceExtremistContent
            }
            "tools.ozone.report.defs#reasonViolenceTrafficking" => {
                Self::ToolsOzoneReportDefsReasonViolenceTrafficking
            }
            "tools.ozone.report.defs#reasonViolenceOther" => {
                Self::ToolsOzoneReportDefsReasonViolenceOther
            }
            "tools.ozone.report.defs#reasonSexualAbuseContent" => {
                Self::ToolsOzoneReportDefsReasonSexualAbuseContent
            }
            "tools.ozone.report.defs#reasonSexualNCII" => {
                Self::ToolsOzoneReportDefsReasonSexualNcii
            }
            "tools.ozone.report.defs#reasonSexualDeepfake" => {
                Self::ToolsOzoneReportDefsReasonSexualDeepfake
            }
            "tools.ozone.report.defs#reasonSexualAnimal" => {
                Self::ToolsOzoneReportDefsReasonSexualAnimal
            }
            "tools.ozone.report.defs#reasonSexualUnlabeled" => {
                Self::ToolsOzoneReportDefsReasonSexualUnlabeled
            }
            "tools.ozone.report.defs#reasonSexualOther" => {
                Self::ToolsOzoneReportDefsReasonSexualOther
            }
            "tools.ozone.report.defs#reasonChildSafetyCSAM" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyCsam
            }
            "tools.ozone.report.defs#reasonChildSafetyGroom" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyGroom
            }
            "tools.ozone.report.defs#reasonChildSafetyPrivacy" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyPrivacy
            }
            "tools.ozone.report.defs#reasonChildSafetyHarassment" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyHarassment
            }
            "tools.ozone.report.defs#reasonChildSafetyOther" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyOther
            }
            "tools.ozone.report.defs#reasonHarassmentTroll" => {
                Self::ToolsOzoneReportDefsReasonHarassmentTroll
            }
            "tools.ozone.report.defs#reasonHarassmentTargeted" => {
                Self::ToolsOzoneReportDefsReasonHarassmentTargeted
            }
            "tools.ozone.report.defs#reasonHarassmentHateSpeech" => {
                Self::ToolsOzoneReportDefsReasonHarassmentHateSpeech
            }
            "tools.ozone.report.defs#reasonHarassmentDoxxing" => {
                Self::ToolsOzoneReportDefsReasonHarassmentDoxxing
            }
            "tools.ozone.report.defs#reasonHarassmentOther" => {
                Self::ToolsOzoneReportDefsReasonHarassmentOther
            }
            "tools.ozone.report.defs#reasonMisleadingBot" => {
                Self::ToolsOzoneReportDefsReasonMisleadingBot
            }
            "tools.ozone.report.defs#reasonMisleadingImpersonation" => {
                Self::ToolsOzoneReportDefsReasonMisleadingImpersonation
            }
            "tools.ozone.report.defs#reasonMisleadingSpam" => {
                Self::ToolsOzoneReportDefsReasonMisleadingSpam
            }
            "tools.ozone.report.defs#reasonMisleadingScam" => {
                Self::ToolsOzoneReportDefsReasonMisleadingScam
            }
            "tools.ozone.report.defs#reasonMisleadingElections" => {
                Self::ToolsOzoneReportDefsReasonMisleadingElections
            }
            "tools.ozone.report.defs#reasonMisleadingOther" => {
                Self::ToolsOzoneReportDefsReasonMisleadingOther
            }
            "tools.ozone.report.defs#reasonRuleSiteSecurity" => {
                Self::ToolsOzoneReportDefsReasonRuleSiteSecurity
            }
            "tools.ozone.report.defs#reasonRuleProhibitedSales" => {
                Self::ToolsOzoneReportDefsReasonRuleProhibitedSales
            }
            "tools.ozone.report.defs#reasonRuleBanEvasion" => {
                Self::ToolsOzoneReportDefsReasonRuleBanEvasion
            }
            "tools.ozone.report.defs#reasonRuleOther" => {
                Self::ToolsOzoneReportDefsReasonRuleOther
            }
            "tools.ozone.report.defs#reasonSelfHarmContent" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmContent
            }
            "tools.ozone.report.defs#reasonSelfHarmED" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmEd
            }
            "tools.ozone.report.defs#reasonSelfHarmStunts" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmStunts
            }
            "tools.ozone.report.defs#reasonSelfHarmSubstances" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmSubstances
            }
            "tools.ozone.report.defs#reasonSelfHarmOther" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmOther
            }
            _ => Self::Other(CowStr::from(s)),
        }
    }
}

impl<'a> From<String> for ReasonType<'a> {
    fn from(s: String) -> Self {
        match s.as_str() {
            "com.atproto.moderation.defs#reasonSpam" => {
                Self::ComAtprotoModerationDefsReasonSpam
            }
            "com.atproto.moderation.defs#reasonViolation" => {
                Self::ComAtprotoModerationDefsReasonViolation
            }
            "com.atproto.moderation.defs#reasonMisleading" => {
                Self::ComAtprotoModerationDefsReasonMisleading
            }
            "com.atproto.moderation.defs#reasonSexual" => {
                Self::ComAtprotoModerationDefsReasonSexual
            }
            "com.atproto.moderation.defs#reasonRude" => {
                Self::ComAtprotoModerationDefsReasonRude
            }
            "com.atproto.moderation.defs#reasonOther" => {
                Self::ComAtprotoModerationDefsReasonOther
            }
            "com.atproto.moderation.defs#reasonAppeal" => {
                Self::ComAtprotoModerationDefsReasonAppeal
            }
            "tools.ozone.report.defs#reasonAppeal" => {
                Self::ToolsOzoneReportDefsReasonAppeal
            }
            "tools.ozone.report.defs#reasonOther" => {
                Self::ToolsOzoneReportDefsReasonOther
            }
            "tools.ozone.report.defs#reasonViolenceAnimal" => {
                Self::ToolsOzoneReportDefsReasonViolenceAnimal
            }
            "tools.ozone.report.defs#reasonViolenceThreats" => {
                Self::ToolsOzoneReportDefsReasonViolenceThreats
            }
            "tools.ozone.report.defs#reasonViolenceGraphicContent" => {
                Self::ToolsOzoneReportDefsReasonViolenceGraphicContent
            }
            "tools.ozone.report.defs#reasonViolenceGlorification" => {
                Self::ToolsOzoneReportDefsReasonViolenceGlorification
            }
            "tools.ozone.report.defs#reasonViolenceExtremistContent" => {
                Self::ToolsOzoneReportDefsReasonViolenceExtremistContent
            }
            "tools.ozone.report.defs#reasonViolenceTrafficking" => {
                Self::ToolsOzoneReportDefsReasonViolenceTrafficking
            }
            "tools.ozone.report.defs#reasonViolenceOther" => {
                Self::ToolsOzoneReportDefsReasonViolenceOther
            }
            "tools.ozone.report.defs#reasonSexualAbuseContent" => {
                Self::ToolsOzoneReportDefsReasonSexualAbuseContent
            }
            "tools.ozone.report.defs#reasonSexualNCII" => {
                Self::ToolsOzoneReportDefsReasonSexualNcii
            }
            "tools.ozone.report.defs#reasonSexualDeepfake" => {
                Self::ToolsOzoneReportDefsReasonSexualDeepfake
            }
            "tools.ozone.report.defs#reasonSexualAnimal" => {
                Self::ToolsOzoneReportDefsReasonSexualAnimal
            }
            "tools.ozone.report.defs#reasonSexualUnlabeled" => {
                Self::ToolsOzoneReportDefsReasonSexualUnlabeled
            }
            "tools.ozone.report.defs#reasonSexualOther" => {
                Self::ToolsOzoneReportDefsReasonSexualOther
            }
            "tools.ozone.report.defs#reasonChildSafetyCSAM" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyCsam
            }
            "tools.ozone.report.defs#reasonChildSafetyGroom" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyGroom
            }
            "tools.ozone.report.defs#reasonChildSafetyPrivacy" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyPrivacy
            }
            "tools.ozone.report.defs#reasonChildSafetyHarassment" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyHarassment
            }
            "tools.ozone.report.defs#reasonChildSafetyOther" => {
                Self::ToolsOzoneReportDefsReasonChildSafetyOther
            }
            "tools.ozone.report.defs#reasonHarassmentTroll" => {
                Self::ToolsOzoneReportDefsReasonHarassmentTroll
            }
            "tools.ozone.report.defs#reasonHarassmentTargeted" => {
                Self::ToolsOzoneReportDefsReasonHarassmentTargeted
            }
            "tools.ozone.report.defs#reasonHarassmentHateSpeech" => {
                Self::ToolsOzoneReportDefsReasonHarassmentHateSpeech
            }
            "tools.ozone.report.defs#reasonHarassmentDoxxing" => {
                Self::ToolsOzoneReportDefsReasonHarassmentDoxxing
            }
            "tools.ozone.report.defs#reasonHarassmentOther" => {
                Self::ToolsOzoneReportDefsReasonHarassmentOther
            }
            "tools.ozone.report.defs#reasonMisleadingBot" => {
                Self::ToolsOzoneReportDefsReasonMisleadingBot
            }
            "tools.ozone.report.defs#reasonMisleadingImpersonation" => {
                Self::ToolsOzoneReportDefsReasonMisleadingImpersonation
            }
            "tools.ozone.report.defs#reasonMisleadingSpam" => {
                Self::ToolsOzoneReportDefsReasonMisleadingSpam
            }
            "tools.ozone.report.defs#reasonMisleadingScam" => {
                Self::ToolsOzoneReportDefsReasonMisleadingScam
            }
            "tools.ozone.report.defs#reasonMisleadingElections" => {
                Self::ToolsOzoneReportDefsReasonMisleadingElections
            }
            "tools.ozone.report.defs#reasonMisleadingOther" => {
                Self::ToolsOzoneReportDefsReasonMisleadingOther
            }
            "tools.ozone.report.defs#reasonRuleSiteSecurity" => {
                Self::ToolsOzoneReportDefsReasonRuleSiteSecurity
            }
            "tools.ozone.report.defs#reasonRuleProhibitedSales" => {
                Self::ToolsOzoneReportDefsReasonRuleProhibitedSales
            }
            "tools.ozone.report.defs#reasonRuleBanEvasion" => {
                Self::ToolsOzoneReportDefsReasonRuleBanEvasion
            }
            "tools.ozone.report.defs#reasonRuleOther" => {
                Self::ToolsOzoneReportDefsReasonRuleOther
            }
            "tools.ozone.report.defs#reasonSelfHarmContent" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmContent
            }
            "tools.ozone.report.defs#reasonSelfHarmED" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmEd
            }
            "tools.ozone.report.defs#reasonSelfHarmStunts" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmStunts
            }
            "tools.ozone.report.defs#reasonSelfHarmSubstances" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmSubstances
            }
            "tools.ozone.report.defs#reasonSelfHarmOther" => {
                Self::ToolsOzoneReportDefsReasonSelfHarmOther
            }
            _ => Self::Other(CowStr::from(s)),
        }
    }
}

impl<'a> AsRef<str> for ReasonType<'a> {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

impl<'a> core::fmt::Display for ReasonType<'a> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "{}", self.as_str())
    }
}

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

impl<'de, 'a> serde::Deserialize<'de> for ReasonType<'a>
where
    'de: 'a,
{
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = <&'de str>::deserialize(deserializer)?;
        Ok(Self::from(s))
    }
}

impl jacquard_common::IntoStatic for ReasonType<'_> {
    type Output = ReasonType<'static>;
    fn into_static(self) -> Self::Output {
        match self {
            ReasonType::ComAtprotoModerationDefsReasonSpam => {
                ReasonType::ComAtprotoModerationDefsReasonSpam
            }
            ReasonType::ComAtprotoModerationDefsReasonViolation => {
                ReasonType::ComAtprotoModerationDefsReasonViolation
            }
            ReasonType::ComAtprotoModerationDefsReasonMisleading => {
                ReasonType::ComAtprotoModerationDefsReasonMisleading
            }
            ReasonType::ComAtprotoModerationDefsReasonSexual => {
                ReasonType::ComAtprotoModerationDefsReasonSexual
            }
            ReasonType::ComAtprotoModerationDefsReasonRude => {
                ReasonType::ComAtprotoModerationDefsReasonRude
            }
            ReasonType::ComAtprotoModerationDefsReasonOther => {
                ReasonType::ComAtprotoModerationDefsReasonOther
            }
            ReasonType::ComAtprotoModerationDefsReasonAppeal => {
                ReasonType::ComAtprotoModerationDefsReasonAppeal
            }
            ReasonType::ToolsOzoneReportDefsReasonAppeal => {
                ReasonType::ToolsOzoneReportDefsReasonAppeal
            }
            ReasonType::ToolsOzoneReportDefsReasonOther => {
                ReasonType::ToolsOzoneReportDefsReasonOther
            }
            ReasonType::ToolsOzoneReportDefsReasonViolenceAnimal => {
                ReasonType::ToolsOzoneReportDefsReasonViolenceAnimal
            }
            ReasonType::ToolsOzoneReportDefsReasonViolenceThreats => {
                ReasonType::ToolsOzoneReportDefsReasonViolenceThreats
            }
            ReasonType::ToolsOzoneReportDefsReasonViolenceGraphicContent => {
                ReasonType::ToolsOzoneReportDefsReasonViolenceGraphicContent
            }
            ReasonType::ToolsOzoneReportDefsReasonViolenceGlorification => {
                ReasonType::ToolsOzoneReportDefsReasonViolenceGlorification
            }
            ReasonType::ToolsOzoneReportDefsReasonViolenceExtremistContent => {
                ReasonType::ToolsOzoneReportDefsReasonViolenceExtremistContent
            }
            ReasonType::ToolsOzoneReportDefsReasonViolenceTrafficking => {
                ReasonType::ToolsOzoneReportDefsReasonViolenceTrafficking
            }
            ReasonType::ToolsOzoneReportDefsReasonViolenceOther => {
                ReasonType::ToolsOzoneReportDefsReasonViolenceOther
            }
            ReasonType::ToolsOzoneReportDefsReasonSexualAbuseContent => {
                ReasonType::ToolsOzoneReportDefsReasonSexualAbuseContent
            }
            ReasonType::ToolsOzoneReportDefsReasonSexualNcii => {
                ReasonType::ToolsOzoneReportDefsReasonSexualNcii
            }
            ReasonType::ToolsOzoneReportDefsReasonSexualDeepfake => {
                ReasonType::ToolsOzoneReportDefsReasonSexualDeepfake
            }
            ReasonType::ToolsOzoneReportDefsReasonSexualAnimal => {
                ReasonType::ToolsOzoneReportDefsReasonSexualAnimal
            }
            ReasonType::ToolsOzoneReportDefsReasonSexualUnlabeled => {
                ReasonType::ToolsOzoneReportDefsReasonSexualUnlabeled
            }
            ReasonType::ToolsOzoneReportDefsReasonSexualOther => {
                ReasonType::ToolsOzoneReportDefsReasonSexualOther
            }
            ReasonType::ToolsOzoneReportDefsReasonChildSafetyCsam => {
                ReasonType::ToolsOzoneReportDefsReasonChildSafetyCsam
            }
            ReasonType::ToolsOzoneReportDefsReasonChildSafetyGroom => {
                ReasonType::ToolsOzoneReportDefsReasonChildSafetyGroom
            }
            ReasonType::ToolsOzoneReportDefsReasonChildSafetyPrivacy => {
                ReasonType::ToolsOzoneReportDefsReasonChildSafetyPrivacy
            }
            ReasonType::ToolsOzoneReportDefsReasonChildSafetyHarassment => {
                ReasonType::ToolsOzoneReportDefsReasonChildSafetyHarassment
            }
            ReasonType::ToolsOzoneReportDefsReasonChildSafetyOther => {
                ReasonType::ToolsOzoneReportDefsReasonChildSafetyOther
            }
            ReasonType::ToolsOzoneReportDefsReasonHarassmentTroll => {
                ReasonType::ToolsOzoneReportDefsReasonHarassmentTroll
            }
            ReasonType::ToolsOzoneReportDefsReasonHarassmentTargeted => {
                ReasonType::ToolsOzoneReportDefsReasonHarassmentTargeted
            }
            ReasonType::ToolsOzoneReportDefsReasonHarassmentHateSpeech => {
                ReasonType::ToolsOzoneReportDefsReasonHarassmentHateSpeech
            }
            ReasonType::ToolsOzoneReportDefsReasonHarassmentDoxxing => {
                ReasonType::ToolsOzoneReportDefsReasonHarassmentDoxxing
            }
            ReasonType::ToolsOzoneReportDefsReasonHarassmentOther => {
                ReasonType::ToolsOzoneReportDefsReasonHarassmentOther
            }
            ReasonType::ToolsOzoneReportDefsReasonMisleadingBot => {
                ReasonType::ToolsOzoneReportDefsReasonMisleadingBot
            }
            ReasonType::ToolsOzoneReportDefsReasonMisleadingImpersonation => {
                ReasonType::ToolsOzoneReportDefsReasonMisleadingImpersonation
            }
            ReasonType::ToolsOzoneReportDefsReasonMisleadingSpam => {
                ReasonType::ToolsOzoneReportDefsReasonMisleadingSpam
            }
            ReasonType::ToolsOzoneReportDefsReasonMisleadingScam => {
                ReasonType::ToolsOzoneReportDefsReasonMisleadingScam
            }
            ReasonType::ToolsOzoneReportDefsReasonMisleadingElections => {
                ReasonType::ToolsOzoneReportDefsReasonMisleadingElections
            }
            ReasonType::ToolsOzoneReportDefsReasonMisleadingOther => {
                ReasonType::ToolsOzoneReportDefsReasonMisleadingOther
            }
            ReasonType::ToolsOzoneReportDefsReasonRuleSiteSecurity => {
                ReasonType::ToolsOzoneReportDefsReasonRuleSiteSecurity
            }
            ReasonType::ToolsOzoneReportDefsReasonRuleProhibitedSales => {
                ReasonType::ToolsOzoneReportDefsReasonRuleProhibitedSales
            }
            ReasonType::ToolsOzoneReportDefsReasonRuleBanEvasion => {
                ReasonType::ToolsOzoneReportDefsReasonRuleBanEvasion
            }
            ReasonType::ToolsOzoneReportDefsReasonRuleOther => {
                ReasonType::ToolsOzoneReportDefsReasonRuleOther
            }
            ReasonType::ToolsOzoneReportDefsReasonSelfHarmContent => {
                ReasonType::ToolsOzoneReportDefsReasonSelfHarmContent
            }
            ReasonType::ToolsOzoneReportDefsReasonSelfHarmEd => {
                ReasonType::ToolsOzoneReportDefsReasonSelfHarmEd
            }
            ReasonType::ToolsOzoneReportDefsReasonSelfHarmStunts => {
                ReasonType::ToolsOzoneReportDefsReasonSelfHarmStunts
            }
            ReasonType::ToolsOzoneReportDefsReasonSelfHarmSubstances => {
                ReasonType::ToolsOzoneReportDefsReasonSelfHarmSubstances
            }
            ReasonType::ToolsOzoneReportDefsReasonSelfHarmOther => {
                ReasonType::ToolsOzoneReportDefsReasonSelfHarmOther
            }
            ReasonType::Other(v) => ReasonType::Other(v.into_static()),
        }
    }
}

/// Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
pub struct ReasonViolation;
impl core::fmt::Display for ReasonViolation {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "reasonViolation")
    }
}

/// Tag describing a type of subject that might be reported.

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum SubjectType<'a> {
    Account,
    Record,
    Chat,
    Other(CowStr<'a>),
}

impl<'a> SubjectType<'a> {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Account => "account",
            Self::Record => "record",
            Self::Chat => "chat",
            Self::Other(s) => s.as_ref(),
        }
    }
}

impl<'a> From<&'a str> for SubjectType<'a> {
    fn from(s: &'a str) -> Self {
        match s {
            "account" => Self::Account,
            "record" => Self::Record,
            "chat" => Self::Chat,
            _ => Self::Other(CowStr::from(s)),
        }
    }
}

impl<'a> From<String> for SubjectType<'a> {
    fn from(s: String) -> Self {
        match s.as_str() {
            "account" => Self::Account,
            "record" => Self::Record,
            "chat" => Self::Chat,
            _ => Self::Other(CowStr::from(s)),
        }
    }
}

impl<'a> AsRef<str> for SubjectType<'a> {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

impl<'a> core::fmt::Display for SubjectType<'a> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "{}", self.as_str())
    }
}

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

impl<'de, 'a> serde::Deserialize<'de> for SubjectType<'a>
where
    'de: 'a,
{
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = <&'de str>::deserialize(deserializer)?;
        Ok(Self::from(s))
    }
}

impl jacquard_common::IntoStatic for SubjectType<'_> {
    type Output = SubjectType<'static>;
    fn into_static(self) -> Self::Output {
        match self {
            SubjectType::Account => SubjectType::Account,
            SubjectType::Record => SubjectType::Record,
            SubjectType::Chat => SubjectType::Chat,
            SubjectType::Other(v) => SubjectType::Other(v.into_static()),
        }
    }
}