# Google Cloud BigQuery Data Policies V1 Client - Class RenameDataPolicyRequest (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 RenameDataPolicyRequest.

Request message for the RenameDataPolicy method.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. Resource name of the data policy to rename. The format is `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` |
| `↳ new_data_policy_id` | `string` Required. The new data policy id. |

### getName

Required. Resource name of the data policy to rename. The format is
`projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`

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

### setName

Required. Resource name of the data policy to rename. The format is
`projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`

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

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

### getNewDataPolicyId

Required. The new data policy id.

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

### setNewDataPolicyId

Required. The new data policy id.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Resource name of the data policy to rename. The format is `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` |
| `newDataPolicyId` | `string` Required. The new data policy id. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-datapolicies/latest/V1.RenameDataPolicyRequest` |   |