---
agentTools:
  projectIndex: https://docs.privakey.com/llms.txt
---

# Enumerations

## Summary

PrivakeyCX library provides 7 core enumerations to standardized the code.

<br/>

### RequestStatus

```java
public enum RequestStatus
```

The available statuses for requests. You can use this class to go between a numerical status and the text status. Note that `ACCEPTED` and `REJECTED` are legacy and no longer used.

[block:parameters]
{
  "data": {
    "h-0": "Status",
    "h-1": "Value",
    "0-0": "UNKNOWN",
    "0-1": "-1",
    "1-0": "ACCEPTED",
    "2-0": "CANCELED",
    "3-0": "COMPLETED",
    "4-0": "PENDING",
    "5-0": "REJECTED",
    "6-0": "TIMEDOUT",
    "1-1": "0",
    "2-1": "1",
    "3-1": "2",
    "4-1": "3",
    "5-1": "4",
    "6-1": "5"
  },
  "cols": 2,
  "rows": 7
}
[/block]

[block:parameters]
{
  "data": {
    "h-0": "Public methods",
    "0-0": "int",
    "0-1": "`getStatusId()`\nGets the integer version of the status. \neg. `RequestStatus.PENDING.getStatusId();`",
    "1-0": "String",
    "1-1": "`toString()`\nGets the text representation of the status. All status' are lowercase.\neg. `PENDING.toString()` will return `pending`."
  },
  "cols": 2,
  "rows": 2
}
[/block]

<br/>

### DeviceStatus

```java
public enum DeviceStatus
```

The available statuses for devices. You can use this class to go between a numerical status and the text status.

[block:parameters]
{
  "data": {
    "h-0": "Status",
    "h-1": "Value",
    "0-0": "UNKNOWN",
    "0-1": "-1",
    "1-0": "ACTIVE",
    "1-1": "0",
    "2-0": "REVOKED",
    "2-1": "2"
  },
  "cols": 2,
  "rows": 3
}
[/block]

[block:parameters]
{
  "data": {
    "h-0": "Public methods",
    "0-0": "DeviceStatus",
    "0-1": "`valueOf(int statusId)`\nTakes the id of a status and returns a `DeviceStatus` object.",
    "1-0": "int",
    "1-1": "`getStatusId()`\nGets the integer version of the status. \neg. `DeviceStatus.ACTIVE.getStatusId();`",
    "2-0": "String",
    "2-1": "`toString()`\nGets the text representation of the status. All status' are lowercase.\neg. `ACTIVE.toString()` will return `active`."
  },
  "cols": 2,
  "rows": 3
}
[/block]

<br/>

### AccountStatus

```java
public enum AccountStatus
```

The available statuses for the Privakey Account. You can use this class to go between a numerical status and the text status.

[block:parameters]
{
  "data": {
    "h-0": "Status",
    "h-1": "Value",
    "0-0": "UNKNOWN",
    "0-1": "-1",
    "1-0": "ACTIVE",
    "2-0": "ADMIN_SUSPENDED",
    "3-0": "TOKEN_SUSPENDED",
    "4-0": "REVOKED",
    "1-1": "0",
    "2-1": "1",
    "3-1": "2",
    "4-1": "3"
  },
  "cols": 2,
  "rows": 5
}
[/block]

[block:parameters]
{
  "data": {
    "0-1": "`valueOf(int statusId)`\nTakes the id of a status and returns an `AccountStatus` object.",
    "h-0": "Public methods",
    "0-0": "AccountStatus",
    "1-1": "`getStatusId()`\nGets the integer version of the status. \neg. `AccountStatus.ACTIVE.getStatusId();`",
    "2-1": "`toString()`\nGets the text representation of the status. All status' are lowercase.\neg. `ACTIVE.toString()` will return `active`.",
    "1-0": "int",
    "2-0": "String"
  },
  "cols": 2,
  "rows": 3
}
[/block]

<br/>

### NotificationType

```java
public enum NotificationType
```

The available types of notifications that the Privakey CX Library recognizes. You can use this class to go between a numerical status and the text status.

[block:parameters]
{
  "data": {
    "h-0": "Status",
    "h-1": "Value",
    "0-0": "Unknown",
    "1-0": "Authentication",
    "2-0": "RequestCanceled",
    "3-0": "RequestTimedOut",
    "4-0": "RequestCompleted",
    "5-0": "UpdateAccount",
    "0-1": "-1",
    "1-1": "0",
    "2-1": "1",
    "3-1": "2",
    "4-1": "3",
    "5-1": "4",
    "6-1": "5",
    "7-1": "6",
    "8-1": "7",
    "9-1": "8",
    "10-1": "9",
    "6-0": "TokenSuspend",
    "7-0": "AdminSuspend",
    "8-0": "DeviceRevoke",
    "9-0": "AccountRevoke",
    "10-0": "Resume"
  },
  "cols": 2,
  "rows": 11
}
[/block]

[block:parameters]
{
  "data": {
    "h-0": "Public methods",
    "0-1": "`getTypeId()`\nGets the integer version of the status. eg. `NotificationType.Authentication.getTypeId();`",
    "1-1": "`toString()`\nGets the text representation of the type. All types are lowercase  eg. `Authentication.toString()` will return `authentication`.",
    "0-0": "int",
    "1-0": "String"
  },
  "cols": 2,
  "rows": 2
}
[/block]

<br/>

### TelemetryEvent

```java
public enum TelemetryEvent
```

The available events for default telemetry. You can use this class to go between a numerical status and the text status.

[block:parameters]
{
  "data": {
    "h-0": "Name",
    "h-1": "Value",
    "0-0": "UNKNOWN",
    "0-1": "-1",
    "1-0": "NOTIFICATION_CLICKED",
    "1-1": "0",
    "2-0": "NOTIFICATION_RECEIVED",
    "2-1": "1",
    "3-0": "REQUEST_FETCHED",
    "3-1": "2",
    "4-0": "REQUEST_PROCESSED",
    "4-1": "3",
    "5-0": "REQUEST_VIEWED",
    "5-1": "4"
  },
  "cols": 2,
  "rows": 6
}
[/block]

[block:parameters]
{
  "data": {
    "h-0": "Public methods",
    "0-0": "int",
    "1-0": "String",
    "0-1": "`getTypeId()`\nGets the integer version of the status. eg. `NotificationType.Authentication.getTypeId();`",
    "1-1": "`toString()`\nGets the text representation of the event. All events are camel case  eg. `REQUEST_VIEWED.toString()` will return `requestViewed`."
  },
  "cols": 2,
  "rows": 2
}
[/block]

<br/>

### KeyType

```java
public enum KeyType
```

The available types for keys. You can use this class to go between a numerical status and the text status.

[block:parameters]
{
  "data": {
    "h-0": "Type",
    "h-1": "Value",
    "0-0": "AUTHORIZATION",
    "0-1": "0",
    "1-0": "ACCESS",
    "1-1": "1",
    "2-0": "BIOMETRIC",
    "2-1": "2"
  },
  "cols": 2,
  "rows": 3
}
[/block]

[block:parameters]
{
  "data": {
    "1-1": "`toString()`\nGets the text representation of the type. All types are lowercase  eg. `AUTHORIZATION.toString()` will return `authorization`.",
    "0-1": "`getTypeId()`\nGets the integer version of the status. eg. `KeyType.AUTHORIZATION.getTypeId();`",
    "h-0": "Public methods",
    "0-0": "int",
    "1-0": "String"
  },
  "cols": 2,
  "rows": 2
}
[/block]