# Storage Transfer Service V1 API - Class Google::Cloud::StorageTransfer::V1::NotificationConfig (v1.11.0)

1.11.0 (latest) 1.10.0 1.9.0 1.8.1 1.7.0 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.1 1.0.0 0.10.0 0.9.2 0.8.0 0.7.0 0.6.1 0.5.0 0.4.0 0.3.0 0.2.0 0.1.2 Reference documentation and code samples for the Storage Transfer Service V1 API class Google::Cloud::StorageTransfer::V1::NotificationConfig.

Specification to configure notifications published to Pub/Sub.
Notifications are published to the customer-provided topic using the
following `PubsubMessage.attributes`:


- `"eventType"`: one of the [EventType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType "Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType (module)") values
- `"payloadFormat"`: one of the [PayloadFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat "Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat (module)") values
- `"projectId"`: the [project_id](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation#Google__Cloud__StorageTransfer__V1__TransferOperation_project_id_instance_ "Google::Cloud::StorageTransfer::V1::TransferOperation#project_id (method)") of the `TransferOperation`
- `"transferJobName"`: the [transfer_job_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation#Google__Cloud__StorageTransfer__V1__TransferOperation_transfer_job_name_instance_ "Google::Cloud::StorageTransfer::V1::TransferOperation#transfer_job_name (method)") of the `TransferOperation`
- `"transferOperationName"`: the [name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation#Google__Cloud__StorageTransfer__V1__TransferOperation_name_instance_ "Google::Cloud::StorageTransfer::V1::TransferOperation#name (method)") of the `TransferOperation`

<br />

The `PubsubMessage.data` contains a
[TransferOperation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-TransferOperation "Google::Cloud::StorageTransfer::V1::TransferOperation (class)") resource
formatted according to the specified `PayloadFormat`.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #event_types

    def event_types() -> ::Array<::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType>

**Returns**

- (::Array\<[::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType)\>) --- Event types for which a notification is desired. If empty, send notifications for all event types.

### #event_types=

    def event_types=(value) -> ::Array<::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType>

**Parameter**

- **value** (::Array\<[::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType)\>) --- Event types for which a notification is desired. If empty, send notifications for all event types.
**Returns**

- (::Array\<[::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-EventType)\>) --- Event types for which a notification is desired. If empty, send notifications for all event types.

### #payload_format

    def payload_format() -> ::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat

**Returns**

- ([::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat)) --- Required. The desired format of the notification message payloads.

### #payload_format=

    def payload_format=(value) -> ::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat

**Parameter**

- **value** ([::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat)) --- Required. The desired format of the notification message payloads.
**Returns**

- ([::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Cloud-StorageTransfer-V1-NotificationConfig-PayloadFormat)) --- Required. The desired format of the notification message payloads.

### #pubsub_topic

    def pubsub_topic() -> ::String

**Returns**

- (::String) --- Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT "Google::Rpc::Code::INVALID_ARGUMENT (constant)") error.

### #pubsub_topic=

    def pubsub_topic=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT "Google::Rpc::Code::INVALID_ARGUMENT (constant)") error.
**Returns**

- (::String) --- Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an [INVALID_ARGUMENT](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-storage_transfer-v1/latest/Google-Rpc-Code#Google__Rpc__Code__INVALID_ARGUMENT "Google::Rpc::Code::INVALID_ARGUMENT (constant)") error.