Package net.dv8tion.jda.api.entities
Enum StageInstance.PrivacyLevel
- java.lang.Object
-
- java.lang.Enum<StageInstance.PrivacyLevel>
-
- net.dv8tion.jda.api.entities.StageInstance.PrivacyLevel
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<StageInstance.PrivacyLevel>
- Enclosing interface:
- StageInstance
public static enum StageInstance.PrivacyLevel extends java.lang.Enum<StageInstance.PrivacyLevel>
The privacy level for a stage instance.This indicates from where people can join the stage instance.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GUILD_ONLY
This stage instance can only be accessed by guild membersPUBLIC
This stage instance can be accessed by lurkers, meaning users that are not active members of the guildUNKNOWN
Placeholder for future privacy levels, indicates that this version of JDA does not support this privacy level yet
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StageInstance.PrivacyLevel
fromKey(int key)
Converts the raw API key into the respective enum valueint
getKey()
The raw API key for this privacy levelstatic StageInstance.PrivacyLevel
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static StageInstance.PrivacyLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final StageInstance.PrivacyLevel UNKNOWN
Placeholder for future privacy levels, indicates that this version of JDA does not support this privacy level yet
-
PUBLIC
public static final StageInstance.PrivacyLevel PUBLIC
This stage instance can be accessed by lurkers, meaning users that are not active members of the guild
-
GUILD_ONLY
public static final StageInstance.PrivacyLevel GUILD_ONLY
This stage instance can only be accessed by guild members
-
-
Method Detail
-
values
public static StageInstance.PrivacyLevel[] 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 (StageInstance.PrivacyLevel c : StageInstance.PrivacyLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StageInstance.PrivacyLevel valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getKey
public int getKey()
The raw API key for this privacy level- Returns:
- The raw API value or
-1
if this isUNKNOWN
-
fromKey
@Nonnull public static StageInstance.PrivacyLevel fromKey(int key)
Converts the raw API key into the respective enum value- Parameters:
key
- The API key- Returns:
- The enum value or
UNKNOWN
-
-