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

A flattened description of a `PrimitiveTransformation` or
`RecordSuppression`.

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

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` The transformation type. |
| `↳ description` | `string` A description of the transformation. This is empty for a RECORD_SUPPRESSION, or is the output of calling toString() on the `PrimitiveTransformation` protocol buffer message for any other type of transformation. |
| `↳ condition` | `string` A human-readable string representation of the `RecordCondition` corresponding to this transformation. Set if a `RecordCondition` was used to determine whether or not to apply this transformation. Examples: \* \* (age_field \> 85) \* \* (age_field \<= 18) \* \* (zip_field exists) \* \* (zip_field == 01234) \&\& (city_field != "Springville") \* \* (zip_field == 01234) \&\& (age_field \<= 18) \&\& (city_field exists) |
| `↳ info_type` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.InfoType` Set if the transformation was limited to a specific `InfoType`. |

### getType

The transformation type.

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

### setType

The transformation type.

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

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

### getDescription

A description of the transformation. This is empty for a
RECORD_SUPPRESSION, or is the output of calling toString() on the
`PrimitiveTransformation` protocol buffer message for any other type of
transformation.

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

### setDescription

A description of the transformation. This is empty for a
RECORD_SUPPRESSION, or is the output of calling toString() on the
`PrimitiveTransformation` protocol buffer message for any other type of
transformation.

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

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

### getCondition

A human-readable string representation of the `RecordCondition`
corresponding to this transformation. Set if a `RecordCondition` was used
to determine whether or not to apply this transformation.

Examples:

- (age_field \> 85)
- (age_field \<= 18)
- (zip_field exists)
- (zip_field == 01234) \&\& (city_field != "Springville")
- (zip_field == 01234) \&\& (age_field \<= 18) \&\& (city_field exists)

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

### setCondition

A human-readable string representation of the `RecordCondition`
corresponding to this transformation. Set if a `RecordCondition` was used
to determine whether or not to apply this transformation.

Examples:

- (age_field \> 85)
- (age_field \<= 18)
- (zip_field exists)
- (zip_field == 01234) \&\& (city_field != "Springville")
- (zip_field == 01234) \&\& (age_field \<= 18) \&\& (city_field exists)

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

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

### getInfoType

Set if the transformation was limited to a specific `InfoType`.

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

### hasInfoType

### clearInfoType

### setInfoType

Set if the transformation was limited to a specific `InfoType`.

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

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