Google Cloud Storage Transfer V1 Client - Class NotificationConfig (1.5.0)

Reference documentation and code samples for the Google Cloud Storage Transfer V1 Client class 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 values
  • "payloadFormat": one of the PayloadFormat values
  • "projectId": the project_id of the TransferOperation
  • "transferJobName": the transfer_job_name of the TransferOperation
  • "transferOperationName": the name of the TransferOperation The PubsubMessage.data contains a TransferOperation resource formatted according to the specified PayloadFormat.

Generated from protobuf message google.storagetransfer.v1.NotificationConfig

Namespace

Google \ Cloud \ StorageTransfer \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ pubsub_topic 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 error.

↳ event_types array

Event types for which a notification is desired. If empty, send notifications for all event types.

↳ payload_format int

Required. The desired format of the notification message payloads.

getPubsubTopic

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 error.

Returns
Type Description
string

setPubsubTopic

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 error.

Parameter
Name Description
var string
Returns
Type Description
$this

getEventTypes

Event types for which a notification is desired. If empty, send notifications for all event types.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setEventTypes

Event types for which a notification is desired. If empty, send notifications for all event types.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getPayloadFormat

Required. The desired format of the notification message payloads.

Returns
Type Description
int

setPayloadFormat

Required. The desired format of the notification message payloads.

Parameter
Name Description
var int
Returns
Type Description
$this