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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PubsubEvent

Returns a new instance of PubsubEvent



341
342
343
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 341

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)


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

def deleted
  @deleted
end

#messageGoogle::Apis::PubsubV1beta1a::PubsubMessage

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



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

def message
  @message
end

#subscriptionString

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

Returns:

  • (String)


333
334
335
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 333

def subscription
  @subscription
end

#truncatedBoolean Also known as: truncated?

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

Returns:

  • (Boolean)


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

def truncated
  @truncated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



346
347
348
349
350
351
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 346

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