# Data Loss Prevention V2 Client - Class ImageRedactionConfig (2.13.0)

2.13.0 (latest) 2.12.0 2.11.0 2.10.0 2.9.2 2.8.1 2.7.0 2.6.1 2.4.1 2.3.0 2.2.3 2.1.0 2.0.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.2 1.12.0 1.11.0 1.10.2 1.9.0 1.8.6 Reference documentation and code samples for the Data Loss Prevention V2 Client class ImageRedactionConfig.

Configuration for determining how redaction of images should occur.

Generated from protobuf message `google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig`

## Namespace

Google \\ Cloud \\ Dlp \\ V2 \\ RedactImageRequest

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ info_type` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InfoType` Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig. |
| `↳ redact_all_text` | `bool` If true, all text found in the image, regardless whether it matches an info_type, is redacted. Only one should be provided. |
| `↳ redaction_color` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Color` The color to use when redacting content from an image. If not specified, the default is black. |

### getInfoType

Only one per info_type should be provided per request. If not
specified, and redact_all_text is false, the DLP API will redact all
text that it matches against all info_types that are found, but not
specified in another ImageRedactionConfig.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InfoType|null` |   |

### hasInfoType

### setInfoType

Only one per info_type should be provided per request. If not
specified, and redact_all_text is false, the DLP API will redact all
text that it matches against all info_types that are found, but not
specified in another ImageRedactionConfig.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InfoType` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRedactAllText

If true, all text found in the image, regardless whether it matches an
info_type, is redacted. Only one should be provided.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasRedactAllText

### setRedactAllText

If true, all text found in the image, regardless whether it matches an
info_type, is redacted. Only one should be provided.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRedactionColor

The color to use when redacting content from an image. If not specified,
the default is black.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Color|null` |   |

### hasRedactionColor

### clearRedactionColor

### setRedactionColor

The color to use when redacting content from an image. If not specified,
the default is black.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Color` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTarget

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |