# Google Cloud BigQuery Data Policies V1 Client - Class DataMaskingPolicy (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.5.5 0.4.1 0.3.3 0.2.4 0.1.1 Reference documentation and code samples for the Google Cloud BigQuery Data Policies V1 Client class DataMaskingPolicy.

The data masking policy that is used to specify data masking rule.

Generated from protobuf message `google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy`

## Namespace

Google \\ Cloud \\ BigQuery \\ DataPolicies \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ predefined_expression` | `int` A predefined masking expression. |
| `↳ routine` | `string` The name of the BigQuery routine that contains the custom masking routine, in the format of `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. |

### getPredefinedExpression

A predefined masking expression.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [PredefinedExpression](https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-datapolicies/latest/V1.DataMaskingPolicy.PredefinedExpression). |

### hasPredefinedExpression

### setPredefinedExpression

A predefined masking expression.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [PredefinedExpression](https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-datapolicies/latest/V1.DataMaskingPolicy.PredefinedExpression). |

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

### getRoutine

The name of the BigQuery routine that contains the custom masking
routine, in the format of
`projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`.

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

### hasRoutine

### setRoutine

The name of the BigQuery routine that contains the custom masking
routine, in the format of
`projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`.

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

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

### getMaskingExpression

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