public final class Region extends Object implements DiscordObject
Constructor and Description |
---|
Region(ServiceMediator serviceMediator,
RegionBean data)
Constructs a
Region with an associated ServiceMediator and Discord data. |
Modifier and Type | Method and Description |
---|---|
DiscordClient |
getClient()
Gets the DiscordClient associated to this object.
|
String |
getId()
Gets the unique ID for the region.
|
String |
getName()
Gets the name of the region.
|
String |
getSampleHostname()
Gets an example hostname for the region.
|
int |
getSamplePort()
Gets an example port for the region.
|
boolean |
isCustom()
Gets if this is a custom voice region.
|
boolean |
isDeprecated()
Gets if this is a deprecated voice region.
|
boolean |
isOptimal()
Gets if the region is closest to the current user's serviceMediator.
|
boolean |
isVip()
Gets if this is a VIP region.
|
String |
toString() |
public Region(ServiceMediator serviceMediator, RegionBean data)
Region
with an associated ServiceMediator and Discord data.serviceMediator
- The ServiceMediator associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.public DiscordClient getClient()
DiscordObject
getClient
in interface DiscordObject
public String getId()
public String getName()
public String getSampleHostname()
public int getSamplePort()
public boolean isVip()
true
if this is a VIP region, false
otherwise.public boolean isOptimal()
true
if the region is closest to the current user's serviceMediator, false
otherwise.public boolean isDeprecated()
true
if this is a deprecated voice region, false
otherwise.public boolean isCustom()
true
if this is a custom voice region, false
otherwise.