Table of Contents

Struct Country

Namespace
DatabentoDotNet.Reference
Assembly
DatabentoDotNet.Reference.dll

A country code — ISO 3166-1 alpha-2, with unofficial extensions Databento adds.

[JsonConverter(typeof(ReferenceCodeJsonConverter<Country>))]
public readonly record struct Country : IReferenceCode<Country>, IEquatable<Country>
Implements
Inherited Members

Remarks

An open set: a code this library does not know is carried, not lost. Upstream ends this enum in an Unknown(String) variant (enums.rs:137) so a code Databento adds next month round-trips untouched, and a C# enum cannot hold a payload. See IReferenceCode<TSelf> for the shape this takes instead and why.

The members come from the CNTRY group of the vendored corporate_actions.list_enums response, which is the oracle rather than a count typed into an issue.

ZZ is one of the extensions and means Unclassified; it is a known code, not the absence of one.

Constructors

Country(string)

Wraps a wire code, known or not. Prefer a named member such as Aa where one exists, and From(string?) where the value came from the server.

public Country(string code)

Parameters

code string

The wire code.

Exceptions

ArgumentException

code is null or empty. A blank code is the absence of a value, which is default.

Properties

Aa

Supranational (AA).

public static Country Aa { get; }

Property Value

Country

Ad

Andorra (AD).

public static Country Ad { get; }

Property Value

Country

Ae

United Arab Emirates (AE).

public static Country Ae { get; }

Property Value

Country

Af

Afghanistan (AF).

public static Country Af { get; }

Property Value

Country

Ag

Antigua and Barbuda (AG).

public static Country Ag { get; }

Property Value

Country

Ai

Anguilla (AI).

public static Country Ai { get; }

Property Value

Country

Al

Albania (AL).

public static Country Al { get; }

Property Value

Country

Am

Armenia (AM).

public static Country Am { get; }

Property Value

Country

Ao

Angola (AO).

public static Country Ao { get; }

Property Value

Country

Ar

Argentina (AR).

public static Country Ar { get; }

Property Value

Country

As

American Samoa (AS).

public static Country As { get; }

Property Value

Country

At

Austria (AT).

public static Country At { get; }

Property Value

Country

Au

Australia (AU).

public static Country Au { get; }

Property Value

Country

Aw

Aruba (AW).

public static Country Aw { get; }

Property Value

Country

Az

Azerbaijan (AZ).

public static Country Az { get; }

Property Value

Country

Ba

Bosnia and Herzegovina (BA).

public static Country Ba { get; }

Property Value

Country

Bb

Barbados (BB).

public static Country Bb { get; }

Property Value

Country

Bd

Bangladesh (BD).

public static Country Bd { get; }

Property Value

Country

Be

Belgium (BE).

public static Country Be { get; }

Property Value

Country

Bf

Burkina Faso (BF).

public static Country Bf { get; }

Property Value

Country

Bg

Bulgaria (BG).

public static Country Bg { get; }

Property Value

Country

Bh

Bahrain (BH).

public static Country Bh { get; }

Property Value

Country

Bi

Burundi (BI).

public static Country Bi { get; }

Property Value

Country

Bj

Benin (BJ).

public static Country Bj { get; }

Property Value

Country

Bm

Bermuda (BM).

public static Country Bm { get; }

Property Value

Country

Bn

Brunei Darussalam (BN).

public static Country Bn { get; }

Property Value

Country

Bo

Bolivia (BO).

public static Country Bo { get; }

Property Value

Country

Br

Brazil (BR).

public static Country Br { get; }

Property Value

Country

Bs

Bahamas (BS).

public static Country Bs { get; }

Property Value

Country

Bt

Bhutan (BT).

public static Country Bt { get; }

Property Value

Country

Bv

Bouvet Island (BV).

public static Country Bv { get; }

Property Value

Country

Bw

Botswana (BW).

public static Country Bw { get; }

Property Value

Country

By

Belarus (BY).

public static Country By { get; }

Property Value

Country

Bz

Belize (BZ).

public static Country Bz { get; }

Property Value

Country

Ca

Canada (CA).

public static Country Ca { get; }

Property Value

Country

Cc

Cocos Islands (CC).

public static Country Cc { get; }

Property Value

Country

Cd

Congo Democratic Republic (CD).

public static Country Cd { get; }

Property Value

Country

Cf

Central African Republic (CF).

public static Country Cf { get; }

Property Value

Country

Cg

Congo (CG).

public static Country Cg { get; }

Property Value

Country

Ch

Switzerland (CH).

public static Country Ch { get; }

Property Value

Country

Ci

Ivory Coast (CI).

public static Country Ci { get; }

Property Value

Country

Ck

Cook Islands (CK).

public static Country Ck { get; }

Property Value

Country

Cl

Chile (CL).

public static Country Cl { get; }

Property Value

Country

Cm

Cameroon (CM).

public static Country Cm { get; }

Property Value

Country

Cn

China (CN).

public static Country Cn { get; }

Property Value

Country

Co

Colombia (CO).

public static Country Co { get; }

Property Value

Country

Code

The wire code, or null when this names no value.

public string? Code { get; }

Property Value

string

Cr

Costa Rica (CR).

public static Country Cr { get; }

Property Value

Country

Cu

Cuba (CU).

public static Country Cu { get; }

Property Value

Country

Cv

Cape Verde (CV).

public static Country Cv { get; }

Property Value

Country

Cw

Curaçao (CW).

public static Country Cw { get; }

Property Value

Country

Cx

Christmas Islands (CX).

public static Country Cx { get; }

Property Value

Country

Cy

Cyprus (CY).

public static Country Cy { get; }

Property Value

Country

Cz

Czech Republic (CZ).

public static Country Cz { get; }

Property Value

Country

De

Germany (DE).

public static Country De { get; }

Property Value

Country

Dj

Djibouti (DJ).

public static Country Dj { get; }

Property Value

Country

Dk

Denmark (DK).

public static Country Dk { get; }

Property Value

Country

Dm

Dominica (DM).

public static Country Dm { get; }

Property Value

Country

Do

Dominican Republic (DO).

public static Country Do { get; }

Property Value

Country

Dz

Algeria (DZ).

public static Country Dz { get; }

Property Value

Country

Ec

Ecuador (EC).

public static Country Ec { get; }

Property Value

Country

Ee

Estonia (EE).

public static Country Ee { get; }

Property Value

Country

Eg

Egypt (EG).

public static Country Eg { get; }

Property Value

Country

Eh

Western Sahara (EH).

public static Country Eh { get; }

Property Value

Country

Es

Spain (ES).

public static Country Es { get; }

Property Value

Country

Et

Ethiopia (ET).

public static Country Et { get; }

Property Value

Country

Eu

Europe (EU).

public static Country Eu { get; }

Property Value

Country

Fi

Finland (FI).

public static Country Fi { get; }

Property Value

Country

Fj

Fiji (FJ).

public static Country Fj { get; }

Property Value

Country

Fk

Falkland Islands (FK).

public static Country Fk { get; }

Property Value

Country

Fm

Micronesia (FM).

public static Country Fm { get; }

Property Value

Country

Fo

Faroe Islands (FO).

public static Country Fo { get; }

Property Value

Country

Fr

France (FR).

public static Country Fr { get; }

Property Value

Country

Ga

Gabon (GA).

public static Country Ga { get; }

Property Value

Country

Gb

United Kingdom (GB).

public static Country Gb { get; }

Property Value

Country

Gd

Grenada (GD).

public static Country Gd { get; }

Property Value

Country

Ge

Georgia (GE).

public static Country Ge { get; }

Property Value

Country

Gf

French Guyana (GF).

public static Country Gf { get; }

Property Value

Country

Gg

Guernsey (GG).

public static Country Gg { get; }

Property Value

Country

Gh

Ghana (GH).

public static Country Gh { get; }

Property Value

Country

Gi

Gibraltar (GI).

public static Country Gi { get; }

Property Value

Country

Gl

Greenland (GL).

public static Country Gl { get; }

Property Value

Country

Gm

Gambia (GM).

public static Country Gm { get; }

Property Value

Country

Gn

Guinea (GN).

public static Country Gn { get; }

Property Value

Country

Gp

Guadeloupe (GP).

public static Country Gp { get; }

Property Value

Country

Gq

Equatorial Guinea (GQ).

public static Country Gq { get; }

Property Value

Country

Gr

Greece (GR).

public static Country Gr { get; }

Property Value

Country

Gt

Guatemala (GT).

public static Country Gt { get; }

Property Value

Country

Gu

Guam (GU).

public static Country Gu { get; }

Property Value

Country

Gw

Guinea-Bissau (GW).

public static Country Gw { get; }

Property Value

Country

Gy

Guyana (GY).

public static Country Gy { get; }

Property Value

Country

HasValue

true when this names a code — known or not.

public bool HasValue { get; }

Property Value

bool

Hk

Hong Kong (HK).

public static Country Hk { get; }

Property Value

Country

Hm

Heard Island & McDonald Island (HM).

public static Country Hm { get; }

Property Value

Country

Hn

Honduras (HN).

public static Country Hn { get; }

Property Value

Country

Hr

Croatia (HR).

public static Country Hr { get; }

Property Value

Country

Ht

Haiti (HT).

public static Country Ht { get; }

Property Value

Country

Hu

Hungary (HU).

public static Country Hu { get; }

Property Value

Country

Id

Indonesia (ID).

public static Country Id { get; }

Property Value

Country

Ie

Ireland (IE).

public static Country Ie { get; }

Property Value

Country

Il

Israel (IL).

public static Country Il { get; }

Property Value

Country

Im

Isle of Man (IM).

public static Country Im { get; }

Property Value

Country

In

India (IN).

public static Country In { get; }

Property Value

Country

Io

British Indian Ocean territory (IO).

public static Country Io { get; }

Property Value

Country

Iq

Iraq (IQ).

public static Country Iq { get; }

Property Value

Country

Ir

Iran (IR).

public static Country Ir { get; }

Property Value

Country

Is

Iceland (IS).

public static Country Is { get; }

Property Value

Country

IsKnown

true when Code is one of KnownCodes.

public bool IsKnown { get; }

Property Value

bool

Remarks

false is not an error. It means the server sent something newer than the table this library shipped with, and the code is still in Code to be read, logged, or sent back in a filter.

It

Italy (IT).

public static Country It { get; }

Property Value

Country

Je

Jersey (JE).

public static Country Je { get; }

Property Value

Country

Jm

Jamaica (JM).

public static Country Jm { get; }

Property Value

Country

Jo

Jordan (JO).

public static Country Jo { get; }

Property Value

Country

Jp

Japan (JP).

public static Country Jp { get; }

Property Value

Country

Ke

Kenya (KE).

public static Country Ke { get; }

Property Value

Country

Kg

Kyrgyz Republic (KG).

public static Country Kg { get; }

Property Value

Country

Kh

Cambodia (KH).

public static Country Kh { get; }

Property Value

Country

Ki

Kiribati (KI).

public static Country Ki { get; }

Property Value

Country

Km

Comoros (KM).

public static Country Km { get; }

Property Value

Country

Kn

St. Kitts & Nevis (KN).

public static Country Kn { get; }

Property Value

Country

KnownCodes

Every code the reference API reported for this type when the fixture was captured — 246 of them.

public static IReadOnlySet<string> KnownCodes { get; }

Property Value

IReadOnlySet<string>

Kp

Korea (North) (KP).

public static Country Kp { get; }

Property Value

Country

Kr

Korea (South) (KR).

public static Country Kr { get; }

Property Value

Country

Kw

Kuwait (KW).

public static Country Kw { get; }

Property Value

Country

Ky

Cayman Islands (KY).

public static Country Ky { get; }

Property Value

Country

Kz

Kazakhstan (KZ).

public static Country Kz { get; }

Property Value

Country

La

Laos (LA).

public static Country La { get; }

Property Value

Country

Lb

Lebanon (LB).

public static Country Lb { get; }

Property Value

Country

Lc

St. Lucia (LC).

public static Country Lc { get; }

Property Value

Country

Li

Liechtenstein (LI).

public static Country Li { get; }

Property Value

Country

Lk

Sri Lanka (LK).

public static Country Lk { get; }

Property Value

Country

Lr

Liberia (LR).

public static Country Lr { get; }

Property Value

Country

Ls

Lesotho (LS).

public static Country Ls { get; }

Property Value

Country

Lt

Lithuania (LT).

public static Country Lt { get; }

Property Value

Country

Lu

Luxembourg (LU).

public static Country Lu { get; }

Property Value

Country

Lv

Latvia (LV).

public static Country Lv { get; }

Property Value

Country

Ly

Libya (LY).

public static Country Ly { get; }

Property Value

Country

Ma

Morocco (MA).

public static Country Ma { get; }

Property Value

Country

Mc

Monaco (MC).

public static Country Mc { get; }

Property Value

Country

Md

Moldova (MD).

public static Country Md { get; }

Property Value

Country

Me

Montenegro (ME).

public static Country Me { get; }

Property Value

Country

Mg

Madagascar (MG).

public static Country Mg { get; }

Property Value

Country

Mh

Marshall Islands (MH).

public static Country Mh { get; }

Property Value

Country

Mk

North Macedonia (MK).

public static Country Mk { get; }

Property Value

Country

Ml

Mali (ML).

public static Country Ml { get; }

Property Value

Country

Mm

Myanmar (MM).

public static Country Mm { get; }

Property Value

Country

Mn

Mongolia (MN).

public static Country Mn { get; }

Property Value

Country

Mo

Macao (MO).

public static Country Mo { get; }

Property Value

Country

Mp

Northern Mariana Islands (MP).

public static Country Mp { get; }

Property Value

Country

Mq

Martinique (MQ).

public static Country Mq { get; }

Property Value

Country

Mr

Mauritania (MR).

public static Country Mr { get; }

Property Value

Country

Ms

Montserrat (MS).

public static Country Ms { get; }

Property Value

Country

Mt

Malta (MT).

public static Country Mt { get; }

Property Value

Country

Mu

Mauritius (MU).

public static Country Mu { get; }

Property Value

Country

Mv

Maldives (MV).

public static Country Mv { get; }

Property Value

Country

Mw

Malawi (MW).

public static Country Mw { get; }

Property Value

Country

Mx

Mexico (MX).

public static Country Mx { get; }

Property Value

Country

My

Malaysia (MY).

public static Country My { get; }

Property Value

Country

Mz

Mozambique (MZ).

public static Country Mz { get; }

Property Value

Country

Na

Namibia (NA).

public static Country Na { get; }

Property Value

Country

Nc

New Caledonia (NC).

public static Country Nc { get; }

Property Value

Country

Ne

Niger (NE).

public static Country Ne { get; }

Property Value

Country

Nf

Norfolk Island (NF).

public static Country Nf { get; }

Property Value

Country

Ng

Nigeria (NG).

public static Country Ng { get; }

Property Value

Country

Ni

Nicaragua (NI).

public static Country Ni { get; }

Property Value

Country

Nl

Netherlands (NL).

public static Country Nl { get; }

Property Value

Country

No

Norway (NO).

public static Country No { get; }

Property Value

Country

Np

Nepal (NP).

public static Country Np { get; }

Property Value

Country

Nr

Nauru (NR).

public static Country Nr { get; }

Property Value

Country

Nu

Niue (NU).

public static Country Nu { get; }

Property Value

Country

Nz

New Zealand (NZ).

public static Country Nz { get; }

Property Value

Country

Om

Oman (OM).

public static Country Om { get; }

Property Value

Country

Pa

Panama (PA).

public static Country Pa { get; }

Property Value

Country

Pe

Peru (PE).

public static Country Pe { get; }

Property Value

Country

Pf

French Polynesia (PF).

public static Country Pf { get; }

Property Value

Country

Pg

Papua New Guinea (PG).

public static Country Pg { get; }

Property Value

Country

Ph

Philippines (PH).

public static Country Ph { get; }

Property Value

Country

Pk

Pakistan (PK).

public static Country Pk { get; }

Property Value

Country

Pl

Poland (PL).

public static Country Pl { get; }

Property Value

Country

Pm

St. Pierre and Miquelon (PM).

public static Country Pm { get; }

Property Value

Country

Pn

Pitcairn (PN).

public static Country Pn { get; }

Property Value

Country

Pr

Puerto Rico (PR).

public static Country Pr { get; }

Property Value

Country

Ps

Palestine (PS).

public static Country Ps { get; }

Property Value

Country

Pt

Portugal (PT).

public static Country Pt { get; }

Property Value

Country

Pw

Palau (PW).

public static Country Pw { get; }

Property Value

Country

Py

Paraguay (PY).

public static Country Py { get; }

Property Value

Country

Qa

Qatar (QA).

public static Country Qa { get; }

Property Value

Country

Re

Reunion (RE).

public static Country Re { get; }

Property Value

Country

Ro

Romania (RO).

public static Country Ro { get; }

Property Value

Country

Rs

Serbia (RS).

public static Country Rs { get; }

Property Value

Country

Ru

Russia (RU).

public static Country Ru { get; }

Property Value

Country

Rw

Rwanda (RW).

public static Country Rw { get; }

Property Value

Country

Sa

Saudi Arabia (SA).

public static Country Sa { get; }

Property Value

Country

Sb

Solomon Islands (SB).

public static Country Sb { get; }

Property Value

Country

Sc

Seychelles (SC).

public static Country Sc { get; }

Property Value

Country

Sd

Sudan (SD).

public static Country Sd { get; }

Property Value

Country

Se

Sweden (SE).

public static Country Se { get; }

Property Value

Country

Sg

Singapore (SG).

public static Country Sg { get; }

Property Value

Country

Sh

St. Helena (SH).

public static Country Sh { get; }

Property Value

Country

Si

Slovenia (SI).

public static Country Si { get; }

Property Value

Country

Sj

Svalbard and Jan Mayen (SJ).

public static Country Sj { get; }

Property Value

Country

Sk

Slovak Republic (SK).

public static Country Sk { get; }

Property Value

Country

Sl

Sierra Leone (SL).

public static Country Sl { get; }

Property Value

Country

Sm

San Marino (SM).

public static Country Sm { get; }

Property Value

Country

Sn

Senegal (SN).

public static Country Sn { get; }

Property Value

Country

So

Somalia (SO).

public static Country So { get; }

Property Value

Country

Sr

Suriname (SR).

public static Country Sr { get; }

Property Value

Country

St

Sao Tome and Principe (ST).

public static Country St { get; }

Property Value

Country

Sv

El Salvador (SV).

public static Country Sv { get; }

Property Value

Country

Sy

Syria (SY).

public static Country Sy { get; }

Property Value

Country

Sz

Eswatini (SZ).

public static Country Sz { get; }

Property Value

Country

Tc

Turks and Caicos Islands (TC).

public static Country Tc { get; }

Property Value

Country

Td

Chad (TD).

public static Country Td { get; }

Property Value

Country

Tf

French Southern Territories (TF).

public static Country Tf { get; }

Property Value

Country

Tg

Togo (TG).

public static Country Tg { get; }

Property Value

Country

Th

Thailand (TH).

public static Country Th { get; }

Property Value

Country

Tj

Tajikistan (TJ).

public static Country Tj { get; }

Property Value

Country

Tk

Tokelau (TK).

public static Country Tk { get; }

Property Value

Country

Tm

Turkmenistan (TM).

public static Country Tm { get; }

Property Value

Country

Tn

Tunisia (TN).

public static Country Tn { get; }

Property Value

Country

To

Tonga (TO).

public static Country To { get; }

Property Value

Country

Tp

East Timor (TP).

public static Country Tp { get; }

Property Value

Country

Tr

Turkiye (TR).

public static Country Tr { get; }

Property Value

Country

Tt

Trinidad and Tobago (TT).

public static Country Tt { get; }

Property Value

Country

Tv

Tuvalu (TV).

public static Country Tv { get; }

Property Value

Country

Tw

Taiwan (TW).

public static Country Tw { get; }

Property Value

Country

Tz

Tanzania (TZ).

public static Country Tz { get; }

Property Value

Country

Ua

Ukraine (UA).

public static Country Ua { get; }

Property Value

Country

Ug

Uganda (UG).

public static Country Ug { get; }

Property Value

Country

Um

United States Minor Outlying (UM).

public static Country Um { get; }

Property Value

Country

Us

United States of America (US).

public static Country Us { get; }

Property Value

Country

Uy

Uruguay (UY).

public static Country Uy { get; }

Property Value

Country

Uz

Uzbekistan (UZ).

public static Country Uz { get; }

Property Value

Country

Va

Vatican City (VA).

public static Country Va { get; }

Property Value

Country

Vc

St. Vincent & the Grenadines (VC).

public static Country Vc { get; }

Property Value

Country

Ve

Venezuela (VE).

public static Country Ve { get; }

Property Value

Country

Vg

Virgin Islands (UK) (VG).

public static Country Vg { get; }

Property Value

Country

Vi

Virgin Islands (US) (VI).

public static Country Vi { get; }

Property Value

Country

Vn

Vietnam (VN).

public static Country Vn { get; }

Property Value

Country

Vu

Vanuatu (VU).

public static Country Vu { get; }

Property Value

Country

Wf

Wallis & Futuna Islands (WF).

public static Country Wf { get; }

Property Value

Country

Ws

Samoa (WS).

public static Country Ws { get; }

Property Value

Country

Xg

Shanghai SC (XG).

public static Country Xg { get; }

Property Value

Country

Xh

Hong Kong SC (XH).

public static Country Xh { get; }

Property Value

Country

Xz

Shenzhen SC (XZ).

public static Country Xz { get; }

Property Value

Country

Ye

Yemen (YE).

public static Country Ye { get; }

Property Value

Country

Yt

Mayotte (YT).

public static Country Yt { get; }

Property Value

Country

Za

South Africa (ZA).

public static Country Za { get; }

Property Value

Country

Zm

Zambia (ZM).

public static Country Zm { get; }

Property Value

Country

Zw

Zimbabwe (ZW).

public static Country Zw { get; }

Property Value

Country

Zz

Unclassified (ZZ).

public static Country Zz { get; }

Property Value

Country

Methods

From(string?)

Reads a wire code, mapping null and the empty string to default — the absence of a value.

public static Country From(string? code)

Parameters

code string

The wire code, or null.

Returns

Country

The value.

ToString()

The wire code, or the empty string when this names no value.

public override string ToString()

Returns

string

The wire code.