Enum 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 members
      PUBLIC
      This stage instance can be accessed by lurkers, meaning users that are not active members of the guild
      UNKNOWN
      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 value
      int getKey()
      The raw API key for this privacy level
      static 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.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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
    • 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 name
        java.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 is UNKNOWN
      • 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