Class: Google::Apis::CloudschedulerV1::PubsubTarget
- Inherits:
-
Object
- Object
- Google::Apis::CloudschedulerV1::PubsubTarget
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudscheduler_v1/classes.rb,
lib/google/apis/cloudscheduler_v1/representations.rb,
lib/google/apis/cloudscheduler_v1/representations.rb
Overview
Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash<String,String>
Attributes for PubsubMessage.
-
#data ⇒ String
The message payload for PubsubMessage.
-
#topic_name ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PubsubTarget
constructor
A new instance of PubsubTarget.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PubsubTarget
Returns a new instance of PubsubTarget.
865 866 867 |
# File 'lib/google/apis/cloudscheduler_v1/classes.rb', line 865 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Hash<String,String>
Attributes for PubsubMessage. Pubsub message must contain either non-empty
data, or at least one attribute.
Corresponds to the JSON property attributes
846 847 848 |
# File 'lib/google/apis/cloudscheduler_v1/classes.rb', line 846 def attributes @attributes end |
#data ⇒ String
The message payload for PubsubMessage. Pubsub message must contain either non-
empty data, or at least one attribute.
Corresponds to the JSON property data
NOTE: Values are automatically base64 encoded/decoded in the client library.
853 854 855 |
# File 'lib/google/apis/cloudscheduler_v1/classes.rb', line 853 def data @data end |
#topic_name ⇒ String
Required. The name of the Cloud Pub/Sub topic to which messages will be
published when a job is delivered. The topic name must be in the same format
as required by Pub/Sub's PublishRequest.name, for example projects/
PROJECT_ID/topics/TOPIC_ID
. The topic must be in the same project as the
Cloud Scheduler job.
Corresponds to the JSON property topicName
863 864 865 |
# File 'lib/google/apis/cloudscheduler_v1/classes.rb', line 863 def topic_name @topic_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
870 871 872 873 874 |
# File 'lib/google/apis/cloudscheduler_v1/classes.rb', line 870 def update!(**args) @attributes = args[:attributes] if args.key?(:attributes) @data = args[:data] if args.key?(:data) @topic_name = args[:topic_name] if args.key?(:topic_name) end |