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

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
NameDescription
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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getEventTypes

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setEventTypes

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

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getPayloadFormat

Required. The desired format of the notification message payloads.

Returns
TypeDescription
int

setPayloadFormat

Required. The desired format of the notification message payloads.

Parameter
NameDescription
var int
Returns
TypeDescription
$this