class Google::Apis::PubsubV1beta2::Message

A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.

Attributes

attributes[RW]

Optional attributes for this message. Corresponds to the JSON property `attributes` @return [Hash<String,String>]

data[RW]

The message payload. For JSON requests, the value of this field must be base64- encoded. Corresponds to the JSON property `data` @return [String]

message_id[RW]

ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call. Corresponds to the JSON property `messageId` @return [String]

publish_time[RW]

The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a ` Publish` call. Corresponds to the JSON property `publishTime` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/pubsub_v1beta2/classes.rb, line 244
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/pubsub_v1beta2/classes.rb, line 249
def update!(**args)
  @data = args[:data] unless args[:data].nil?
  @attributes = args[:attributes] unless args[:attributes].nil?
  @message_id = args[:message_id] unless args[:message_id].nil?
  @publish_time = args[:publish_time] unless args[:publish_time].nil?
end