Enum KeyMode

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

public enum KeyMode extends Enum<KeyMode>
The environment mode of an API key.

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

  • Enum Constant Details

    • LIVE

      public static final KeyMode LIVE
      Sends real email. Requires a verified sending domain. Keys are prefixed sk_live_.
    • TEST

      public static final KeyMode TEST
      Sandbox mode; fully simulated delivery, no domain required. Keys are prefixed sk_test_.
    • UNKNOWN

      public static final KeyMode UNKNOWN
  • Method Details

    • values

      public static KeyMode[] 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 KeyMode 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 KeyMode fromWire(String value)