# Google Apps Events Subscriptions V1beta Client - Class UpdateSubscriptionRequest (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 UpdateSubscriptionRequest.

The request message for
[SubscriptionsService.UpdateSubscription](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Client.SubscriptionsServiceClient#_Google_Apps_Events_Subscriptions_V1beta_Client_SubscriptionsServiceClient__updateSubscription__).

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ subscription` | `https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription` Required. The subscription to update. The subscription's `name` field is used to identify the subscription to update. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Optional. The field to update. If omitted, updates any fields included in the request. You can update one of the following fields in a subscription: \* \* [`expire_time`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getExpireTime__): The timestamp when the subscription expires. \* \* [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription. \* \* [`event_types`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getEventTypes__): The list of event types to receive about the target resource. To fully replace the subscription (the equivalent of `PUT`), use `*`. Any omitted fields are updated with empty values. |
| `↳ validate_only` | `bool` Optional. If set to `true`, validates and previews the request, but doesn't update the subscription. |

### getSubscription

Required. The subscription to update.

The subscription's `name` field is used to identify the subscription to
update.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription|null` |   |

### hasSubscription

### clearSubscription

### setSubscription

Required. The subscription to update.

The subscription's `name` field is used to identify the subscription to
update.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription` |

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

### getUpdateMask

Optional. The field to update. If omitted, updates any fields included in
the request.

You can update one of the following fields in a subscription:

- [`expire_time`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getExpireTime__): The timestamp when the subscription expires.
- [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription.
- [`event_types`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getEventTypes__): The list of event types to receive about the target resource. To fully replace the subscription (the equivalent of `PUT`), use `*`. Any omitted fields are updated with empty values.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Optional. The field to update. If omitted, updates any fields included in
the request.

You can update one of the following fields in a subscription:

- [`expire_time`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getExpireTime__): The timestamp when the subscription expires.
- [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription.
- [`event_types`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getEventTypes__): The list of event types to receive about the target resource. To fully replace the subscription (the equivalent of `PUT`), use `*`. Any omitted fields are updated with empty values.

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

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

### getValidateOnly

Optional. If set to `true`, validates and previews the request, but doesn't
update the subscription.

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

### setValidateOnly

Optional. If set to `true`, validates and previews the request, but doesn't
update the subscription.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `subscription` | `https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription` Required. The subscription to update. The subscription's `name` field is used to identify the subscription to update. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Optional. The field to update. If omitted, updates any fields included in the request. You can update one of the following fields in a subscription: - - [`expire_time`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getExpireTime__): The timestamp when the subscription expires. - - [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription. - - [`event_types`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.Subscription#_Google_Apps_Events_Subscriptions_V1beta_Subscription__getEventTypes__): The list of event types to receive about the target resource. To fully replace the subscription (the equivalent of `PUT`), use `*`. Any omitted fields are updated with empty values. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1beta.UpdateSubscriptionRequest` |   |