Enum Class MetroCode
- All Implemented Interfaces:
APIParam, Serializable, Comparable<MetroCode>, Constable
Well-known Equinix metro codes.
UNKNOWN is a forward-compatibility sentinel: a metro the API returns that this enum
does not yet list deserializes to UNKNOWN rather than failing the response (see
MetroCodeDeserializer). The authoritative, always-current set of metros is the Metros
API (fabric.metros()); this enum is a convenience for the well-known ones.
- Author:
- ianjones
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic MetroCodeResolves a wire metro code to its enum constant, falling back toUNKNOWNfor a code this enum does not list (so callers always get a non-null value).Resolves a wire metro code (e.g.static MetroCodeReturns the enum constant of this class with the specified name.static MetroCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface APIParam
paramValueModifier and TypeMethodDescriptiondefault StringThe value exactly as it must appear on the wire in a query or path parameter.
-
Enum Constant Details
-
AM
-
AT
-
BA
-
BG
-
BL
-
BO
-
BX
-
CA
-
CH
-
CL
-
CN
-
CU
-
DA
-
DB
-
DC
-
DE
-
DX
-
ED
-
FR
-
GV
-
HE
-
HH
-
HK
-
HO
-
IL
-
JH
-
JK
-
JN
-
KA
-
KL
-
LA
-
LD
-
LM
-
LS
-
MA
-
MB
-
MD
-
ME
-
MI
-
ML
-
MN
-
MO
-
MT
-
MU
-
MX
-
NY
-
OS
-
OT
-
PA
-
PE
-
PH
-
RJ
-
SE
-
SG
-
SJ
-
SK
-
SL
-
SO
-
SP
-
ST
-
SV
-
SY
-
TR
-
TY
-
VA
-
WA
-
WI
-
ZH
-
ZW
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
lookup
Resolves a wire metro code (e.g."SV") to its enum constant, if this enum lists it. The lookup is case-insensitive and trims surrounding whitespace. TheUNKNOWNsentinel is never returned as a match - a code that does not name a known metro yieldsOptional.empty().- Parameters:
code- the metro code as returned by the API- Returns:
- the matching
MetroCode, or empty ifcodeis null/blank or not a known metro
-
fromCode
Resolves a wire metro code to its enum constant, falling back toUNKNOWNfor a code this enum does not list (so callers always get a non-null value). Uselookup(String)when you need to distinguish "unknown" from a real metro.
-