Class: Google::Apis::PubsubV1beta1a::PullBatchRequest

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

Request for the PullBatch method.

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

Returns a new instance of PullBatchRequest



422
423
424
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 422

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

Instance Attribute Details

#max_eventsFixnum

The maximum number of PubsubEvents returned for this request. The Pub/Sub system may return fewer than the number of events specified. Corresponds to the JSON property maxEvents

Returns:

  • (Fixnum)


405
406
407
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 405

def max_events
  @max_events
end

#return_immediatelyBoolean Also known as: return_immediately?

If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response. Corresponds to the JSON property returnImmediately

Returns:

  • (Boolean)


414
415
416
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 414

def return_immediately
  @return_immediately
end

#subscriptionString

The subscription from which messages should be pulled. Corresponds to the JSON property subscription

Returns:

  • (String)


420
421
422
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 420

def subscription
  @subscription
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



427
428
429
430
431
# File 'generated/google/apis/pubsub_v1beta1a/classes.rb', line 427

def update!(**args)
  @max_events = args[:max_events] if args.key?(:max_events)
  @return_immediately = args[:return_immediately] if args.key?(:return_immediately)
  @subscription = args[:subscription] if args.key?(:subscription)
end