Enum KeyScope

java.lang.Object
java.lang.Enum<KeyScope>
africa.sendbyte.apikeys.KeyScope
All Implemented Interfaces:
Serializable, Comparable<KeyScope>, java.lang.constant.Constable

public enum KeyScope extends Enum<KeyScope>
The permission scope of an API key. Assigned at creation and immutable thereafter.

Use fromWire(String) to parse defensively; unknown values map to UNKNOWN rather than throwing.

  • Enum Constant Details

    • SEND_ONLY

      public static final KeyScope SEND_ONLY
      Send emails only. Use for production application servers.
    • READ_ONLY

      public static final KeyScope READ_ONLY
      Read emails, domains, and logs. Use for dashboards and monitors.
    • FULL_ACCESS

      public static final KeyScope FULL_ACCESS
      All operations, including creating and revoking keys.
    • UNKNOWN

      public static final KeyScope UNKNOWN
  • Method Details

    • values

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

      public static KeyScope 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 name
      NullPointerException - if the argument is null
    • wire

      public String wire()
    • fromWire

      public static KeyScope fromWire(String value)