use crate::ParameterName;

#[derive(
    Debug,
    Copy,
    Clone,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    serde::Serialize,
    serde::Deserialize,
    derive_more::Display,
    derive_more::FromStr,
    strum::EnumIter,
)]
pub enum AreaOrCountry {
    Afghanistan,
    Africa,
    AfricaOthGdsNsaDetail,
    Albania,
    Algeria,
    AllCountries,
    AllOthSeas,
    AllOthThanCanada,
    Andorra,
    Angola,
    Anguilla,
    AntiguaBarbuda,
    Argentina,
    Armenia,
    Aruba,
    AsiaAndPac,
    AsiaAndPacOthNsaDetail,
    Australia,
    Austria,
    Azerbaijan,
    Bahamas,
    Bahrain,
    Bangladesh,
    Barbados,
    Belarus,
    Belgium,
    Belize,
    Benin,
    Bermuda,
    Bhutan,
    Bolivia,
    BosniaHerzegovina,
    Botswana,
    Brazil,
    Brunei,
    Bulgaria,
    BurkinaFaso,
    Burma,
    Burundi,
    CaboVerde,
    CaftaDrCountries,
    Cambodia,
    Cameroon,
    Canada,
    CentralAmerica,
    CentralAfricanRepublic,
    Chad,
    Chile,
    China,
    CookIslands,
    Colombia,
    Comoros,
    CongoBrazzaville,
    CongoKinshasa,
    CostaRica,
    CoteDIvoire,
    Croatia,
    Cuba,
    Curacao,
    Cyprus,
    CzechRep,
    Denmark,
    Djibouti,
    Dominica,
    DominicanRep,
    EasternEurope,
    EastTimor,
    Ecuador,
    Egypt,
    ElSalvador,
    EquatorialGuinea,
    Eritrea,
    Estonia,
    Eswatini,
    Ethiopia,
    EU,
    EuroArea,
    Europe,
    EuropeOthNsaDetail,
    FarEast,
    FarWest,
    Fiji,
    Finland,
    France,
    FrenchGuiana,
    FrenchIslandsCaribbean,
    FrenchIslandsIndianOcean,
    FrenchIslandsPacific,
    Gabon,
    Gambia,
    Georgia,
    Germany,
    Ghana,
    Gibraltar,
    GreatLakes,
    Greece,
    Greenland,
    Grenada,
    Guatemala,
    Guinea,
    GuineaBissau,
    Guyana,
    Haiti,
    Honduras,
    HongKong,
    Hungary,
    Iceland,
    India,
    Indonesia,
    IntOrgAndUnalloc,
    Iran,
    Iraq,
    Ireland,
    Israel,
    Italy,
    Jamaica,
    Japan,
    Jordan,
    Kazakhstan,
    Kenya,
    Kiribati,
    Kosovo,
    Kuwait,
    Kyrgyzstan,
    Laos,
    LatAmAndOthWestHem,
    Latvia,
    Lebanon,
    Lesotho,
    Liberia,
    Libya,
    Liechtenstein,
    Lithuania,
    Luxembourg,
    Macau,
    Madagascar,
    Malawi,
    Malaysia,
    Maldives,
    Mali,
    Malta,
    MarshallIslands,
    Mauritania,
    Mauritius,
    Mexico,
    Micronesia,
    MiddleEast,
    MiddleEastOthGdsNsaDetail,
    Moldova,
    Monaco,
    Mongolia,
    Montenegro,
    Morocco,
    Mozambique,
    Namibia,
    Nauru,
    Nepal,
    Netherlands,
    NetherlandsAntilles,
    NetherlandsIslandsCaribbean,
    NewEngland,
    NewZealand,
    Nicaragua,
    Niger,
    Nigeria,
    Niue,
    NorthKorea,
    NorthMacedonia,
    Norway,
    Oman,
    OPEC,
    OthAfricaExcl1,
    OthAfricaExcl3,
    OthAfricaExcl3DiOutward,
    OthAfricaIst,
    OthAsiaAndPacExcl10DiInward,
    OthAsiaAndPacExcl13DiOutward,
    OthAsiaAndPacExcl15,
    OthAsiaAndPacExcl8,
    OthAsiaAndPacIst,
    OtherAsiaPacific,
    OthCenAmExcl4DiOutward,
    OthEuropeExcl17DiInward,
    OthEuropeExcl22DiOutward,
    OthEuropeExcl32,
    OthEuropeExcl7,
    OthEuropeIst,
    OthMiddleEastExc3DiOutward,
    OthMiddleEastExc5DiInward,
    OthMiddleEastExcl5,
    OthMiddleEastIst,
    OthSouthAmExcl7DiOutward,
    OthSouthAndCenAmExcl13,
    OthSouthAndCenAmExcl4,
    OthSouthAndCenAmExcl4DiInward,
    OthSouthAndCenAmIst,
    OthWestHem,
    OthWestHemOthExcl3,
    OthWestHemOthExcl4DiInward,
    OthWestHemOthExcl4DiOutward,
    OthWestHemOthIst,
    Pakistan,
    Palau,
    Panama,
    PapuaNewGinea,
    Paraguay,
    Peru,
    Philippines,
    Plains,
    Poland,
    Portugal,
    Qatar,
    ResidualSeas,
    RockyMountains,
    Romania,
    Russia,
    Rwanda,
    Samoa,
    SanMarino,
    SaoTomePrincipe,
    SaudiArabia,
    Senegal,
    Serbia,
    Seychelles,
    SierraLeone,
    Singapore,
    SintMaarten,
    Slovakia,
    Slovenia,
    SolomonIslands,
    Somalia,
    SouthAfrica,
    SouthAm,
    SouthAndCenAm,
    SouthAndCenAmOthNsaDetail,
    Southeast,
    SouthKorea,
    SouthSudan,
    Southwest,
    Spain,
    SriLanka,
    StKittsNevis,
    StLucia,
    StPierreMiquelon,
    StVincentGrenadines,
    Sudan,
    Suriname,
    Switzerland,
    Sweden,
    Syria,
    Taiwan,
    Tajikistan,
    Tanzania,
    Thailand,
    TimorLeste,
    Togo,
    Tonga,
    TrinidadTobago,
    Tunisia,
    Turkey,
    Turkmenistan,
    Tuvalu,
    Uae,
    Uganda,
    UkIslandsCarib,
    Ukraine,
    UnitedKingdom,
    UnitedKingdomIslandsAtlanticAfrica,
    UnitedKingdomIslandsAtlanticOWH,
    UnitedKingdomIslandsCaribbean,
    UnitedKingdomIslandsIndianOcean,
    UnitedKingdomIslandsPacific,
    UnitedStates,
    Uruguay,
    Uzbekistan,
    Vanuatu,
    VaticanCity,
    Venezuela,
    Vietnam,
    WesternSahara,
    Yemen,
    Zambia,
    Zimbabwe,
}

impl AreaOrCountry {
    /// Format `self` for insertion into a request BTreeMap(key, value).
    /// The key is the parameter name.  The value is the parameter value.
    pub fn params(&self) -> (String, String) {
        let key = ParameterName::AreaOrCountry.to_string();
        let value = self.to_string();
        (key, value)
    }

    /// The description field associated with the variant in the BEA response.
    pub fn description(&self) -> String {
        let desc = match self {
            Self::Afghanistan => "Afghanistan",
            Self::Africa => "Africa",
            Self::AfricaOthGdsNsaDetail => {
                "Africa; other countries (those not listed in table 2.3)"
            }
            Self::Albania => "Albania",
            Self::Algeria => "Algeria",
            Self::AllCountries => "All countries",
            Self::AllOthSeas => {
                "All other countries (those not listed separately in tables 2.2 and 3.2)"
            }
            Self::AllOthThanCanada => "All countries other than Canada",
            Self::Andorra => "Andorra",
            Self::Angola => "Angola",
            Self::Anguilla => "Anguilla",
            Self::AntiguaBarbuda => "Antigua and Barbuda",
            Self::Argentina => "Argentina",
            Self::Armenia => "Armenia",
            Self::Aruba => "Aruba",
            Self::AsiaAndPac => "Asia and Pacific",
            Self::AsiaAndPacOthNsaDetail => {
                "Asia and Pacific; other countries (those not listed in table 2.3)"
            }
            Self::Australia => "Australia",
            Self::Austria => "Austria",
            Self::Azerbaijan => "Azerbaijan",
            Self::Bahamas => "Bahamas",
            Self::Bahrain => "Bahrain",
            Self::Bangladesh => "Bangladesh",
            Self::Barbados => "Barbados",
            Self::Belarus => "Belarus",
            Self::Belgium => "Belgium",
            Self::Belize => "Belize",
            Self::Benin => "Benin",
            Self::Bermuda => "Bermuda",
            Self::Bhutan => "Bhutan",
            Self::Bolivia => "Bolivia",
            Self::BosniaHerzegovina => "Bosnia and Herzegovina",
            Self::Botswana => "Botswana",
            Self::Brazil => "Brazil",
            Self::Brunei => "Brunei",
            Self::Bulgaria => "Bulgaria",
            Self::BurkinaFaso => "Burkina Faso",
            Self::Burma => "Burma",
            Self::Burundi => "Burundi",
            Self::CaboVerde => "Cabo Verde",
            Self::CaftaDrCountries => "CAFTA-DR countries",
            Self::Cambodia => "Cambodia",
            Self::Cameroon => "Cameroon",
            Self::Canada => "Canada",
            Self::CentralAmerica => "Central America",
            Self::CentralAfricanRepublic => "Central African Republic",
            Self::Chad => "Chad",
            Self::Chile => "Chile",
            Self::China => "China",
            Self::Colombia => "Colombia",
            Self::CookIslands => "Cook Islands",
            Self::Comoros => "Comoros",
            Self::CongoBrazzaville => "Congo (Brazzaville)",
            Self::CongoKinshasa => "Congo (Kinshasa)",
            Self::CostaRica => "Costa Rica",
            Self::CoteDIvoire => "Cote D'Ivoire",
            Self::Croatia => "Croatia",
            Self::Cuba => "Cuba",
            Self::Curacao => "Curacao",
            Self::Cyprus => "Cyprus",
            Self::CzechRep => "Czech Republic",
            Self::Denmark => "Denmark",
            Self::Djibouti => "Djibouti",
            Self::Dominica => "Dominica",
            Self::DominicanRep => "Dominican Republic",
            Self::EasternEurope => "Eastern Europe",
            Self::EastTimor => "East Timor",
            Self::Ecuador => "Ecuador",
            Self::Egypt => "Egypt",
            Self::ElSalvador => "El Salvador",
            Self::EquatorialGuinea => "Equatorial Guinea",
            Self::Eritrea => "Eritrea",
            Self::Estonia => "Estonia",
            Self::Eswatini => "Eswatini",
            Self::Ethiopia => "Ethiopia",
            Self::EU => "European Union",
            Self::EuroArea => "Euro Area",
            Self::Europe => "Europe",
            Self::EuropeOthNsaDetail => "Europe; other countries (those not listed in table 2.3)",
            Self::FarEast => "Far East",
            Self::FarWest => "Far West",
            Self::Fiji => "Fiji",
            Self::Finland => "Finland",
            Self::France => "France",
            Self::FrenchGuiana => "French Guiana",
            Self::FrenchIslandsCaribbean => "French Islands, Caribbean",
            Self::FrenchIslandsIndianOcean => "French Islands, Indian Ocean",
            Self::FrenchIslandsPacific => "French Islands, Pacific",
            Self::Gabon => "Gabon",
            Self::Gambia => "Gambia",
            Self::Georgia => "Georgia",
            Self::Germany => "Germany",
            Self::Ghana => "Ghana",
            Self::Gibraltar => "Gibraltar",
            Self::GreatLakes => "Great Lakes",
            Self::Greece => "Greece",
            Self::Greenland => "Greenland",
            Self::Grenada => "Grenada",
            Self::Guatemala => "Guatemala",
            Self::Guinea => "Guinea",
            Self::GuineaBissau => "Guinea-Bissau",
            Self::Guyana => "Guyana",
            Self::Haiti => "Haiti",
            Self::Honduras => "Honduras",
            Self::HongKong => "Hong Kong",
            Self::Hungary => "Hungary",
            Self::Iceland => "Iceland",
            Self::India => "India",
            Self::Indonesia => "Indonesia",
            Self::IntOrgAndUnalloc => "International organizations and unallocated",
            Self::Iran => "Iran",
            Self::Iraq => "Iraq",
            Self::Ireland => "Ireland",
            Self::Israel => "Israel",
            Self::Italy => "Italy",
            Self::Jamaica => "Jamaica",
            Self::Japan => "Japan",
            Self::Jordan => "Jordan",
            Self::Kazakhstan => "Kazakhstan",
            Self::Kenya => "Kenya",
            Self::Kiribati => "Kiribati",
            Self::Kosovo => "Kosovo",
            Self::Kuwait => "Kuwait",
            Self::Kyrgyzstan => "Kyrgyzstan",
            Self::Laos => "Laos",
            Self::LatAmAndOthWestHem => "Latin America and Other Western Hemisphere",
            Self::Latvia => "Latvia",
            Self::Lebanon => "Lebanon",
            Self::Lesotho => "Lesotho",
            Self::Liberia => "Liberia",
            Self::Libya => "Libya",
            Self::Liechtenstein => "Liechtenstein",
            Self::Lithuania => "Lithuania",
            Self::Luxembourg => "Luxembourg",
            Self::Macau => "Macau",
            Self::Madagascar => "Madagascar",
            Self::Malawi => "Malawi",
            Self::Malaysia => "Malaysia",
            Self::Maldives => "Maldives",
            Self::Mali => "Mali",
            Self::Malta => "Malta",
            Self::MarshallIslands => "Marshall Islands",
            Self::Mauritania => "Mauritania",
            Self::Mauritius => "Mauritius",
            Self::Mexico => "Mexico",
            Self::Micronesia => "Micronesia",
            Self::MiddleEast => "Middle East",
            Self::MiddleEastOthGdsNsaDetail => {
                "Middle East; other countries (those not listed in table 2.3)"
            }
            Self::Moldova => "Moldova",
            Self::Monaco => "Monaco",
            Self::Mongolia => "Mongolia",
            Self::Montenegro => "Montenegro",
            Self::Morocco => "Morocco",
            Self::Mozambique => "Mozambique",
            Self::Namibia => "Namibia",
            Self::Nauru => "Nauru",
            Self::Nepal => "Nepal",
            Self::Netherlands => "Netherlands",
            Self::NetherlandsAntilles => "Netherlands Antilles",
            Self::NetherlandsIslandsCaribbean => "Netherlands Islands, Caribbean",
            Self::NewEngland => "New England",
            Self::NewZealand => "New Zealand",
            Self::Nicaragua => "Nicaragua",
            Self::Niger => "Niger",
            Self::Nigeria => "Nigeria",
            Self::Niue => "Niue",
            Self::NorthKorea => "North Korea",
            Self::NorthMacedonia => "North Macedonia",
            Self::Norway => "Norway",
            Self::Oman => "Oman",
            Self::OPEC => "OPEC",
            Self::OthAfricaExcl1 => "Other Africa (excluding 1 country, South Africa)",
            Self::OthAfricaExcl3 => "Other Africa (excluding 3 countries)",
            Self::OthAfricaExcl3DiOutward => {
                "Africa, other (excluding 3 countries; outward direct investment)"
            }
            Self::OthAfricaIst => "Other Africa (excluding 3 countries)",
            Self::OthAsiaAndPacExcl10DiInward => {
                "Asia and Pacific, other (excluding 10 countries; inward direct investment)"
            }
            Self::OthAsiaAndPacExcl13DiOutward => {
                "Asia and Pacific, other (excluding 13 countries; outward direct investment)"
            }
            Self::OthAsiaAndPacExcl15 => "Other Asia and Pacific (excluding 15 countries)",
            Self::OthAsiaAndPacExcl8 => "Other Asia and Pacific (excluding 8 countries)",
            Self::OthAsiaAndPacIst => "Other Asia and Pacific (excluding 15 countries)",
            Self::OtherAsiaPacific => "Other-Asia and Pacific",
            Self::OthCenAmExcl4DiOutward => {
                "Central America, other (excluding 4 countries; outward direct investment)"
            }
            Self::OthEuropeExcl17DiInward => {
                "Europe, other (excluding 17 countries; inward direct investment)"
            }
            Self::OthEuropeExcl22DiOutward => {
                "Europe, other (excluding 22 countries; outward direct investment)"
            }
            Self::OthEuropeExcl32 => "Other Europe (excluding 32 countries)",
            Self::OthEuropeExcl7 => "Other Europe (excluding 7 countries)",
            Self::OthEuropeIst => "Other Europe (excluding 32 countries)",
            Self::OthMiddleEastExc3DiOutward => {
                "Middle East, other (excluding 3 countries; outward direct investment)"
            }
            Self::OthMiddleEastExc5DiInward => {
                "Middle East, other (excluding 5 countries; inward direct investment)"
            }
            Self::OthMiddleEastExcl5 => "Other Middle East (excluding 5 countries)",
            Self::OthMiddleEastIst => "Other Middle East (excluding 5 countries)",
            Self::OthSouthAmExcl7DiOutward => {
                "South America, other (excluding 7 countries; outward direct investment)"
            }
            Self::OthSouthAndCenAmExcl13 => {
                "Other South And Central America (excluding 13 countries)"
            }
            Self::OthSouthAndCenAmExcl4 => {
                "Other South and Central America (excluding 4 countries)"
            }
            Self::OthSouthAndCenAmExcl4DiInward => {
                "South and Central America, other (excluding 4 countries; inward direct investment)"
            }
            Self::OthSouthAndCenAmIst => "Other South and Central America (excluding 13 countries)",
            Self::OthWestHem => "Other Western Hemisphere",
            Self::OthWestHemOthExcl3 => "Other Western Hemisphere, Other (excluding 3 countries)",
            Self::OthWestHemOthExcl4DiInward => {
                "Other Western Hemisphere, other (excluding 4 countries; inward direct investment)"
            }
            Self::OthWestHemOthExcl4DiOutward => {
                "Other Western Hemisphere, other (excluding 4 countries; outward direct investment)"
            }
            Self::OthWestHemOthIst => "Other Western Hemisphere, Other (excluding 3 countries)",
            Self::Pakistan => "Pakistan",
            Self::Palau => "Palau",
            Self::Panama => "Panama",
            Self::PapuaNewGinea => "Papua New Ginea",
            Self::Paraguay => "Paraguay",
            Self::Peru => "Peru",
            Self::Philippines => "Philippines",
            Self::Plains => "Plains",
            Self::Poland => "Poland",
            Self::Portugal => "Portugal",
            Self::Qatar => "Qatar",
            Self::ResidualSeas => {
                "Residual between the seasonally adjusted total based on service type or commodity and the sum of the seasonally adjusted individual countries and the \"all other countries\" aggregate"
            }
            Self::RockyMountains => "Rocky Mountains",
            Self::Romania => "Romania",
            Self::Russia => "Russia",
            Self::Rwanda => "Rwanda",
            Self::Samoa => "Samoa",
            Self::SanMarino => "San Marino",
            Self::SaoTomePrincipe => "Sao Tome and Principe",
            Self::SaudiArabia => "Saudi Arabia",
            Self::Senegal => "Senegal",
            Self::Serbia => "Serbia",
            Self::Seychelles => "Seychelles",
            Self::SierraLeone => "Sierra Leone",
            Self::Singapore => "Singapore",
            Self::SintMaarten => "Sint Maarten",
            Self::Slovakia => "Slovakia",
            Self::Slovenia => "Slovenia",
            Self::SolomonIslands => "Solomon Islands",
            Self::Somalia => "Somalia",
            Self::SouthAfrica => "South Africa",
            Self::SouthAm => "South America",
            Self::SouthAndCenAm => "South and Central America",
            Self::SouthAndCenAmOthNsaDetail => {
                "South and Central America; other countries (those not listed in table 2.3)"
            }
            Self::Southeast => "Southeast",
            Self::SouthKorea => "South Korea",
            Self::SouthSudan => "South Sudan",
            Self::Southwest => "Southwest",
            Self::Spain => "Spain",
            Self::SriLanka => "Sri Lanka",
            Self::StKittsNevis => "St. Kitts and Nevis",
            Self::StLucia => "St. Lucia",
            Self::StPierreMiquelon => "St. Pierre and Miquelon",
            Self::StVincentGrenadines => "St. Vincent and the Grenadines",
            Self::Sudan => "Sudan",
            Self::Suriname => "Suriname",
            Self::Sweden => "Sweden",
            Self::Switzerland => "Switzerland",
            Self::Syria => "Syria",
            Self::Taiwan => "Taiwan",
            Self::Tajikistan => "Tajikistan",
            Self::Tanzania => "Tanzania",
            Self::Thailand => "Thailand",
            Self::TimorLeste => "Timor-Leste",
            Self::Togo => "Togo",
            Self::Tonga => "Tonga",
            Self::TrinidadTobago => "Trinidad and Tobago",
            Self::Tunisia => "Tunisia",
            Self::Turkey => "Turkey",
            Self::Turkmenistan => "Turkmenistan",
            Self::Tuvalu => "Tuvalu",
            Self::Uae => "United Arab Emirates",
            Self::Uganda => "Uganda",
            Self::UkIslandsCarib => "United Kingdom Islands, Caribbean",
            Self::Ukraine => "Ukraine",
            Self::UnitedKingdom => "United Kingdom",
            Self::UnitedKingdomIslandsAtlanticAfrica => "United Kingdom Islands, Atlantic (Africa)",
            Self::UnitedKingdomIslandsAtlanticOWH => "United Kingdom Islands, Atlantic (OWH)",
            Self::UnitedKingdomIslandsCaribbean => "United Kingdom Islands, Caribbean",
            Self::UnitedKingdomIslandsIndianOcean => "United Kingdom Islands, Indian Ocean",
            Self::UnitedKingdomIslandsPacific => "United Kingdom Islands, Pacific",
            Self::UnitedStates => "United States",
            Self::Uruguay => "Uruguay",
            Self::Uzbekistan => "Uzbekistan",
            Self::Vanuatu => "Vanuatu",
            Self::VaticanCity => "Vatican City",
            Self::Venezuela => "Venezuela",
            Self::Vietnam => "Vietnam",
            Self::WesternSahara => "Western Sahara",
            Self::Yemen => "Yemen",
            Self::Zambia => "Zambia",
            Self::Zimbabwe => "Zimbabwe",
        };
        desc.to_owned()
    }

    pub fn from_code(code: i64) -> Option<Self> {
        let aoc = match code {
            0 => Self::AllCountries,
            100 => Self::Canada,
            199 => Self::UnitedStates,
            200 => Self::Argentina,
            201 => Self::Bolivia,
            202 => Self::Brazil,
            203 => Self::Chile,
            204 => Self::Colombia,
            205 => Self::CostaRica,
            206 => Self::Cuba,
            207 => Self::DominicanRep,
            208 => Self::TimorLeste,
            209 => Self::ElSalvador,
            210 => Self::Guatemala,
            211 => Self::Haiti,
            212 => Self::Honduras,
            213 => Self::Mexico,
            214 => Self::Nicaragua,
            215 => Self::Panama,
            216 => Self::Paraguay,
            217 => Self::Peru,
            218 => Self::Uruguay,
            219 => Self::Venezuela,
            250 => Self::Bahamas,
            251 => Self::Barbados,
            252 => Self::Bermuda,
            254 => Self::Belize,
            255 => Self::FrenchIslandsCaribbean,
            256 => Self::FrenchGuiana,
            257 => Self::Guyana,
            258 => Self::Jamaica,
            259 => Self::NetherlandsAntilles,
            260 => Self::Suriname,
            261 => Self::TrinidadTobago,
            263 => Self::StPierreMiquelon,
            265 => Self::Grenada,
            266 => Self::UnitedKingdomIslandsCaribbean,
            267 => Self::StKittsNevis,
            268 => Self::UnitedKingdomIslandsAtlanticOWH,
            269 => Self::Dominica,
            270 => Self::StLucia,
            271 => Self::StVincentGrenadines,
            272 => Self::Anguilla,
            273 => Self::AntiguaBarbuda,
            274 => Self::Aruba,
            275 => Self::Curacao,
            276 => Self::SintMaarten,
            277 => Self::NetherlandsIslandsCaribbean,
            296 => Self::SouthAndCenAm,
            297 => Self::CentralAmerica,
            298 => Self::OthWestHem,
            299 => Self::LatAmAndOthWestHem,
            300 => Self::Andorra,
            301 => Self::Austria,
            302 => Self::Belgium,
            304 => Self::Cyprus,
            305 => Self::Denmark,
            306 => Self::Finland,
            307 => Self::France,
            308 => Self::Germany,
            309 => Self::Gibraltar,
            310 => Self::Greece,
            311 => Self::Greenland,
            312 => Self::Iceland,
            313 => Self::Ireland,
            314 => Self::Italy,
            315 => Self::Liechtenstein,
            316 => Self::Luxembourg,
            317 => Self::Malta,
            318 => Self::Monaco,
            319 => Self::Netherlands,
            320 => Self::Norway,
            321 => Self::Portugal,
            322 => Self::SanMarino,
            323 => Self::Spain,
            324 => Self::Sweden,
            325 => Self::Switzerland,
            326 => Self::Turkey,
            327 => Self::UnitedKingdom,
            330 => Self::VaticanCity,
            331 => Self::Estonia,
            332 => Self::Latvia,
            333 => Self::Lithuania,
            334 => Self::Armenia,
            335 => Self::Azerbaijan,
            336 => Self::Belarus,
            337 => Self::Georgia,
            338 => Self::Kazakhstan,
            339 => Self::Kyrgyzstan,
            340 => Self::Moldova,
            341 => Self::Russia,
            342 => Self::Tajikistan,
            343 => Self::Turkmenistan,
            344 => Self::Ukraine,
            345 => Self::Uzbekistan,
            350 => Self::Albania,
            351 => Self::Bulgaria,
            354 => Self::Hungary,
            355 => Self::Poland,
            356 => Self::Romania,
            358 => Self::BosniaHerzegovina,
            359 => Self::Croatia,
            360 => Self::NorthMacedonia,
            361 => Self::Montenegro,
            362 => Self::Serbia,
            363 => Self::Slovenia,
            364 => Self::CzechRep,
            365 => Self::Slovakia,
            366 => Self::Kosovo,
            391 => Self::EasternEurope,
            398 => Self::EU,
            399 => Self::Europe,
            400 => Self::Algeria,
            401 => Self::Angola,
            402 => Self::Botswana,
            403 => Self::Burundi,
            404 => Self::Cameroon,
            405 => Self::CentralAfricanRepublic,
            406 => Self::Chad,
            407 => Self::CongoBrazzaville,
            408 => Self::CongoKinshasa,
            409 => Self::Benin,
            410 => Self::Egypt,
            411 => Self::Ethiopia,
            412 => Self::Djibouti,
            413 => Self::Gabon,
            414 => Self::Gambia,
            415 => Self::Ghana,
            416 => Self::Guinea,
            417 => Self::CoteDIvoire,
            418 => Self::Kenya,
            419 => Self::Lesotho,
            420 => Self::Liberia,
            421 => Self::Libya,
            422 => Self::Madagascar,
            423 => Self::Malawi,
            424 => Self::Mali,
            425 => Self::Mauritania,
            426 => Self::Morocco,
            427 => Self::Mozambique,
            428 => Self::Niger,
            429 => Self::Nigeria,
            430 => Self::GuineaBissau,
            431 => Self::Zimbabwe,
            432 => Self::Rwanda,
            433 => Self::Senegal,
            434 => Self::SierraLeone,
            435 => Self::Somalia,
            436 => Self::SouthAfrica,
            437 => Self::Namibia,
            438 => Self::EquatorialGuinea,
            440 => Self::WesternSahara,
            441 => Self::Sudan,
            442 => Self::Eswatini,
            443 => Self::Tanzania,
            444 => Self::Togo,
            445 => Self::Tunisia,
            446 => Self::Uganda,
            447 => Self::BurkinaFaso,
            448 => Self::Zambia,
            450 => Self::CaboVerde,
            451 => Self::SaoTomePrincipe,
            453 => Self::Mauritius,
            454 => Self::Seychelles,
            455 => Self::UnitedKingdomIslandsAtlanticAfrica,
            456 => Self::Comoros,
            457 => Self::Eritrea,
            458 => Self::SouthSudan,
            499 => Self::Africa,
            501 => Self::Bahrain,
            502 => Self::Iran,
            503 => Self::Iraq,
            504 => Self::Israel,
            505 => Self::Jordan,
            506 => Self::Kuwait,
            507 => Self::Lebanon,
            508 => Self::Oman,
            510 => Self::Qatar,
            511 => Self::SaudiArabia,
            512 => Self::Syria,
            513 => Self::Uae,
            514 => Self::Yemen,
            599 => Self::MiddleEast,
            600 => Self::Afghanistan,
            601 => Self::Australia,
            602 => Self::Bhutan,
            603 => Self::Brunei,
            604 => Self::UnitedKingdomIslandsPacific,
            605 => Self::UnitedKingdomIslandsIndianOcean,
            606 => Self::Burma,
            607 => Self::Cambodia,
            608 => Self::SriLanka,
            609 => Self::FrenchIslandsIndianOcean,
            610 => Self::FrenchIslandsPacific,
            611 => Self::HongKong,
            612 => Self::India,
            613 => Self::Indonesia,
            614 => Self::Japan,
            615 => Self::Laos,
            616 => Self::Macau,
            617 => Self::Malaysia,
            618 => Self::Nepal,
            619 => Self::PapuaNewGinea,
            620 => Self::NewZealand,
            622 => Self::Pakistan,
            623 => Self::Philippines,
            625 => Self::Singapore,
            626 => Self::SouthKorea,
            628 => Self::Taiwan,
            629 => Self::Thailand,
            631 => Self::Bangladesh,
            632 => Self::Fiji,
            633 => Self::Maldives,
            635 => Self::Nauru,
            636 => Self::Vanuatu,
            637 => Self::Samoa,
            638 => Self::Tonga,
            650 => Self::China,
            651 => Self::Mongolia,
            652 => Self::NorthKorea,
            653 => Self::Vietnam,
            654 => Self::SolomonIslands,
            655 => Self::Kiribati,
            656 => Self::Tuvalu,
            657 => Self::Micronesia,
            658 => Self::MarshallIslands,
            659 => Self::Palau,
            660 => Self::EastTimor,
            661 => Self::CookIslands,
            662 => Self::Niue,
            698 => Self::OtherAsiaPacific,
            699 => Self::AsiaAndPac,
            899 => Self::OPEC,
            _ => return None,
        };
        Some(aoc)
    }
}
