Enum Class NameAvailability

java.lang.Object
java.lang.Enum<NameAvailability>
lol.trq.alts.account.NameAvailability
All Implemented Interfaces:
Serializable, Comparable<NameAvailability>, Constable

public enum NameAvailability extends Enum<NameAvailability>
Whether a username can be claimed, from GET /minecraft/profile/name/{name}/available.
Since:
0.11.0
  • Enum Constant Details

    • AVAILABLE

      public static final NameAvailability AVAILABLE
      The name is free to claim.
      Since:
      0.11.0
    • DUPLICATE

      public static final NameAvailability DUPLICATE
      The name is taken.
      Since:
      0.11.0
    • NOT_ALLOWED

      public static final NameAvailability NOT_ALLOWED
      The name cannot be claimed — blocked, reserved, or otherwise disallowed. The endpoint does not say which, so neither does this; a host reports it as "not allowed" rather than guessing a reason.
      Since:
      0.11.0
    • UNKNOWN

      public static final NameAvailability UNKNOWN
      The endpoint returned a status this release does not recognise.
      Since:
      0.11.0
  • Method Details

    • values

      public static NameAvailability[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NameAvailability valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • from

      public static NameAvailability from(String status)
      Maps the endpoint's status string onto a value.
      Parameters:
      status - the raw status, or null
      Returns:
      the matching availability, UNKNOWN for anything unrecognised
      Since:
      0.11.0