# Google Cloud Dms V1 Client - Class SetTablePrimaryKey (2.1.3)

2.1.3 (latest) 2.1.2 2.0.6 1.5.5 1.4.2 1.3.0 1.2.1 1.1.0 1.0.5 Reference documentation and code samples for the Google Cloud Dms V1 Client class SetTablePrimaryKey.

Options to configure rule type SetTablePrimaryKey.

The rule is used to specify the columns and name to configure/alter the
primary key of a table.
The rule filter field can refer to one entity.
The rule scope can be one of: Table.

Generated from protobuf message `google.cloud.clouddms.v1.SetTablePrimaryKey`

## Namespace

Google \\ Cloud \\ CloudDms \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ primary_key_columns` | `string[]` Required. List of column names for the primary key |
| `↳ primary_key` | `string` Optional. Name for the primary key |

### getPrimaryKeyColumns

Required. List of column names for the primary key

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

### setPrimaryKeyColumns

Required. List of column names for the primary key

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

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

### getPrimaryKey

Optional. Name for the primary key

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

### setPrimaryKey

Optional. Name for the primary key

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

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