# Google Cloud Essential Contacts V1 Client - Class Contact (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.4.5 0.3.4 0.2.13 Reference documentation and code samples for the Google Cloud Essential Contacts V1 Client class Contact.

A contact that will receive notifications from Google Cloud.

Generated from protobuf message `google.cloud.essentialcontacts.v1.Contact`

## Namespace

Google \\ Cloud \\ EssentialContacts \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id} |
| `↳ email` | `string` Required. The email address to send notifications to. The email address does not need to be a Google Account. |
| `↳ notification_category_subscriptions` | `int[]` Required. The categories of notifications that the contact will receive communications for. |
| `↳ language_tag` | `string` Required. The preferred language for notifications, as a ISO 639-1 language code. See [Supported languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) for a list of supported languages. |
| `↳ validation_state` | `int` Output only. The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource. |
| `↳ validate_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago. |

### getName

Output only. The identifier for the contact.

Format: {resource_type}/{resource_id}/contacts/{contact_id}

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

### setName

Output only. The identifier for the contact.

Format: {resource_type}/{resource_id}/contacts/{contact_id}

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

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

### getEmail

Required. The email address to send notifications to. The email address
does not need to be a Google Account.

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

### setEmail

Required. The email address to send notifications to. The email address
does not need to be a Google Account.

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

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

### getNotificationCategorySubscriptions

Required. The categories of notifications that the contact will receive
communications for.

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

### setNotificationCategorySubscriptions

Required. The categories of notifications that the contact will receive
communications for.

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

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

### getLanguageTag

Required. The preferred language for notifications, as a ISO 639-1 language
code. See [Supported
languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
for a list of supported languages.

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

### setLanguageTag

Required. The preferred language for notifications, as a ISO 639-1 language
code. See [Supported
languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages)
for a list of supported languages.

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

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

### getValidationState

Output only. The validity of the contact. A contact is considered valid if
it is the correct recipient for notifications for a particular resource.

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

### setValidationState

Output only. The validity of the contact. A contact is considered valid if
it is the correct recipient for notifications for a particular resource.

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

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

### getValidateTime

The last time the validation_state was updated, either manually or
automatically. A contact is considered stale if its validation state was
updated more than 1 year ago.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasValidateTime

### clearValidateTime

### setValidateTime

The last time the validation_state was updated, either manually or
automatically. A contact is considered stale if its validation state was
updated more than 1 year ago.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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