Class: Google::Apis::StoragetransferV1::NotificationConfig
- Inherits:
-
Object
- Object
- Google::Apis::StoragetransferV1::NotificationConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/storagetransfer_v1/classes.rb,
lib/google/apis/storagetransfer_v1/representations.rb,
lib/google/apis/storagetransfer_v1/representations.rb
Overview
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
.
Instance Attribute Summary collapse
-
#event_types ⇒ Array<String>
Event types for which a notification is desired.
-
#payload_format ⇒ String
Required.
-
#pubsub_topic ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NotificationConfig
constructor
A new instance of NotificationConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NotificationConfig
Returns a new instance of NotificationConfig.
919 920 921 |
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 919 def initialize(**args) update!(**args) end |
Instance Attribute Details
#event_types ⇒ Array<String>
Event types for which a notification is desired. If empty, send notifications
for all event types.
Corresponds to the JSON property eventTypes
905 906 907 |
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 905 def event_types @event_types end |
#payload_format ⇒ String
Required. The desired format of the notification message payloads.
Corresponds to the JSON property payloadFormat
910 911 912 |
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 910 def payload_format @payload_format end |
#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.
Corresponds to the JSON propertypubsubTopic`
917 918 919 |
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 917 def pubsub_topic @pubsub_topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
924 925 926 927 928 |
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 924 def update!(**args) @event_types = args[:event_types] if args.key?(:event_types) @payload_format = args[:payload_format] if args.key?(:payload_format) @pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic) end |