# Data Loss Prevention V2 Client - Class RedactImageRequest (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 RedactImageRequest.

Request to search for potentially sensitive info in an image and redact it
by covering it with a colored rectangle.

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

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3 |
| `↳ location_id` | `string` Deprecated. This field has no effect. |
| `↳ inspect_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InspectConfig` Configuration for the inspector. |
| `↳ image_redaction_configs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.RedactImageRequest.ImageRedactionConfig>` The configuration for specifying what content to redact from images. |
| `↳ include_findings` | `bool` Whether the response should include findings along with the redacted image. |
| `↳ byte_item` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ByteContentItem` The content must be PNG, JPEG, SVG or BMP. |
| `↳ inspect_template` | `string` The full resource name of the inspection template to use. Settings in the main `inspect_config` field override the corresponding settings in this inspection template. The merge behavior is as follows: - Singular field: The main field's value replaces the value of the corresponding field in the template. - Repeated fields: The field values are appended to the list defined in the template. - Sub-messages and groups: The fields are recursively merged. |
| `↳ deidentify_template` | `string` The full resource name of the de-identification template to use. Settings in the main `image_redaction_configs` field override the corresponding settings in this de-identification template. The request fails if the type of the template's deidentify_config is not image_transformations. |

### getParent

Parent resource name.

The format of this value varies depending on whether you have [specified a
processing
location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):

- Projects scope, location specified: `projects/{project_id}/locations/{location_id}`
- Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3

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

### setParent

Parent resource name.

The format of this value varies depending on whether you have [specified a
processing
location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):

- Projects scope, location specified: `projects/{project_id}/locations/{location_id}`
- Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3

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

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

### getLocationId

Deprecated. This field has no effect.

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

### setLocationId

Deprecated. This field has no effect.

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

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

### getInspectConfig

Configuration for the inspector.

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

### hasInspectConfig

### clearInspectConfig

### setInspectConfig

Configuration for the inspector.

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

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

### getImageRedactionConfigs

The configuration for specifying what content to redact from images.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.RedactImageRequest.ImageRedactionConfig>` |   |

### setImageRedactionConfigs

The configuration for specifying what content to redact from images.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.RedactImageRequest.ImageRedactionConfig>` |

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

### getIncludeFindings

Whether the response should include findings along with the redacted
image.

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

### setIncludeFindings

Whether the response should include findings along with the redacted
image.

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

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

### getByteItem

The content must be PNG, JPEG, SVG or BMP.

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

### hasByteItem

### clearByteItem

### setByteItem

The content must be PNG, JPEG, SVG or BMP.

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

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

### getInspectTemplate

The full resource name of the inspection template to use. Settings in the
main `inspect_config` field override the corresponding settings in this
inspection template.

The merge behavior is as follows:

- Singular field: The main field's value replaces the value of the corresponding field in the template.
- Repeated fields: The field values are appended to the list defined in the template.
- Sub-messages and groups: The fields are recursively merged.

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

### setInspectTemplate

The full resource name of the inspection template to use. Settings in the
main `inspect_config` field override the corresponding settings in this
inspection template.

The merge behavior is as follows:

- Singular field: The main field's value replaces the value of the corresponding field in the template.
- Repeated fields: The field values are appended to the list defined in the template.
- Sub-messages and groups: The fields are recursively merged.

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

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

### getDeidentifyTemplate

The full resource name of the de-identification template to use. Settings
in the main `image_redaction_configs` field override the corresponding
settings in this de-identification template. The request fails if the
type of the template's deidentify_config is not image_transformations.

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

### setDeidentifyTemplate

The full resource name of the de-identification template to use. Settings
in the main `image_redaction_configs` field override the corresponding
settings in this de-identification template. The request fails if the
type of the template's deidentify_config is not image_transformations.

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

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