# Google Cloud Essential Contacts V1 Client - Class SendTestMessageRequest (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 SendTestMessageRequest.

Request message for the SendTestMessage method.

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

## Namespace

Google \\ Cloud \\ EssentialContacts \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ contacts` | `string[]` Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id} |
| `↳ resource` | `string` Required. The name of the resource to send the test message for. All contacts must either be set directly on this resource or inherited from another resource that is an ancestor of this one. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} |
| `↳ notification_category` | `int` Required. The notification category to send the test message for. All contacts must be subscribed to this category. |

### getContacts

Required. The list of names of the contacts to send a test message to.

Format: organizations/{organization_id}/contacts/{contact_id},
folders/{folder_id}/contacts/{contact_id} or
projects/{project_id}/contacts/{contact_id}

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

### setContacts

Required. The list of names of the contacts to send a test message to.

Format: organizations/{organization_id}/contacts/{contact_id},
folders/{folder_id}/contacts/{contact_id} or
projects/{project_id}/contacts/{contact_id}

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

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

### getResource

Required. The name of the resource to send the test message for. All
contacts must either be set directly on this resource or inherited from
another resource that is an ancestor of this one. Format:
organizations/{organization_id}, folders/{folder_id} or
projects/{project_id}

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

### setResource

Required. The name of the resource to send the test message for. All
contacts must either be set directly on this resource or inherited from
another resource that is an ancestor of this one. Format:
organizations/{organization_id}, folders/{folder_id} or
projects/{project_id}

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

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

### getNotificationCategory

Required. The notification category to send the test message for. All
contacts must be subscribed to this category.

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

### setNotificationCategory

Required. The notification category to send the test message for. All
contacts must be subscribed to this category.

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

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