Redaction
=========

.. _RedactionType:

Redaction Type
--------------

We allow two types of redaction:

1. Mark for Redaction: this creates redaction annotations and saves them with the PDF.

2. Redact: this one applies the redaction and removes all redacted data from the PDF.

.. code-block:: json

 enum RedactionType {
  READACTION_TYPE_UNSPECIFIED = 0;
  REDACTION_TYPE_MARK_FOR_REDACTION = 1;
  REDACTION_TYPE_REDACT = 2;
  REDACTION_TYPE_APPLY_REDACTION_ANNOTATIONS = 3;
 }

+--------------------------------------------+-----+-------------------------------------------------------------------+
| Value                                      | Tag | Description                                                       |
+============================================+=====+===================================================================+
| READACTION_TYPE_UNSPECIFIED                | 0   | Default                                                           |
+--------------------------------------------+-----+-------------------------------------------------------------------+
| REDACTION_TYPE_MARK_FOR_REDACTION          | 1   | Creates redaction annotations and saves them with the PDF.        |
+--------------------------------------------+-----+-------------------------------------------------------------------+
| REDACTION_TYPE_REDACT                      | 2   |                                                                   |
+--------------------------------------------+-----+-------------------------------------------------------------------+
| REDACTION_TYPE_APPLY_REDACTION_ANNOTATIONS | 3   | Applies the redaction and removes all redacted data from the PDF. |
+--------------------------------------------+-----+-------------------------------------------------------------------+

.. _RedactionStatus:

Redaction Status
----------------

While a redaction task is created/running, this is its state.
Used only internally by API-Server and Redaction-Server

.. code-block:: json

 enum RedactionStatus {
  REDACTION_STATUS_UNSPECIFIED = 0;
  REDACTION_STATUS_PENDING = 1;
  REDACTION_STATUS_PROCESSING = 2;
  REDACTION_STATUS_COMPLETED = 3;
  REDACTION_STATUS_FAILED = 4;
 }

+------------------------------+-----+--------------------------+
| Value                        | Tag | Description              |
+==============================+=====+==========================+
| REDACTION_STATUS_UNSPECIFIED | 0   | Default                  |
+------------------------------+-----+--------------------------+
| REDACTION_STATUS_PENDING     | 1   | Redaction is pending.    |
+------------------------------+-----+--------------------------+
| REDACTION_STATUS_PROCESSING  | 2   | Redaction is processing. |
+------------------------------+-----+--------------------------+
| REDACTION_STATUS_COMPLETED   | 3   | Redaction is completed.  |
+------------------------------+-----+--------------------------+
| REDACTION_STATUS_FAILED      | 4   | Redaction failed.        |
+------------------------------+-----+--------------------------+