# Class NotificationMetadata (3.7.0-rc)

3.7.0-rc 3.6.0 (latest) 3.5.0 3.4.0 3.3.0 3.2.0 2.48.0-rc 2.47.1 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.0 2.22.1 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.1 2.14.0 2.13.0 2.12.0 2.11.0 Represents the metadata for a Google Cloud Storage Notification resource.
Notifications send information about changes to objects in your buckets to Cloud Pub/Sub.

###### See Also

<https://cloud.google.com/storage/docs/pubsub-notifications> for general information on Google Cloud Storage Notifications.

###### See Also

<https://cloud.google.com/pubsub/> for general information on Google Cloud Pub/Sub service.

## Constructors

### NotificationMetadata()

### NotificationMetadata(std::string, std::string)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `id` | `std::string` |
| `etag` | `std::string` |

## Functions

### has_custom_attribute(std::string const \&) const

Delete a custom attribute. This is a no-op if the key does not exist.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `std::string const &` |

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

### custom_attribute(std::string const \&) const

Delete a custom attribute. This is a no-op if the key does not exist.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `std::string const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### delete_custom_attribute(std::string const \&)

Delete a custom attribute. This is a no-op if the key does not exist.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `std::string const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `NotificationMetadata &` |   |

### upsert_custom_attributes(std::string, std::string)

Insert or update the custom attribute.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `std::string` |
| `value` | `std::string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `NotificationMetadata &` |   |

### custom_attributes() const

Full accessors for the custom attributes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::map< std::string, std::string > const &` |   |

### mutable_custom_attributes()

Delete a custom attribute. This is a no-op if the key does not exist.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::map< std::string, std::string > &` |   |

### event_type_size() const

Accessors and modifiers to the event types list.
Define the list of event types that this notification will include.

###### See Also

<https://cloud.google.com/storage/docs/pubsub-notifications#events> for a description of valid even types.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::size_t` |   |

### event_type(std::size_t) const

Accessors and modifiers to the event types list.
Define the list of event types that this notification will include.

###### See Also

<https://cloud.google.com/storage/docs/pubsub-notifications#events> for a description of valid even types.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `std::size_t` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### append_event_type(std::string)

Accessors and modifiers to the event types list.
Define the list of event types that this notification will include.

###### See Also

<https://cloud.google.com/storage/docs/pubsub-notifications#events> for a description of valid even types.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `e` | `std::string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `NotificationMetadata &` |   |

### event_types() const

Accessors and modifiers to the event types list.
Define the list of event types that this notification will include.

###### See Also

<https://cloud.google.com/storage/docs/pubsub-notifications#events> for a description of valid even types.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::vector< std::string > const &` |   |

### mutable_event_types()

Accessors and modifiers to the event types list.
Define the list of event types that this notification will include.

###### See Also

<https://cloud.google.com/storage/docs/pubsub-notifications#events> for a description of valid even types.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::vector< std::string > &` |   |

### JsonPayloadForInsert() const

Returns the payload for a call to `Notifications: insert`.

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

### etag() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### id() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### kind() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### object_name_prefix() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### set_object_name_prefix(std::string)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `std::string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `NotificationMetadata &` |   |

### payload_format() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### set_payload_format(std::string)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `std::string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `NotificationMetadata &` |   |

### self_link() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### topic() const

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::string const &` |   |

### set_topic(std::string)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `v` | `std::string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `NotificationMetadata &` |   |