# Google Apps Events Subscriptions V1beta Client - Class PayloadOptions (0.4.4)

0.4.4 (latest) 0.4.3 0.3.1 0.2.1 0.1.6

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Apps Events Subscriptions V1beta Client class PayloadOptions.

Options about what data to include in the event payload. Only supported for
Google Chat events.

Generated from protobuf message `google.apps.events.subscriptions.v1beta.PayloadOptions`

## Namespace

Google \\ Apps \\ Events \\ Subscriptions \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ include_resource` | `bool` Optional. Whether the event payload includes data about the resource that changed. For example, for an event where a Google Chat message was created, whether the payload contains data about the [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) resource. If false, the event payload only includes the name of the changed resource. |
| `↳ field_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Optional. If `include_resource` is set to `true`, the list of fields to include in the event payload. Separate fields with a comma. For example, to include a Google Chat message's sender and create time, enter `message.sender,message.createTime`. If omitted, the payload includes all fields for the resource. If you specify a field that doesn't exist for the resource, the system ignores the field. |

### getIncludeResource

Optional. Whether the event payload includes data about the resource that
changed. For example, for an event where a Google Chat message was created,
whether the payload contains data about the
[`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages)
resource. If false, the event payload only includes the name of the changed
resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setIncludeResource

Optional. Whether the event payload includes data about the resource that
changed. For example, for an event where a Google Chat message was created,
whether the payload contains data about the
[`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages)
resource. If false, the event payload only includes the name of the changed
resource.

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

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

### getFieldMask

Optional. If `include_resource` is set to `true`, the list of fields to
include in the event payload. Separate fields with a comma. For example, to
include a Google Chat message's sender and create time, enter
`message.sender,message.createTime`. If omitted, the payload includes all
fields for the resource.

If you specify a field that doesn't exist for the resource, the system
ignores the field.

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

### hasFieldMask

### clearFieldMask

### setFieldMask

Optional. If `include_resource` is set to `true`, the list of fields to
include in the event payload. Separate fields with a comma. For example, to
include a Google Chat message's sender and create time, enter
`message.sender,message.createTime`. If omitted, the payload includes all
fields for the resource.

If you specify a field that doesn't exist for the resource, the system
ignores the field.

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

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