Class: Google::Apis::PubsubV1beta1a::PublishRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/pubsub_v1beta1a/classes.rb,
generated/google/apis/pubsub_v1beta1a/representations.rb,
generated/google/apis/pubsub_v1beta1a/representations.rb

Overview

Request for the Publish method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PublishRequest

Returns a new instance of PublishRequest.



302
303
304
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 302

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

Instance Attribute Details

#messageGoogle::Apis::PubsubV1beta1a::PubsubMessage

A message data and its labels. Corresponds to the JSON property message



295
296
297
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 295

def message
  @message
end

#topicString

The message in the request will be published on this topic. Corresponds to the JSON property topic

Returns:

  • (String)


300
301
302
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 300

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



307
308
309
310
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 307

def update!(**args)
  @message = args[:message] if args.key?(:message)
  @topic = args[:topic] if args.key?(:topic)
end