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