Class: Google::Apis::PubsubV1beta2::ReceivedMessage

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

Overview

A message and its corresponding acknowledgment ID.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReceivedMessage

Returns a new instance of ReceivedMessage.



673
674
675
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 673

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)


665
666
667
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 665

def ack_id
  @ack_id
end

#messageGoogle::Apis::PubsubV1beta2::PubsubMessage

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



671
672
673
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 671

def message
  @message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



678
679
680
681
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 678

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