Enum Class BitwardenItemType

java.lang.Object
java.lang.Enum<BitwardenItemType>
com.mwdle.bitwarden.model.BitwardenItemType
All Implemented Interfaces:
Serializable, Comparable<BitwardenItemType>, Constable

public enum BitwardenItemType extends Enum<BitwardenItemType>
Represents the type of Bitwarden item, mapped from the integer code provided by the CLI. This enum is designed to be directly used in Jackson deserialization.
  • Enum Constant Details

  • Method Details

    • values

      public static BitwardenItemType[] 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 BitwardenItemType 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
    • fromInteger

      public static BitwardenItemType fromInteger(int typeCode)
      Deserializes an integer from JSON into the corresponding BitwardenItemType. This method is used by the Jackson library.
      Parameters:
      typeCode - The integer value from the "type" field in the JSON.
      Returns:
      The corresponding BitwardenItemType, or UNKNOWN if not found.
    • getTypeCode

      public int getTypeCode()
      Serializes this enum constant into its corresponding integer code for JSON.
      Returns:
      The integer code for the enum constant.