# Google Cloud Advisory Notifications V1 Client - Class Notification (1.2.4)

1.2.4 (latest) 1.2.3 1.1.1 1.0.3 0.8.3 0.7.0 0.6.0 0.5.1 0.4.0 0.3.2 0.2.1 0.1.0 Reference documentation and code samples for the Google Cloud Advisory Notifications V1 Client class Notification.

A notification object for notifying customers about security and privacy
issues.

Generated from protobuf message `google.cloud.advisorynotifications.v1.Notification`

## Namespace

Google \\ Cloud \\ AdvisoryNotifications \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}. |
| `↳ subject` | `https://docs.cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest/V1.Subject` The subject line of the notification. |
| `↳ messages` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest/V1.Message>` A list of messages in the notification. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Time the notification was created. |
| `↳ notification_type` | `int` Type of notification |

### getName

The resource name of the notification.

Format:
organizations/{organization}/locations/{location}/notifications/{notification}
or projects/{project}/locations/{location}/notifications/{notification}.

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

### setName

The resource name of the notification.

Format:
organizations/{organization}/locations/{location}/notifications/{notification}
or projects/{project}/locations/{location}/notifications/{notification}.

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

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

### getSubject

The subject line of the notification.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest/V1.Subject|null` |   |

### hasSubject

### clearSubject

### setSubject

The subject line of the notification.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest/V1.Subject` |

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

### getMessages

A list of messages in the notification.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest/V1.Message>` |   |

### setMessages

A list of messages in the notification.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest/V1.Message>` |

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

### getCreateTime

Output only. Time the notification was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Time the notification was created.

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

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

### getNotificationType

Type of notification

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

### setNotificationType

Type of notification

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

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