Package org.javacord.api.interaction
Enum SlashCommandPermissionType
- java.lang.Object
-
- java.lang.Enum<SlashCommandPermissionType>
-
- org.javacord.api.interaction.SlashCommandPermissionType
-
- All Implemented Interfaces:
Serializable,Comparable<SlashCommandPermissionType>
public enum SlashCommandPermissionType extends Enum<SlashCommandPermissionType>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SlashCommandPermissionTypefromValue(int value)Gets anSlashCommandPermissionTypeby its value.intgetValue()Gets integer value that represents this type.static SlashCommandPermissionTypevalueOf(String name)Returns the enum constant of this type with the specified name.static SlashCommandPermissionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ROLE
public static final SlashCommandPermissionType ROLE
-
USER
public static final SlashCommandPermissionType USER
-
UNKNOWN
public static final SlashCommandPermissionType UNKNOWN
-
-
Method Detail
-
values
public static SlashCommandPermissionType[] 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 (SlashCommandPermissionType c : SlashCommandPermissionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SlashCommandPermissionType 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
-
getValue
public int getValue()
Gets integer value that represents this type.- Returns:
- The integer value that represents this type.
-
fromValue
public static SlashCommandPermissionType fromValue(int value)
Gets anSlashCommandPermissionTypeby its value.- Parameters:
value- The value of the slash command permission type.- Returns:
- The slash command permission type for the given value,
or
UNKNOWNif there's none with the given value.
-
-