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

pub mod episode;
pub mod follow;
pub mod like;
pub mod podcast;

use jacquard_common::CowStr;

#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::types::string::UriValue;
use jacquard_derive::{IntoStatic, lexicon};
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;

#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Serialize, Deserialize};
/// A podcast category from the Apple Podcasts taxonomy.

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct AppleCategory<'a> {
    ///The category value. Subcategories use the format 'Category > Subcategory'.
    #[serde(borrow)]
    pub value: AppleCategoryValue<'a>,
}

/// The category value. Subcategories use the format 'Category > Subcategory'.

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum AppleCategoryValue<'a> {
    Arts,
    ArtsBooks,
    ArtsDesign,
    ArtsFashionBeauty,
    ArtsFood,
    ArtsPerformingArts,
    ArtsVisualArts,
    Business,
    BusinessCareers,
    BusinessEntrepreneurship,
    BusinessInvesting,
    BusinessManagement,
    BusinessMarketing,
    BusinessNonProfit,
    Comedy,
    ComedyComedyInterviews,
    ComedyImprov,
    ComedyStandUp,
    Education,
    EducationCourses,
    EducationHowTo,
    EducationLanguageLearning,
    EducationSelfImprovement,
    Fiction,
    FictionComedyFiction,
    FictionDrama,
    FictionScienceFiction,
    Government,
    HealthFitness,
    HealthFitnessAlternativeHealth,
    HealthFitnessFitness,
    HealthFitnessMedicine,
    HealthFitnessMentalHealth,
    HealthFitnessNutrition,
    HealthFitnessSexuality,
    History,
    KidsFamily,
    KidsFamilyEducationForKids,
    KidsFamilyParenting,
    KidsFamilyPetsAnimals,
    KidsFamilyStoriesForKids,
    Leisure,
    LeisureAnimationManga,
    LeisureAutomotive,
    LeisureAviation,
    LeisureCrafts,
    LeisureGames,
    LeisureHobbies,
    LeisureHomeGarden,
    LeisureVideoGames,
    Music,
    MusicMusicCommentary,
    MusicMusicHistory,
    MusicMusicInterviews,
    News,
    NewsBusinessNews,
    NewsDailyNews,
    NewsEntertainmentNews,
    NewsNewsCommentary,
    NewsPolitics,
    NewsSportsNews,
    NewsTechNews,
    ReligionSpirituality,
    ReligionSpiritualityBuddhism,
    ReligionSpiritualityChristianity,
    ReligionSpiritualityHinduism,
    ReligionSpiritualityIslam,
    ReligionSpiritualityJudaism,
    ReligionSpiritualityReligion,
    ReligionSpiritualitySpirituality,
    Science,
    ScienceAstronomy,
    ScienceChemistry,
    ScienceEarthSciences,
    ScienceLifeSciences,
    ScienceMathematics,
    ScienceNaturalSciences,
    ScienceNature,
    SciencePhysics,
    ScienceSocialSciences,
    SocietyCulture,
    SocietyCultureDocumentary,
    SocietyCulturePersonalJournals,
    SocietyCulturePhilosophy,
    SocietyCulturePlacesTravel,
    SocietyCultureRelationships,
    Sports,
    SportsBaseball,
    SportsBasketball,
    SportsCricket,
    SportsFantasySports,
    SportsFootball,
    SportsGolf,
    SportsHockey,
    SportsRugby,
    SportsRunning,
    SportsSoccer,
    SportsSwimming,
    SportsTennis,
    SportsVolleyball,
    SportsWilderness,
    SportsWrestling,
    Technology,
    TrueCrime,
    TvFilm,
    TvFilmAfterShows,
    TvFilmFilmHistory,
    TvFilmFilmInterviews,
    TvFilmFilmReviews,
    TvFilmTvReviews,
    Other(CowStr<'a>),
}

impl<'a> AppleCategoryValue<'a> {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Arts => "Arts",
            Self::ArtsBooks => "Arts > Books",
            Self::ArtsDesign => "Arts > Design",
            Self::ArtsFashionBeauty => "Arts > Fashion & Beauty",
            Self::ArtsFood => "Arts > Food",
            Self::ArtsPerformingArts => "Arts > Performing Arts",
            Self::ArtsVisualArts => "Arts > Visual Arts",
            Self::Business => "Business",
            Self::BusinessCareers => "Business > Careers",
            Self::BusinessEntrepreneurship => "Business > Entrepreneurship",
            Self::BusinessInvesting => "Business > Investing",
            Self::BusinessManagement => "Business > Management",
            Self::BusinessMarketing => "Business > Marketing",
            Self::BusinessNonProfit => "Business > Non-Profit",
            Self::Comedy => "Comedy",
            Self::ComedyComedyInterviews => "Comedy > Comedy Interviews",
            Self::ComedyImprov => "Comedy > Improv",
            Self::ComedyStandUp => "Comedy > Stand-Up",
            Self::Education => "Education",
            Self::EducationCourses => "Education > Courses",
            Self::EducationHowTo => "Education > How To",
            Self::EducationLanguageLearning => "Education > Language Learning",
            Self::EducationSelfImprovement => "Education > Self-Improvement",
            Self::Fiction => "Fiction",
            Self::FictionComedyFiction => "Fiction > Comedy Fiction",
            Self::FictionDrama => "Fiction > Drama",
            Self::FictionScienceFiction => "Fiction > Science Fiction",
            Self::Government => "Government",
            Self::HealthFitness => "Health & Fitness",
            Self::HealthFitnessAlternativeHealth => {
                "Health & Fitness > Alternative Health"
            }
            Self::HealthFitnessFitness => "Health & Fitness > Fitness",
            Self::HealthFitnessMedicine => "Health & Fitness > Medicine",
            Self::HealthFitnessMentalHealth => "Health & Fitness > Mental Health",
            Self::HealthFitnessNutrition => "Health & Fitness > Nutrition",
            Self::HealthFitnessSexuality => "Health & Fitness > Sexuality",
            Self::History => "History",
            Self::KidsFamily => "Kids & Family",
            Self::KidsFamilyEducationForKids => "Kids & Family > Education for Kids",
            Self::KidsFamilyParenting => "Kids & Family > Parenting",
            Self::KidsFamilyPetsAnimals => "Kids & Family > Pets & Animals",
            Self::KidsFamilyStoriesForKids => "Kids & Family > Stories for Kids",
            Self::Leisure => "Leisure",
            Self::LeisureAnimationManga => "Leisure > Animation & Manga",
            Self::LeisureAutomotive => "Leisure > Automotive",
            Self::LeisureAviation => "Leisure > Aviation",
            Self::LeisureCrafts => "Leisure > Crafts",
            Self::LeisureGames => "Leisure > Games",
            Self::LeisureHobbies => "Leisure > Hobbies",
            Self::LeisureHomeGarden => "Leisure > Home & Garden",
            Self::LeisureVideoGames => "Leisure > Video Games",
            Self::Music => "Music",
            Self::MusicMusicCommentary => "Music > Music Commentary",
            Self::MusicMusicHistory => "Music > Music History",
            Self::MusicMusicInterviews => "Music > Music Interviews",
            Self::News => "News",
            Self::NewsBusinessNews => "News > Business News",
            Self::NewsDailyNews => "News > Daily News",
            Self::NewsEntertainmentNews => "News > Entertainment News",
            Self::NewsNewsCommentary => "News > News Commentary",
            Self::NewsPolitics => "News > Politics",
            Self::NewsSportsNews => "News > Sports News",
            Self::NewsTechNews => "News > Tech News",
            Self::ReligionSpirituality => "Religion & Spirituality",
            Self::ReligionSpiritualityBuddhism => "Religion & Spirituality > Buddhism",
            Self::ReligionSpiritualityChristianity => {
                "Religion & Spirituality > Christianity"
            }
            Self::ReligionSpiritualityHinduism => "Religion & Spirituality > Hinduism",
            Self::ReligionSpiritualityIslam => "Religion & Spirituality > Islam",
            Self::ReligionSpiritualityJudaism => "Religion & Spirituality > Judaism",
            Self::ReligionSpiritualityReligion => "Religion & Spirituality > Religion",
            Self::ReligionSpiritualitySpirituality => {
                "Religion & Spirituality > Spirituality"
            }
            Self::Science => "Science",
            Self::ScienceAstronomy => "Science > Astronomy",
            Self::ScienceChemistry => "Science > Chemistry",
            Self::ScienceEarthSciences => "Science > Earth Sciences",
            Self::ScienceLifeSciences => "Science > Life Sciences",
            Self::ScienceMathematics => "Science > Mathematics",
            Self::ScienceNaturalSciences => "Science > Natural Sciences",
            Self::ScienceNature => "Science > Nature",
            Self::SciencePhysics => "Science > Physics",
            Self::ScienceSocialSciences => "Science > Social Sciences",
            Self::SocietyCulture => "Society & Culture",
            Self::SocietyCultureDocumentary => "Society & Culture > Documentary",
            Self::SocietyCulturePersonalJournals => {
                "Society & Culture > Personal Journals"
            }
            Self::SocietyCulturePhilosophy => "Society & Culture > Philosophy",
            Self::SocietyCulturePlacesTravel => "Society & Culture > Places & Travel",
            Self::SocietyCultureRelationships => "Society & Culture > Relationships",
            Self::Sports => "Sports",
            Self::SportsBaseball => "Sports > Baseball",
            Self::SportsBasketball => "Sports > Basketball",
            Self::SportsCricket => "Sports > Cricket",
            Self::SportsFantasySports => "Sports > Fantasy Sports",
            Self::SportsFootball => "Sports > Football",
            Self::SportsGolf => "Sports > Golf",
            Self::SportsHockey => "Sports > Hockey",
            Self::SportsRugby => "Sports > Rugby",
            Self::SportsRunning => "Sports > Running",
            Self::SportsSoccer => "Sports > Soccer",
            Self::SportsSwimming => "Sports > Swimming",
            Self::SportsTennis => "Sports > Tennis",
            Self::SportsVolleyball => "Sports > Volleyball",
            Self::SportsWilderness => "Sports > Wilderness",
            Self::SportsWrestling => "Sports > Wrestling",
            Self::Technology => "Technology",
            Self::TrueCrime => "True Crime",
            Self::TvFilm => "TV & Film",
            Self::TvFilmAfterShows => "TV & Film > After Shows",
            Self::TvFilmFilmHistory => "TV & Film > Film History",
            Self::TvFilmFilmInterviews => "TV & Film > Film Interviews",
            Self::TvFilmFilmReviews => "TV & Film > Film Reviews",
            Self::TvFilmTvReviews => "TV & Film > TV Reviews",
            Self::Other(s) => s.as_ref(),
        }
    }
}

impl<'a> From<&'a str> for AppleCategoryValue<'a> {
    fn from(s: &'a str) -> Self {
        match s {
            "Arts" => Self::Arts,
            "Arts > Books" => Self::ArtsBooks,
            "Arts > Design" => Self::ArtsDesign,
            "Arts > Fashion & Beauty" => Self::ArtsFashionBeauty,
            "Arts > Food" => Self::ArtsFood,
            "Arts > Performing Arts" => Self::ArtsPerformingArts,
            "Arts > Visual Arts" => Self::ArtsVisualArts,
            "Business" => Self::Business,
            "Business > Careers" => Self::BusinessCareers,
            "Business > Entrepreneurship" => Self::BusinessEntrepreneurship,
            "Business > Investing" => Self::BusinessInvesting,
            "Business > Management" => Self::BusinessManagement,
            "Business > Marketing" => Self::BusinessMarketing,
            "Business > Non-Profit" => Self::BusinessNonProfit,
            "Comedy" => Self::Comedy,
            "Comedy > Comedy Interviews" => Self::ComedyComedyInterviews,
            "Comedy > Improv" => Self::ComedyImprov,
            "Comedy > Stand-Up" => Self::ComedyStandUp,
            "Education" => Self::Education,
            "Education > Courses" => Self::EducationCourses,
            "Education > How To" => Self::EducationHowTo,
            "Education > Language Learning" => Self::EducationLanguageLearning,
            "Education > Self-Improvement" => Self::EducationSelfImprovement,
            "Fiction" => Self::Fiction,
            "Fiction > Comedy Fiction" => Self::FictionComedyFiction,
            "Fiction > Drama" => Self::FictionDrama,
            "Fiction > Science Fiction" => Self::FictionScienceFiction,
            "Government" => Self::Government,
            "Health & Fitness" => Self::HealthFitness,
            "Health & Fitness > Alternative Health" => {
                Self::HealthFitnessAlternativeHealth
            }
            "Health & Fitness > Fitness" => Self::HealthFitnessFitness,
            "Health & Fitness > Medicine" => Self::HealthFitnessMedicine,
            "Health & Fitness > Mental Health" => Self::HealthFitnessMentalHealth,
            "Health & Fitness > Nutrition" => Self::HealthFitnessNutrition,
            "Health & Fitness > Sexuality" => Self::HealthFitnessSexuality,
            "History" => Self::History,
            "Kids & Family" => Self::KidsFamily,
            "Kids & Family > Education for Kids" => Self::KidsFamilyEducationForKids,
            "Kids & Family > Parenting" => Self::KidsFamilyParenting,
            "Kids & Family > Pets & Animals" => Self::KidsFamilyPetsAnimals,
            "Kids & Family > Stories for Kids" => Self::KidsFamilyStoriesForKids,
            "Leisure" => Self::Leisure,
            "Leisure > Animation & Manga" => Self::LeisureAnimationManga,
            "Leisure > Automotive" => Self::LeisureAutomotive,
            "Leisure > Aviation" => Self::LeisureAviation,
            "Leisure > Crafts" => Self::LeisureCrafts,
            "Leisure > Games" => Self::LeisureGames,
            "Leisure > Hobbies" => Self::LeisureHobbies,
            "Leisure > Home & Garden" => Self::LeisureHomeGarden,
            "Leisure > Video Games" => Self::LeisureVideoGames,
            "Music" => Self::Music,
            "Music > Music Commentary" => Self::MusicMusicCommentary,
            "Music > Music History" => Self::MusicMusicHistory,
            "Music > Music Interviews" => Self::MusicMusicInterviews,
            "News" => Self::News,
            "News > Business News" => Self::NewsBusinessNews,
            "News > Daily News" => Self::NewsDailyNews,
            "News > Entertainment News" => Self::NewsEntertainmentNews,
            "News > News Commentary" => Self::NewsNewsCommentary,
            "News > Politics" => Self::NewsPolitics,
            "News > Sports News" => Self::NewsSportsNews,
            "News > Tech News" => Self::NewsTechNews,
            "Religion & Spirituality" => Self::ReligionSpirituality,
            "Religion & Spirituality > Buddhism" => Self::ReligionSpiritualityBuddhism,
            "Religion & Spirituality > Christianity" => {
                Self::ReligionSpiritualityChristianity
            }
            "Religion & Spirituality > Hinduism" => Self::ReligionSpiritualityHinduism,
            "Religion & Spirituality > Islam" => Self::ReligionSpiritualityIslam,
            "Religion & Spirituality > Judaism" => Self::ReligionSpiritualityJudaism,
            "Religion & Spirituality > Religion" => Self::ReligionSpiritualityReligion,
            "Religion & Spirituality > Spirituality" => {
                Self::ReligionSpiritualitySpirituality
            }
            "Science" => Self::Science,
            "Science > Astronomy" => Self::ScienceAstronomy,
            "Science > Chemistry" => Self::ScienceChemistry,
            "Science > Earth Sciences" => Self::ScienceEarthSciences,
            "Science > Life Sciences" => Self::ScienceLifeSciences,
            "Science > Mathematics" => Self::ScienceMathematics,
            "Science > Natural Sciences" => Self::ScienceNaturalSciences,
            "Science > Nature" => Self::ScienceNature,
            "Science > Physics" => Self::SciencePhysics,
            "Science > Social Sciences" => Self::ScienceSocialSciences,
            "Society & Culture" => Self::SocietyCulture,
            "Society & Culture > Documentary" => Self::SocietyCultureDocumentary,
            "Society & Culture > Personal Journals" => {
                Self::SocietyCulturePersonalJournals
            }
            "Society & Culture > Philosophy" => Self::SocietyCulturePhilosophy,
            "Society & Culture > Places & Travel" => Self::SocietyCulturePlacesTravel,
            "Society & Culture > Relationships" => Self::SocietyCultureRelationships,
            "Sports" => Self::Sports,
            "Sports > Baseball" => Self::SportsBaseball,
            "Sports > Basketball" => Self::SportsBasketball,
            "Sports > Cricket" => Self::SportsCricket,
            "Sports > Fantasy Sports" => Self::SportsFantasySports,
            "Sports > Football" => Self::SportsFootball,
            "Sports > Golf" => Self::SportsGolf,
            "Sports > Hockey" => Self::SportsHockey,
            "Sports > Rugby" => Self::SportsRugby,
            "Sports > Running" => Self::SportsRunning,
            "Sports > Soccer" => Self::SportsSoccer,
            "Sports > Swimming" => Self::SportsSwimming,
            "Sports > Tennis" => Self::SportsTennis,
            "Sports > Volleyball" => Self::SportsVolleyball,
            "Sports > Wilderness" => Self::SportsWilderness,
            "Sports > Wrestling" => Self::SportsWrestling,
            "Technology" => Self::Technology,
            "True Crime" => Self::TrueCrime,
            "TV & Film" => Self::TvFilm,
            "TV & Film > After Shows" => Self::TvFilmAfterShows,
            "TV & Film > Film History" => Self::TvFilmFilmHistory,
            "TV & Film > Film Interviews" => Self::TvFilmFilmInterviews,
            "TV & Film > Film Reviews" => Self::TvFilmFilmReviews,
            "TV & Film > TV Reviews" => Self::TvFilmTvReviews,
            _ => Self::Other(CowStr::from(s)),
        }
    }
}

impl<'a> From<String> for AppleCategoryValue<'a> {
    fn from(s: String) -> Self {
        match s.as_str() {
            "Arts" => Self::Arts,
            "Arts > Books" => Self::ArtsBooks,
            "Arts > Design" => Self::ArtsDesign,
            "Arts > Fashion & Beauty" => Self::ArtsFashionBeauty,
            "Arts > Food" => Self::ArtsFood,
            "Arts > Performing Arts" => Self::ArtsPerformingArts,
            "Arts > Visual Arts" => Self::ArtsVisualArts,
            "Business" => Self::Business,
            "Business > Careers" => Self::BusinessCareers,
            "Business > Entrepreneurship" => Self::BusinessEntrepreneurship,
            "Business > Investing" => Self::BusinessInvesting,
            "Business > Management" => Self::BusinessManagement,
            "Business > Marketing" => Self::BusinessMarketing,
            "Business > Non-Profit" => Self::BusinessNonProfit,
            "Comedy" => Self::Comedy,
            "Comedy > Comedy Interviews" => Self::ComedyComedyInterviews,
            "Comedy > Improv" => Self::ComedyImprov,
            "Comedy > Stand-Up" => Self::ComedyStandUp,
            "Education" => Self::Education,
            "Education > Courses" => Self::EducationCourses,
            "Education > How To" => Self::EducationHowTo,
            "Education > Language Learning" => Self::EducationLanguageLearning,
            "Education > Self-Improvement" => Self::EducationSelfImprovement,
            "Fiction" => Self::Fiction,
            "Fiction > Comedy Fiction" => Self::FictionComedyFiction,
            "Fiction > Drama" => Self::FictionDrama,
            "Fiction > Science Fiction" => Self::FictionScienceFiction,
            "Government" => Self::Government,
            "Health & Fitness" => Self::HealthFitness,
            "Health & Fitness > Alternative Health" => {
                Self::HealthFitnessAlternativeHealth
            }
            "Health & Fitness > Fitness" => Self::HealthFitnessFitness,
            "Health & Fitness > Medicine" => Self::HealthFitnessMedicine,
            "Health & Fitness > Mental Health" => Self::HealthFitnessMentalHealth,
            "Health & Fitness > Nutrition" => Self::HealthFitnessNutrition,
            "Health & Fitness > Sexuality" => Self::HealthFitnessSexuality,
            "History" => Self::History,
            "Kids & Family" => Self::KidsFamily,
            "Kids & Family > Education for Kids" => Self::KidsFamilyEducationForKids,
            "Kids & Family > Parenting" => Self::KidsFamilyParenting,
            "Kids & Family > Pets & Animals" => Self::KidsFamilyPetsAnimals,
            "Kids & Family > Stories for Kids" => Self::KidsFamilyStoriesForKids,
            "Leisure" => Self::Leisure,
            "Leisure > Animation & Manga" => Self::LeisureAnimationManga,
            "Leisure > Automotive" => Self::LeisureAutomotive,
            "Leisure > Aviation" => Self::LeisureAviation,
            "Leisure > Crafts" => Self::LeisureCrafts,
            "Leisure > Games" => Self::LeisureGames,
            "Leisure > Hobbies" => Self::LeisureHobbies,
            "Leisure > Home & Garden" => Self::LeisureHomeGarden,
            "Leisure > Video Games" => Self::LeisureVideoGames,
            "Music" => Self::Music,
            "Music > Music Commentary" => Self::MusicMusicCommentary,
            "Music > Music History" => Self::MusicMusicHistory,
            "Music > Music Interviews" => Self::MusicMusicInterviews,
            "News" => Self::News,
            "News > Business News" => Self::NewsBusinessNews,
            "News > Daily News" => Self::NewsDailyNews,
            "News > Entertainment News" => Self::NewsEntertainmentNews,
            "News > News Commentary" => Self::NewsNewsCommentary,
            "News > Politics" => Self::NewsPolitics,
            "News > Sports News" => Self::NewsSportsNews,
            "News > Tech News" => Self::NewsTechNews,
            "Religion & Spirituality" => Self::ReligionSpirituality,
            "Religion & Spirituality > Buddhism" => Self::ReligionSpiritualityBuddhism,
            "Religion & Spirituality > Christianity" => {
                Self::ReligionSpiritualityChristianity
            }
            "Religion & Spirituality > Hinduism" => Self::ReligionSpiritualityHinduism,
            "Religion & Spirituality > Islam" => Self::ReligionSpiritualityIslam,
            "Religion & Spirituality > Judaism" => Self::ReligionSpiritualityJudaism,
            "Religion & Spirituality > Religion" => Self::ReligionSpiritualityReligion,
            "Religion & Spirituality > Spirituality" => {
                Self::ReligionSpiritualitySpirituality
            }
            "Science" => Self::Science,
            "Science > Astronomy" => Self::ScienceAstronomy,
            "Science > Chemistry" => Self::ScienceChemistry,
            "Science > Earth Sciences" => Self::ScienceEarthSciences,
            "Science > Life Sciences" => Self::ScienceLifeSciences,
            "Science > Mathematics" => Self::ScienceMathematics,
            "Science > Natural Sciences" => Self::ScienceNaturalSciences,
            "Science > Nature" => Self::ScienceNature,
            "Science > Physics" => Self::SciencePhysics,
            "Science > Social Sciences" => Self::ScienceSocialSciences,
            "Society & Culture" => Self::SocietyCulture,
            "Society & Culture > Documentary" => Self::SocietyCultureDocumentary,
            "Society & Culture > Personal Journals" => {
                Self::SocietyCulturePersonalJournals
            }
            "Society & Culture > Philosophy" => Self::SocietyCulturePhilosophy,
            "Society & Culture > Places & Travel" => Self::SocietyCulturePlacesTravel,
            "Society & Culture > Relationships" => Self::SocietyCultureRelationships,
            "Sports" => Self::Sports,
            "Sports > Baseball" => Self::SportsBaseball,
            "Sports > Basketball" => Self::SportsBasketball,
            "Sports > Cricket" => Self::SportsCricket,
            "Sports > Fantasy Sports" => Self::SportsFantasySports,
            "Sports > Football" => Self::SportsFootball,
            "Sports > Golf" => Self::SportsGolf,
            "Sports > Hockey" => Self::SportsHockey,
            "Sports > Rugby" => Self::SportsRugby,
            "Sports > Running" => Self::SportsRunning,
            "Sports > Soccer" => Self::SportsSoccer,
            "Sports > Swimming" => Self::SportsSwimming,
            "Sports > Tennis" => Self::SportsTennis,
            "Sports > Volleyball" => Self::SportsVolleyball,
            "Sports > Wilderness" => Self::SportsWilderness,
            "Sports > Wrestling" => Self::SportsWrestling,
            "Technology" => Self::Technology,
            "True Crime" => Self::TrueCrime,
            "TV & Film" => Self::TvFilm,
            "TV & Film > After Shows" => Self::TvFilmAfterShows,
            "TV & Film > Film History" => Self::TvFilmFilmHistory,
            "TV & Film > Film Interviews" => Self::TvFilmFilmInterviews,
            "TV & Film > Film Reviews" => Self::TvFilmFilmReviews,
            "TV & Film > TV Reviews" => Self::TvFilmTvReviews,
            _ => Self::Other(CowStr::from(s)),
        }
    }
}

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

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

impl<'a> serde::Serialize for AppleCategoryValue<'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 AppleCategoryValue<'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<'a> Default for AppleCategoryValue<'a> {
    fn default() -> Self {
        Self::Other(Default::default())
    }
}

impl jacquard_common::IntoStatic for AppleCategoryValue<'_> {
    type Output = AppleCategoryValue<'static>;
    fn into_static(self) -> Self::Output {
        match self {
            AppleCategoryValue::Arts => AppleCategoryValue::Arts,
            AppleCategoryValue::ArtsBooks => AppleCategoryValue::ArtsBooks,
            AppleCategoryValue::ArtsDesign => AppleCategoryValue::ArtsDesign,
            AppleCategoryValue::ArtsFashionBeauty => {
                AppleCategoryValue::ArtsFashionBeauty
            }
            AppleCategoryValue::ArtsFood => AppleCategoryValue::ArtsFood,
            AppleCategoryValue::ArtsPerformingArts => {
                AppleCategoryValue::ArtsPerformingArts
            }
            AppleCategoryValue::ArtsVisualArts => AppleCategoryValue::ArtsVisualArts,
            AppleCategoryValue::Business => AppleCategoryValue::Business,
            AppleCategoryValue::BusinessCareers => AppleCategoryValue::BusinessCareers,
            AppleCategoryValue::BusinessEntrepreneurship => {
                AppleCategoryValue::BusinessEntrepreneurship
            }
            AppleCategoryValue::BusinessInvesting => {
                AppleCategoryValue::BusinessInvesting
            }
            AppleCategoryValue::BusinessManagement => {
                AppleCategoryValue::BusinessManagement
            }
            AppleCategoryValue::BusinessMarketing => {
                AppleCategoryValue::BusinessMarketing
            }
            AppleCategoryValue::BusinessNonProfit => {
                AppleCategoryValue::BusinessNonProfit
            }
            AppleCategoryValue::Comedy => AppleCategoryValue::Comedy,
            AppleCategoryValue::ComedyComedyInterviews => {
                AppleCategoryValue::ComedyComedyInterviews
            }
            AppleCategoryValue::ComedyImprov => AppleCategoryValue::ComedyImprov,
            AppleCategoryValue::ComedyStandUp => AppleCategoryValue::ComedyStandUp,
            AppleCategoryValue::Education => AppleCategoryValue::Education,
            AppleCategoryValue::EducationCourses => AppleCategoryValue::EducationCourses,
            AppleCategoryValue::EducationHowTo => AppleCategoryValue::EducationHowTo,
            AppleCategoryValue::EducationLanguageLearning => {
                AppleCategoryValue::EducationLanguageLearning
            }
            AppleCategoryValue::EducationSelfImprovement => {
                AppleCategoryValue::EducationSelfImprovement
            }
            AppleCategoryValue::Fiction => AppleCategoryValue::Fiction,
            AppleCategoryValue::FictionComedyFiction => {
                AppleCategoryValue::FictionComedyFiction
            }
            AppleCategoryValue::FictionDrama => AppleCategoryValue::FictionDrama,
            AppleCategoryValue::FictionScienceFiction => {
                AppleCategoryValue::FictionScienceFiction
            }
            AppleCategoryValue::Government => AppleCategoryValue::Government,
            AppleCategoryValue::HealthFitness => AppleCategoryValue::HealthFitness,
            AppleCategoryValue::HealthFitnessAlternativeHealth => {
                AppleCategoryValue::HealthFitnessAlternativeHealth
            }
            AppleCategoryValue::HealthFitnessFitness => {
                AppleCategoryValue::HealthFitnessFitness
            }
            AppleCategoryValue::HealthFitnessMedicine => {
                AppleCategoryValue::HealthFitnessMedicine
            }
            AppleCategoryValue::HealthFitnessMentalHealth => {
                AppleCategoryValue::HealthFitnessMentalHealth
            }
            AppleCategoryValue::HealthFitnessNutrition => {
                AppleCategoryValue::HealthFitnessNutrition
            }
            AppleCategoryValue::HealthFitnessSexuality => {
                AppleCategoryValue::HealthFitnessSexuality
            }
            AppleCategoryValue::History => AppleCategoryValue::History,
            AppleCategoryValue::KidsFamily => AppleCategoryValue::KidsFamily,
            AppleCategoryValue::KidsFamilyEducationForKids => {
                AppleCategoryValue::KidsFamilyEducationForKids
            }
            AppleCategoryValue::KidsFamilyParenting => {
                AppleCategoryValue::KidsFamilyParenting
            }
            AppleCategoryValue::KidsFamilyPetsAnimals => {
                AppleCategoryValue::KidsFamilyPetsAnimals
            }
            AppleCategoryValue::KidsFamilyStoriesForKids => {
                AppleCategoryValue::KidsFamilyStoriesForKids
            }
            AppleCategoryValue::Leisure => AppleCategoryValue::Leisure,
            AppleCategoryValue::LeisureAnimationManga => {
                AppleCategoryValue::LeisureAnimationManga
            }
            AppleCategoryValue::LeisureAutomotive => {
                AppleCategoryValue::LeisureAutomotive
            }
            AppleCategoryValue::LeisureAviation => AppleCategoryValue::LeisureAviation,
            AppleCategoryValue::LeisureCrafts => AppleCategoryValue::LeisureCrafts,
            AppleCategoryValue::LeisureGames => AppleCategoryValue::LeisureGames,
            AppleCategoryValue::LeisureHobbies => AppleCategoryValue::LeisureHobbies,
            AppleCategoryValue::LeisureHomeGarden => {
                AppleCategoryValue::LeisureHomeGarden
            }
            AppleCategoryValue::LeisureVideoGames => {
                AppleCategoryValue::LeisureVideoGames
            }
            AppleCategoryValue::Music => AppleCategoryValue::Music,
            AppleCategoryValue::MusicMusicCommentary => {
                AppleCategoryValue::MusicMusicCommentary
            }
            AppleCategoryValue::MusicMusicHistory => {
                AppleCategoryValue::MusicMusicHistory
            }
            AppleCategoryValue::MusicMusicInterviews => {
                AppleCategoryValue::MusicMusicInterviews
            }
            AppleCategoryValue::News => AppleCategoryValue::News,
            AppleCategoryValue::NewsBusinessNews => AppleCategoryValue::NewsBusinessNews,
            AppleCategoryValue::NewsDailyNews => AppleCategoryValue::NewsDailyNews,
            AppleCategoryValue::NewsEntertainmentNews => {
                AppleCategoryValue::NewsEntertainmentNews
            }
            AppleCategoryValue::NewsNewsCommentary => {
                AppleCategoryValue::NewsNewsCommentary
            }
            AppleCategoryValue::NewsPolitics => AppleCategoryValue::NewsPolitics,
            AppleCategoryValue::NewsSportsNews => AppleCategoryValue::NewsSportsNews,
            AppleCategoryValue::NewsTechNews => AppleCategoryValue::NewsTechNews,
            AppleCategoryValue::ReligionSpirituality => {
                AppleCategoryValue::ReligionSpirituality
            }
            AppleCategoryValue::ReligionSpiritualityBuddhism => {
                AppleCategoryValue::ReligionSpiritualityBuddhism
            }
            AppleCategoryValue::ReligionSpiritualityChristianity => {
                AppleCategoryValue::ReligionSpiritualityChristianity
            }
            AppleCategoryValue::ReligionSpiritualityHinduism => {
                AppleCategoryValue::ReligionSpiritualityHinduism
            }
            AppleCategoryValue::ReligionSpiritualityIslam => {
                AppleCategoryValue::ReligionSpiritualityIslam
            }
            AppleCategoryValue::ReligionSpiritualityJudaism => {
                AppleCategoryValue::ReligionSpiritualityJudaism
            }
            AppleCategoryValue::ReligionSpiritualityReligion => {
                AppleCategoryValue::ReligionSpiritualityReligion
            }
            AppleCategoryValue::ReligionSpiritualitySpirituality => {
                AppleCategoryValue::ReligionSpiritualitySpirituality
            }
            AppleCategoryValue::Science => AppleCategoryValue::Science,
            AppleCategoryValue::ScienceAstronomy => AppleCategoryValue::ScienceAstronomy,
            AppleCategoryValue::ScienceChemistry => AppleCategoryValue::ScienceChemistry,
            AppleCategoryValue::ScienceEarthSciences => {
                AppleCategoryValue::ScienceEarthSciences
            }
            AppleCategoryValue::ScienceLifeSciences => {
                AppleCategoryValue::ScienceLifeSciences
            }
            AppleCategoryValue::ScienceMathematics => {
                AppleCategoryValue::ScienceMathematics
            }
            AppleCategoryValue::ScienceNaturalSciences => {
                AppleCategoryValue::ScienceNaturalSciences
            }
            AppleCategoryValue::ScienceNature => AppleCategoryValue::ScienceNature,
            AppleCategoryValue::SciencePhysics => AppleCategoryValue::SciencePhysics,
            AppleCategoryValue::ScienceSocialSciences => {
                AppleCategoryValue::ScienceSocialSciences
            }
            AppleCategoryValue::SocietyCulture => AppleCategoryValue::SocietyCulture,
            AppleCategoryValue::SocietyCultureDocumentary => {
                AppleCategoryValue::SocietyCultureDocumentary
            }
            AppleCategoryValue::SocietyCulturePersonalJournals => {
                AppleCategoryValue::SocietyCulturePersonalJournals
            }
            AppleCategoryValue::SocietyCulturePhilosophy => {
                AppleCategoryValue::SocietyCulturePhilosophy
            }
            AppleCategoryValue::SocietyCulturePlacesTravel => {
                AppleCategoryValue::SocietyCulturePlacesTravel
            }
            AppleCategoryValue::SocietyCultureRelationships => {
                AppleCategoryValue::SocietyCultureRelationships
            }
            AppleCategoryValue::Sports => AppleCategoryValue::Sports,
            AppleCategoryValue::SportsBaseball => AppleCategoryValue::SportsBaseball,
            AppleCategoryValue::SportsBasketball => AppleCategoryValue::SportsBasketball,
            AppleCategoryValue::SportsCricket => AppleCategoryValue::SportsCricket,
            AppleCategoryValue::SportsFantasySports => {
                AppleCategoryValue::SportsFantasySports
            }
            AppleCategoryValue::SportsFootball => AppleCategoryValue::SportsFootball,
            AppleCategoryValue::SportsGolf => AppleCategoryValue::SportsGolf,
            AppleCategoryValue::SportsHockey => AppleCategoryValue::SportsHockey,
            AppleCategoryValue::SportsRugby => AppleCategoryValue::SportsRugby,
            AppleCategoryValue::SportsRunning => AppleCategoryValue::SportsRunning,
            AppleCategoryValue::SportsSoccer => AppleCategoryValue::SportsSoccer,
            AppleCategoryValue::SportsSwimming => AppleCategoryValue::SportsSwimming,
            AppleCategoryValue::SportsTennis => AppleCategoryValue::SportsTennis,
            AppleCategoryValue::SportsVolleyball => AppleCategoryValue::SportsVolleyball,
            AppleCategoryValue::SportsWilderness => AppleCategoryValue::SportsWilderness,
            AppleCategoryValue::SportsWrestling => AppleCategoryValue::SportsWrestling,
            AppleCategoryValue::Technology => AppleCategoryValue::Technology,
            AppleCategoryValue::TrueCrime => AppleCategoryValue::TrueCrime,
            AppleCategoryValue::TvFilm => AppleCategoryValue::TvFilm,
            AppleCategoryValue::TvFilmAfterShows => AppleCategoryValue::TvFilmAfterShows,
            AppleCategoryValue::TvFilmFilmHistory => {
                AppleCategoryValue::TvFilmFilmHistory
            }
            AppleCategoryValue::TvFilmFilmInterviews => {
                AppleCategoryValue::TvFilmFilmInterviews
            }
            AppleCategoryValue::TvFilmFilmReviews => {
                AppleCategoryValue::TvFilmFilmReviews
            }
            AppleCategoryValue::TvFilmTvReviews => AppleCategoryValue::TvFilmTvReviews,
            AppleCategoryValue::Other(v) => AppleCategoryValue::Other(v.into_static()),
        }
    }
}

/// Identifies a podcast episode by its podcast GUID and feed item identifier, independent of which repository currently holds the record.

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct EpisodeRef<'a> {
    ///The original feed item identifier. Must match the <guid> element of the corresponding RSS feed item.
    #[serde(borrow)]
    pub feed_item_guid: CowStr<'a>,
    ///URL of the podcast's RSS feed.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub feed_url: Option<UriValue<'a>>,
    ///Podcasting 2.0 UUIDv5 GUID of the parent podcast. If the feed does not include a <podcast:guid> tag, derive it as specified in https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/tags/guid.md.
    #[serde(borrow)]
    pub podcast_guid: CowStr<'a>,
}

/// Identifies a podcast by its Podcasting 2.0 GUID, independent of which repository currently holds the record.

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct PodcastRef<'a> {
    ///URL of the podcast's RSS feed.
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub feed_url: Option<UriValue<'a>>,
    ///Podcasting 2.0 UUIDv5 GUID of the podcast. If the feed does not include a <podcast:guid> tag, derive it as specified in https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/tags/guid.md.
    #[serde(borrow)]
    pub podcast_guid: CowStr<'a>,
}

impl<'a> LexiconSchema for AppleCategory<'a> {
    fn nsid() -> &'static str {
        "org.atpodcasting.defs"
    }
    fn def_name() -> &'static str {
        "appleCategory"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_org_atpodcasting_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<'a> LexiconSchema for EpisodeRef<'a> {
    fn nsid() -> &'static str {
        "org.atpodcasting.defs"
    }
    fn def_name() -> &'static str {
        "episodeRef"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_org_atpodcasting_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        {
            let value = &self.feed_item_guid;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 2000usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("feed_item_guid"),
                    max: 2000usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        {
            let value = &self.podcast_guid;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 36usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("podcast_guid"),
                    max: 36usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        Ok(())
    }
}

impl<'a> LexiconSchema for PodcastRef<'a> {
    fn nsid() -> &'static str {
        "org.atpodcasting.defs"
    }
    fn def_name() -> &'static str {
        "podcastRef"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_org_atpodcasting_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        {
            let value = &self.podcast_guid;
            #[allow(unused_comparisons)]
            if <str>::len(value.as_ref()) > 36usize {
                return Err(ConstraintError::MaxLength {
                    path: ValidationPath::from_field("podcast_guid"),
                    max: 36usize,
                    actual: <str>::len(value.as_ref()),
                });
            }
        }
        Ok(())
    }
}

fn lexicon_doc_org_atpodcasting_defs() -> LexiconDoc<'static> {
    #[allow(unused_imports)]
    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
    use jacquard_lexicon::lexicon::*;
    use alloc::collections::BTreeMap;
    LexiconDoc {
        lexicon: Lexicon::Lexicon1,
        id: CowStr::new_static("org.atpodcasting.defs"),
        defs: {
            let mut map = BTreeMap::new();
            map.insert(
                SmolStr::new_static("appleCategory"),
                LexUserType::Object(LexObject {
                    description: Some(
                        CowStr::new_static(
                            "A podcast category from the Apple Podcasts taxonomy.",
                        ),
                    ),
                    required: Some(vec![SmolStr::new_static("value")]),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("value"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The category value. Subcategories use the format 'Category > Subcategory'.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("episodeRef"),
                LexUserType::Object(LexObject {
                    description: Some(
                        CowStr::new_static(
                            "Identifies a podcast episode by its podcast GUID and feed item identifier, independent of which repository currently holds the record.",
                        ),
                    ),
                    required: Some(
                        vec![
                            SmolStr::new_static("podcastGuid"),
                            SmolStr::new_static("feedItemGuid")
                        ],
                    ),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("feedItemGuid"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The original feed item identifier. Must match the <guid> element of the corresponding RSS feed item.",
                                    ),
                                ),
                                max_length: Some(2000usize),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("feedUrl"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static("URL of the podcast's RSS feed."),
                                ),
                                format: Some(LexStringFormat::Uri),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("podcastGuid"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "Podcasting 2.0 UUIDv5 GUID of the parent podcast. If the feed does not include a <podcast:guid> tag, derive it as specified in https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/tags/guid.md.",
                                    ),
                                ),
                                max_length: Some(36usize),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("podcastRef"),
                LexUserType::Object(LexObject {
                    description: Some(
                        CowStr::new_static(
                            "Identifies a podcast by its Podcasting 2.0 GUID, independent of which repository currently holds the record.",
                        ),
                    ),
                    required: Some(vec![SmolStr::new_static("podcastGuid")]),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("feedUrl"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static("URL of the podcast's RSS feed."),
                                ),
                                format: Some(LexStringFormat::Uri),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("podcastGuid"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "Podcasting 2.0 UUIDv5 GUID of the podcast. If the feed does not include a <podcast:guid> tag, derive it as specified in https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/tags/guid.md.",
                                    ),
                                ),
                                max_length: Some(36usize),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map
        },
        ..Default::default()
    }
}