Class: Google::Apis::CloudschedulerV1beta1::PubsubTarget

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudscheduler_v1beta1/classes.rb,
generated/google/apis/cloudscheduler_v1beta1/representations.rb,
generated/google/apis/cloudscheduler_v1beta1/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

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PubsubTarget

Returns a new instance of PubsubTarget.



770
771
772
# File 'generated/google/apis/cloudscheduler_v1beta1/classes.rb', line 770

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

Instance Attribute Details

#attributesHash<String,String>

Attributes for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. Corresponds to the JSON property attributes

Returns:

  • (Hash<String,String>)


749
750
751
# File 'generated/google/apis/cloudscheduler_v1beta1/classes.rb', line 749

def attributes
  @attributes
end

#dataString

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.

Returns:

  • (String)


757
758
759
# File 'generated/google/apis/cloudscheduler_v1beta1/classes.rb', line 757

def data
  @data
end

#topic_nameString

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 PubSub'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

Returns:

  • (String)


768
769
770
# File 'generated/google/apis/cloudscheduler_v1beta1/classes.rb', line 768

def topic_name
  @topic_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



775
776
777
778
779
# File 'generated/google/apis/cloudscheduler_v1beta1/classes.rb', line 775

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