Class: Google::Apis::StoragetransferV1::NotificationConfig

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NotificationConfig

Returns a new instance of NotificationConfig.



849
850
851
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 849

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#event_typesArray<String>

Event types for which a notification is desired. If empty, send notifications for all event types. Corresponds to the JSON property eventTypes

Returns:

  • (Array<String>)


835
836
837
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 835

def event_types
  @event_types
end

#payload_formatString

Required. The desired format of the notification message payloads. Corresponds to the JSON property payloadFormat

Returns:

  • (String)


840
841
842
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 840

def payload_format
  @payload_format
end

#pubsub_topicString

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`

Returns:

  • (String)


847
848
849
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 847

def pubsub_topic
  @pubsub_topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



854
855
856
857
858
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 854

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