Package org.javacord.api.entity
Enum Region
- java.lang.Object
-
- java.lang.Enum<Region>
-
- org.javacord.api.entity.Region
-
- All Implemented Interfaces:
Serializable,Comparable<Region>,Formattable,Nameable
public enum Region extends Enum<Region> implements Nameable
This enum represents a valid region for a server.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AMSTERDAMBRAZILEU_CENTRALEU_WESTFRANKFURTHONG_KONGJAPANLONDONRUSSIASINGAPORESYDNEYUNKNOWNAn unknown region, most likely because discord added new regions.US_CENTRALUS_EASTUS_SOUTHUS_WESTVIP_AMSTERDAMVIP_BRAZILVIP_EU_CENTRALVIP_EU_WESTVIP_FRANKFURTVIP_LONDONVIP_SINGAPOREVIP_SYDNEYVIP_US_CENTRALVIP_US_EASTVIP_US_SOUTHVIP_US_WEST
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetKey()Gets the key of the region which is used for REST-request.StringgetName()Gets the name of the region (which looks nicer than the key :-) ).static RegiongetRegionByKey(String key)Gets a region by its key.booleanisVip()Checks if the region of is for VIPs only.static RegionvalueOf(String name)Returns the enum constant of this type with the specified name.static Region[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AMSTERDAM
public static final Region AMSTERDAM
-
BRAZIL
public static final Region BRAZIL
-
EU_WEST
public static final Region EU_WEST
-
EU_CENTRAL
public static final Region EU_CENTRAL
-
FRANKFURT
public static final Region FRANKFURT
-
HONG_KONG
public static final Region HONG_KONG
-
JAPAN
public static final Region JAPAN
-
LONDON
public static final Region LONDON
-
RUSSIA
public static final Region RUSSIA
-
SINGAPORE
public static final Region SINGAPORE
-
SYDNEY
public static final Region SYDNEY
-
US_EAST
public static final Region US_EAST
-
US_WEST
public static final Region US_WEST
-
US_CENTRAL
public static final Region US_CENTRAL
-
US_SOUTH
public static final Region US_SOUTH
-
VIP_AMSTERDAM
public static final Region VIP_AMSTERDAM
-
VIP_BRAZIL
public static final Region VIP_BRAZIL
-
VIP_EU_WEST
public static final Region VIP_EU_WEST
-
VIP_EU_CENTRAL
public static final Region VIP_EU_CENTRAL
-
VIP_FRANKFURT
public static final Region VIP_FRANKFURT
-
VIP_LONDON
public static final Region VIP_LONDON
-
VIP_SINGAPORE
public static final Region VIP_SINGAPORE
-
VIP_SYDNEY
public static final Region VIP_SYDNEY
-
VIP_US_EAST
public static final Region VIP_US_EAST
-
VIP_US_WEST
public static final Region VIP_US_WEST
-
VIP_US_CENTRAL
public static final Region VIP_US_CENTRAL
-
VIP_US_SOUTH
public static final Region VIP_US_SOUTH
-
UNKNOWN
public static final Region UNKNOWN
An unknown region, most likely because discord added new regions.
-
-
Method Detail
-
values
public static Region[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Region c : Region.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Region valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getKey
public String getKey()
Gets the key of the region which is used for REST-request.- Returns:
- The key of the region.
-
getName
public String getName()
Gets the name of the region (which looks nicer than the key :-) ).
-
isVip
public boolean isVip()
Checks if the region of is for VIPs only.- Returns:
- Whether the region of is for VIPs only or not.
-
-