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

A rule for transforming a value.

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

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ replace_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ReplaceValueConfig` Replace with a specified value. |
| `↳ redact_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.RedactConfig` Redact |
| `↳ character_mask_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.CharacterMaskConfig` Mask |
| `↳ crypto_replace_ffx_fpe_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.CryptoReplaceFfxFpeConfig` Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig instead. Fpe is computationally expensive incurring latency costs. |
| `↳ fixed_size_bucketing_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.FixedSizeBucketingConfig` Fixed size bucketing |
| `↳ bucketing_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BucketingConfig` Bucketing |
| `↳ replace_with_info_type_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ReplaceWithInfoTypeConfig` Replace with infotype |
| `↳ time_part_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.TimePartConfig` Time extraction |
| `↳ crypto_hash_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.CryptoHashConfig` Crypto |
| `↳ date_shift_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.DateShiftConfig` Date Shift |
| `↳ crypto_deterministic_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.CryptoDeterministicConfig` Deterministic Crypto |
| `↳ replace_dictionary_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ReplaceDictionaryConfig` Replace with a value randomly drawn (with replacement) from a dictionary. |

### getReplaceConfig

Replace with a specified value.

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

### hasReplaceConfig

### setReplaceConfig

Replace with a specified value.

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

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

### getRedactConfig

Redact

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

### hasRedactConfig

### setRedactConfig

Redact

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

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

### getCharacterMaskConfig

Mask

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

### hasCharacterMaskConfig

### setCharacterMaskConfig

Mask

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

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

### getCryptoReplaceFfxFpeConfig

Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig
instead. Fpe is computationally expensive incurring latency costs.

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

### hasCryptoReplaceFfxFpeConfig

### setCryptoReplaceFfxFpeConfig

Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig
instead. Fpe is computationally expensive incurring latency costs.

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

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

### getFixedSizeBucketingConfig

Fixed size bucketing

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

### hasFixedSizeBucketingConfig

### setFixedSizeBucketingConfig

Fixed size bucketing

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

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

### getBucketingConfig

Bucketing

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

### hasBucketingConfig

### setBucketingConfig

Bucketing

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

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

### getReplaceWithInfoTypeConfig

Replace with infotype

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

### hasReplaceWithInfoTypeConfig

### setReplaceWithInfoTypeConfig

Replace with infotype

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

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

### getTimePartConfig

Time extraction

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

### hasTimePartConfig

### setTimePartConfig

Time extraction

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

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

### getCryptoHashConfig

Crypto

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

### hasCryptoHashConfig

### setCryptoHashConfig

Crypto

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

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

### getDateShiftConfig

Date Shift

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

### hasDateShiftConfig

### setDateShiftConfig

Date Shift

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

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

### getCryptoDeterministicConfig

Deterministic Crypto

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

### hasCryptoDeterministicConfig

### setCryptoDeterministicConfig

Deterministic Crypto

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

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

### getReplaceDictionaryConfig

Replace with a value randomly drawn (with replacement) from a dictionary.

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

### hasReplaceDictionaryConfig

### setReplaceDictionaryConfig

Replace with a value randomly drawn (with replacement) from a dictionary.

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

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

### getTransformation

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