# Google Apps Events Subscriptions V1 Client - Class UpdateSubscriptionRequest (0.4.4)

0.4.4 (latest) 0.4.3 0.3.1 0.2.1 0.1.6 Reference documentation and code samples for the Google Apps Events Subscriptions V1 Client class UpdateSubscriptionRequest.

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

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

## Namespace

Google \\ Apps \\ Events \\ Subscriptions \\ V1

## 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/V1.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. Required. The field to update. 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/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getExpireTime__): The timestamp when the subscription expires. \* \* [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription. |
| `↳ 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/V1.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/V1.Subscription` |

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

### getUpdateMask

Optional. Required. The field to update.

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/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getExpireTime__): The timestamp when the subscription expires.
- [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Optional. Required. The field to update.

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/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getExpireTime__): The timestamp when the subscription expires.
- [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription.

| **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/V1.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. Required. The field to update. 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/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getExpireTime__): The timestamp when the subscription expires. - - [`ttl`](https://docs.cloud.google.com/php/docs/reference/apps-events-subscriptions/latest/V1.Subscription#_Google_Apps_Events_Subscriptions_V1_Subscription__getTtl__): The time-to-live (TTL) or duration of the subscription. |

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