Class: Google::Apis::PubsubV1::PullRequest

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

Request for the Pull 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) ⇒ PullRequest

Returns a new instance of PullRequest.



781
782
783
# File 'generated/google/apis/pubsub_v1/classes.rb', line 781

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

Instance Attribute Details

#max_messagesFixnum

The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified. Corresponds to the JSON property maxMessages

Returns:

  • (Fixnum)


770
771
772
# File 'generated/google/apis/pubsub_v1/classes.rb', line 770

def max_messages
  @max_messages
end

#return_immediatelyBoolean Also known as: return_immediately?

If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Corresponds to the JSON property returnImmediately

Returns:

  • (Boolean)


778
779
780
# File 'generated/google/apis/pubsub_v1/classes.rb', line 778

def return_immediately
  @return_immediately
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



786
787
788
789
# File 'generated/google/apis/pubsub_v1/classes.rb', line 786

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