# Google Ads Data Manager V1 Client - Class EncryptedUserId (0.5.0)

0.5.0 (latest) 0.4.0 0.3.1 0.2.0 0.1.2 Reference documentation and code samples for the Google Ads Data Manager V1 Client class EncryptedUserId.

A user identifier issued to be used for attribution. All fields are
required if this is used.

Generated from protobuf message `google.ads.datamanager.v1.EncryptedUserId`

## Namespace

Google \\ Ads \\ DataManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ encrypted_id` | `string` Required. The alphanumeric encrypted id. |
| `↳ entity_type` | `int` Required. The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer. |
| `↳ entity_id` | `int|string` Required. The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer. |
| `↳ source` | `int` Required. Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer. |

### getEncryptedId

Required. The alphanumeric encrypted id.

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

### setEncryptedId

Required. The alphanumeric encrypted id.

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

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

### getEntityType

Required. The encryption entity type. This should match the encryption
configuration for ad serving or Data Transfer.

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

### setEntityType

Required. The encryption entity type. This should match the encryption
configuration for ad serving or Data Transfer.

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

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

### getEntityId

Required. The encryption entity ID. This should match the encryption
configuration for ad serving or Data Transfer.

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

### setEntityId

Required. The encryption entity ID. This should match the encryption
configuration for ad serving or Data Transfer.

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

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

### getSource

Required. Describes whether the encrypted cookie was received from ad
serving (the %m macro) or from Data Transfer.

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

### setSource

Required. Describes whether the encrypted cookie was received from ad
serving (the %m macro) or from Data Transfer.

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

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