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

AdjustmentRule condition for image findings.

This rule is silently ignored if the content being inspected is not an image.

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

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ info_types` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InfoType>` A list of image-supported infoTypes---excluding [document infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)---to be used as context for the adjustment rule. Sensitive Data Protection adjusts the likelihood of an image finding if its bounding box has the specified spatial relationship (defined by `image_containment_type`) with a finding of an infoType in this list. For example, you can create a rule to adjust the likelihood of a `US_PASSPORT` finding if it is enclosed by a finding of `OBJECT_TYPE/PERSON/PASSPORT`. To configure this, set `US_PASSPORT` in `InspectionRuleSet.info_types`. Add an `adjustment_rule` with an `adjust_by_image_findings.info_types` that contains `OBJECT_TYPE/PERSON/PASSPORT` and `image_containment_type` set to `encloses`. In this case, the likelihood of the `US_PASSPORT` finding is adjusted, but the likelihood of the `OBJECT_TYPE/PERSON/PASSPORT` finding is not. |
| `↳ min_likelihood` | `int` Required. Minimum likelihood of the `adjust_by_image_findings.info_types` finding. If the likelihood is lower than this value, Sensitive Data Protection doesn't adjust the likelihood of the `InspectionRuleSet.info_types` finding. |
| `↳ image_containment_type` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ImageContainmentType` Specifies the required spatial relationship between the bounding boxes of the target finding and the context infoType findings. |

### getInfoTypes

A list of image-supported infoTypes---excluding [document
infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)---to
be used as context for the adjustment rule. Sensitive Data Protection
adjusts the likelihood of an image finding if its bounding box has the
specified spatial relationship (defined by `image_containment_type`) with a
finding of an infoType in this list.

For example, you can create a rule to adjust the likelihood of a
`US_PASSPORT` finding if it is enclosed by a finding of
`OBJECT_TYPE/PERSON/PASSPORT`. To configure this, set `US_PASSPORT` in
`InspectionRuleSet.info_types`. Add an `adjustment_rule` with an
`adjust_by_image_findings.info_types` that contains
`OBJECT_TYPE/PERSON/PASSPORT` and `image_containment_type` set
to `encloses`. In this case, the likelihood of the `US_PASSPORT` finding is
adjusted, but the likelihood of the `OBJECT_TYPE/PERSON/PASSPORT`
finding is not.

| **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.InfoType>` |   |

### setInfoTypes

A list of image-supported infoTypes---excluding [document
infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)---to
be used as context for the adjustment rule. Sensitive Data Protection
adjusts the likelihood of an image finding if its bounding box has the
specified spatial relationship (defined by `image_containment_type`) with a
finding of an infoType in this list.

For example, you can create a rule to adjust the likelihood of a
`US_PASSPORT` finding if it is enclosed by a finding of
`OBJECT_TYPE/PERSON/PASSPORT`. To configure this, set `US_PASSPORT` in
`InspectionRuleSet.info_types`. Add an `adjustment_rule` with an
`adjust_by_image_findings.info_types` that contains
`OBJECT_TYPE/PERSON/PASSPORT` and `image_containment_type` set
to `encloses`. In this case, the likelihood of the `US_PASSPORT` finding is
adjusted, but the likelihood of the `OBJECT_TYPE/PERSON/PASSPORT`
finding is not.

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

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

### getMinLikelihood

Required. Minimum likelihood of the
`adjust_by_image_findings.info_types` finding. If the likelihood is
lower than this value, Sensitive Data Protection doesn't adjust the
likelihood of the `InspectionRuleSet.info_types` finding.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Likelihood](https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Likelihood). |

### setMinLikelihood

Required. Minimum likelihood of the
`adjust_by_image_findings.info_types` finding. If the likelihood is
lower than this value, Sensitive Data Protection doesn't adjust the
likelihood of the `InspectionRuleSet.info_types` finding.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Likelihood](https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Likelihood). |

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

### getImageContainmentType

Specifies the required spatial relationship between the bounding boxes
of the target finding and the context infoType findings.

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

### hasImageContainmentType

### clearImageContainmentType

### setImageContainmentType

Specifies the required spatial relationship between the bounding boxes
of the target finding and the context infoType findings.

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

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