# Google Cloud Dms V1 Client - Class EntityMapping (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 EntityMapping.

Details of the mappings of a database entity.

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

## Namespace

Google \\ Cloud \\ CloudDms \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ source_entity` | `string` Source entity full name. The source entity can also be a column, index or constraint using the same naming notation schema.table.column. |
| `↳ draft_entity` | `string` Target entity full name. The draft entity can also include a column, index or constraint using the same naming notation schema.table.column. |
| `↳ source_type` | `int` Type of source entity. |
| `↳ draft_type` | `int` Type of draft entity. |
| `↳ mapping_log` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.EntityMappingLogEntry>` Entity mapping log entries. Multiple rules can be effective and contribute changes to a converted entity, such as a rule can handle the entity name, another rule can handle an entity type. In addition, rules which did not change the entity are also logged along with the reason preventing them to do so. |

### getSourceEntity

Source entity full name.

The source entity can also be a column, index or constraint using the
same naming notation schema.table.column.

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

### setSourceEntity

Source entity full name.

The source entity can also be a column, index or constraint using the
same naming notation schema.table.column.

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

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

### getDraftEntity

Target entity full name.

The draft entity can also include a column, index or constraint using the
same naming notation schema.table.column.

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

### setDraftEntity

Target entity full name.

The draft entity can also include a column, index or constraint using the
same naming notation schema.table.column.

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

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

### getSourceType

Type of source entity.

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

### setSourceType

Type of source entity.

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

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

### getDraftType

Type of draft entity.

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

### setDraftType

Type of draft entity.

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

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

### getMappingLog

Entity mapping log entries.

Multiple rules can be effective and contribute changes to a converted
entity, such as a rule can handle the entity name, another rule can handle
an entity type. In addition, rules which did not change the entity are also
logged along with the reason preventing them to do so.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.EntityMappingLogEntry>` |   |

### setMappingLog

Entity mapping log entries.

Multiple rules can be effective and contribute changes to a converted
entity, such as a rule can handle the entity name, another rule can handle
an entity type. In addition, rules which did not change the entity are also
logged along with the reason preventing them to do so.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dms/latest/V1.EntityMappingLogEntry>` |

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