Class: Google::Apis::PubsubV1beta1a::PubsubEvent

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

An event indicating a received message or truncation event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PubsubEvent

Returns a new instance of PubsubEvent.



329
330
331
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 329

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

Instance Attribute Details

#deletedBoolean Also known as: deleted?

Indicates that this subscription has been deleted. (Note that pull subscribers will always receive NOT_FOUND in response in their pull request on the subscription, rather than seeing this boolean.) Corresponds to the JSON property deleted

Returns:

  • (Boolean)


310
311
312
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 310

def deleted
  @deleted
end

#messageGoogle::Apis::PubsubV1beta1a::PubsubMessage

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



316
317
318
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 316

def message
  @message
end

#subscriptionString

The subscription that received the event. Corresponds to the JSON property subscription

Returns:

  • (String)


321
322
323
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 321

def subscription
  @subscription
end

#truncatedBoolean Also known as: truncated?

Indicates that this subscription has been truncated. Corresponds to the JSON property truncated

Returns:

  • (Boolean)


326
327
328
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 326

def truncated
  @truncated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



334
335
336
337
338
339
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 334

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