Enum ClientType

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DESKTOP
      The official discord desktop client
      MOBILE
      The official discord mobile app
      UNKNOWN
      Placeholder for a new type that is not yet supported here
      WEB
      Discord from the browser (or bot)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ClientType fromKey​(java.lang.String key)
      Resolves the provided raw API key to the enum constant.
      java.lang.String getKey()
      The raw key used by the API to identify this type
      static ClientType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ClientType[] 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

      • DESKTOP

        public static final ClientType DESKTOP
        The official discord desktop client
      • MOBILE

        public static final ClientType MOBILE
        The official discord mobile app
      • WEB

        public static final ClientType WEB
        Discord from the browser (or bot)
      • UNKNOWN

        public static final ClientType UNKNOWN
        Placeholder for a new type that is not yet supported here
    • Method Detail

      • values

        public static ClientType[] 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 (ClientType c : ClientType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ClientType 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 java.lang.String getKey()
        The raw key used by the API to identify this type
        Returns:
        The raw key
      • fromKey

        @Nonnull
        public static ClientType fromKey​(@Nonnull
                                         java.lang.String key)
        Resolves the provided raw API key to the enum constant.
        Parameters:
        key - The api key to check
        Returns:
        The resolved ClientType or UNKNOWN