Class: Google::Apis::PubsubV1::ReceivedMessage

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

Overview

A message and its corresponding acknowledgment ID.

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) ⇒ ReceivedMessage

Returns a new instance of ReceivedMessage



332
333
334
# File 'generated/google/apis/pubsub_v1/classes.rb', line 332

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

Instance Attribute Details

#ack_idString

This ID can be used to acknowledge the received message. Corresponds to the JSON property ackId

Returns:

  • (String)


330
331
332
# File 'generated/google/apis/pubsub_v1/classes.rb', line 330

def ack_id
  @ack_id
end

#messageGoogle::Apis::PubsubV1::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. Corresponds to the JSON property message



325
326
327
# File 'generated/google/apis/pubsub_v1/classes.rb', line 325

def message
  @message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



337
338
339
340
# File 'generated/google/apis/pubsub_v1/classes.rb', line 337

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