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

Create a de-identified copy of a storage bucket. Only compatible
with Cloud Storage buckets.

A TransformationDetail will be created for each transformation.
Compatible with: Inspection of Cloud Storage

Generated from protobuf message `google.privacy.dlp.v2.Action.Deidentify`

## Namespace

Google \\ Cloud \\ Dlp \\ V2 \\ Action

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ transformation_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.TransformationConfig` User specified deidentify templates and configs for structured, unstructured, and image files. |
| `↳ transformation_details_storage_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.TransformationDetailsStorageConfig` Config for storing transformation details. This field specifies the configuration for storing detailed metadata about each transformation performed during a de-identification process. The metadata is stored separately from the de-identified content itself and provides a granular record of both successful transformations and any failures that occurred. Enabling this configuration is essential for users who need to access comprehensive information about the status, outcome, and specifics of each transformation. The details are captured in the [TransformationDetails](https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.TransformationDetails) message for each operation. Key use cases: \* \* **Auditing and compliance** \* \* Provides a verifiable audit trail of de-identification activities, which is crucial for meeting regulatory requirements and internal data governance policies. \* \* Logs what data was transformed, what transformations were applied, when they occurred, and their success status. This helps demonstrate accountability and due diligence in protecting sensitive data. \* \* **Troubleshooting and debugging** \* \* Offers detailed error messages and context if a transformation fails. This information is useful for diagnosing and resolving issues in the de-identification pipeline. \* \* Helps pinpoint the exact location and nature of failures, speeding up the debugging process. \* \* **Process verification and quality assurance** \* \* Allows users to confirm that de-identification rules and transformations were applied correctly and consistently across the dataset as intended. \* \* Helps in verifying the effectiveness of the chosen de-identification strategies. \* \* **Data lineage and impact analysis** \* \* Creates a record of how data elements were modified, contributing to data lineage. This is useful for understanding the provenance of de-identified data. \* \* Aids in assessing the potential impact of de-identification choices on downstream analytical processes or data usability. \* \* **Reporting and operational insights** \* \* You can analyze the metadata stored in a queryable BigQuery table to generate reports on transformation success rates, common error types, processing volumes (e.g., transformedBytes), and the types of transformations applied. \* \* These insights can inform optimization of de-identification configurations and resource planning. To take advantage of these benefits, set this configuration. The stored details include a description of the transformation, success or error codes, error messages, the number of bytes transformed, the location of the transformed content, and identifiers for the job and source data. |
| `↳ cloud_storage_output` | `string` Required. User settable Cloud Storage bucket and folders to store de-identified files. This field must be set for Cloud Storage deidentification. The output Cloud Storage bucket must be different from the input bucket. De-identified files will overwrite files in the output path. Form of: gs://bucket/folder/ or gs://bucket |
| `↳ file_types_to_transform` | `int[]` List of user-specified file type groups to transform. If specified, only the files with these file types are transformed. If empty, all supported files are transformed. Supported types may be automatically added over time. Any unsupported file types that are set in this field are excluded from de-identification. An error is recorded for each unsupported file in the TransformationDetails output table. Currently the only file types supported are: IMAGES, TEXT_FILES, CSV, TSV. |

### getTransformationConfig

User specified deidentify templates and configs for structured,
unstructured, and image files.

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

### hasTransformationConfig

### clearTransformationConfig

### setTransformationConfig

User specified deidentify templates and configs for structured,
unstructured, and image files.

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

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

### getTransformationDetailsStorageConfig

Config for storing transformation details.

This field specifies the configuration for storing detailed metadata
about each transformation performed during a de-identification process.
The metadata is stored separately from the de-identified content itself
and provides a granular record of both successful transformations and any
failures that occurred.
Enabling this configuration is essential for users who need to access
comprehensive information about the status, outcome, and specifics of
each transformation. The details are captured in the
[TransformationDetails](https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.TransformationDetails)
message for each operation.
Key use cases:

- **Auditing and compliance**
  - Provides a verifiable audit trail of de-identification activities, which is crucial for meeting regulatory requirements and internal data governance policies.
  - Logs what data was transformed, what transformations were applied, when they occurred, and their success status. This helps demonstrate accountability and due diligence in protecting sensitive data.
- **Troubleshooting and debugging**
  - Offers detailed error messages and context if a transformation fails. This information is useful for diagnosing and resolving issues in the de-identification pipeline.
  - Helps pinpoint the exact location and nature of failures, speeding up the debugging process.
- **Process verification and quality assurance**
  - Allows users to confirm that de-identification rules and transformations were applied correctly and consistently across the dataset as intended.
  - Helps in verifying the effectiveness of the chosen de-identification strategies.
- **Data lineage and impact analysis**
  - Creates a record of how data elements were modified, contributing to data lineage. This is useful for understanding the provenance of de-identified data.
  - Aids in assessing the potential impact of de-identification choices on downstream analytical processes or data usability.
- **Reporting and operational insights**
  - You can analyze the metadata stored in a queryable BigQuery table to generate reports on transformation success rates, common error types, processing volumes (e.g., transformedBytes), and the types of transformations applied.
  - These insights can inform optimization of de-identification configurations and resource planning. To take advantage of these benefits, set this configuration. The stored details include a description of the transformation, success or error codes, error messages, the number of bytes transformed, the location of the transformed content, and identifiers for the job and source data.

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

### hasTransformationDetailsStorageConfig

### clearTransformationDetailsStorageConfig

### setTransformationDetailsStorageConfig

Config for storing transformation details.

This field specifies the configuration for storing detailed metadata
about each transformation performed during a de-identification process.
The metadata is stored separately from the de-identified content itself
and provides a granular record of both successful transformations and any
failures that occurred.
Enabling this configuration is essential for users who need to access
comprehensive information about the status, outcome, and specifics of
each transformation. The details are captured in the
[TransformationDetails](https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.TransformationDetails)
message for each operation.
Key use cases:

- **Auditing and compliance**
  - Provides a verifiable audit trail of de-identification activities, which is crucial for meeting regulatory requirements and internal data governance policies.
  - Logs what data was transformed, what transformations were applied, when they occurred, and their success status. This helps demonstrate accountability and due diligence in protecting sensitive data.
- **Troubleshooting and debugging**
  - Offers detailed error messages and context if a transformation fails. This information is useful for diagnosing and resolving issues in the de-identification pipeline.
  - Helps pinpoint the exact location and nature of failures, speeding up the debugging process.
- **Process verification and quality assurance**
  - Allows users to confirm that de-identification rules and transformations were applied correctly and consistently across the dataset as intended.
  - Helps in verifying the effectiveness of the chosen de-identification strategies.
- **Data lineage and impact analysis**
  - Creates a record of how data elements were modified, contributing to data lineage. This is useful for understanding the provenance of de-identified data.
  - Aids in assessing the potential impact of de-identification choices on downstream analytical processes or data usability.
- **Reporting and operational insights**
  - You can analyze the metadata stored in a queryable BigQuery table to generate reports on transformation success rates, common error types, processing volumes (e.g., transformedBytes), and the types of transformations applied.
  - These insights can inform optimization of de-identification configurations and resource planning. To take advantage of these benefits, set this configuration. The stored details include a description of the transformation, success or error codes, error messages, the number of bytes transformed, the location of the transformed content, and identifiers for the job and source data.

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

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

### getCloudStorageOutput

Required. User settable Cloud Storage bucket and folders to store
de-identified files. This field must be set for Cloud Storage
deidentification. The output Cloud Storage bucket must be different
from the input bucket. De-identified files will overwrite files in the
output path.

Form of: gs://bucket/folder/ or gs://bucket

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

### hasCloudStorageOutput

### setCloudStorageOutput

Required. User settable Cloud Storage bucket and folders to store
de-identified files. This field must be set for Cloud Storage
deidentification. The output Cloud Storage bucket must be different
from the input bucket. De-identified files will overwrite files in the
output path.

Form of: gs://bucket/folder/ or gs://bucket

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

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

### getFileTypesToTransform

List of user-specified file type groups to transform. If specified, only
the files with these file types are transformed. If empty, all
supported files are transformed. Supported types may be automatically
added over time. Any unsupported file types that are set in this field
are excluded from de-identification. An error is recorded for each
unsupported file in the TransformationDetails output table. Currently the
only file types supported are: IMAGES, TEXT_FILES, CSV, TSV.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setFileTypesToTransform

List of user-specified file type groups to transform. If specified, only
the files with these file types are transformed. If empty, all
supported files are transformed. Supported types may be automatically
added over time. Any unsupported file types that are set in this field
are excluded from de-identification. An error is recorded for each
unsupported file in the TransformationDetails output table. Currently the
only file types supported are: IMAGES, TEXT_FILES, CSV, TSV.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

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

### getOutput

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