Class: Google::Apis::PubsubV1::PullRequest
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::PullRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
Request for the Pull method.
Instance Attribute Summary collapse
-
#max_messages ⇒ Fixnum
Required.
-
#return_immediately ⇒ Boolean
(also: #return_immediately?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PullRequest
constructor
A new instance of PullRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PullRequest
Returns a new instance of PullRequest.
1065 1066 1067 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1065 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_messages ⇒ Fixnum
Required. 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
1051 1052 1053 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1051 def @max_messages end |
#return_immediately ⇒ Boolean Also known as: return_immediately?
Optional. 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. Warning: setting
this field to true is discouraged because it adversely impacts the
performance of Pull operations. We recommend that users do not set this
field.
Corresponds to the JSON property returnImmediately
1062 1063 1064 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1062 def return_immediately @return_immediately end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1070 1071 1072 1073 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1070 def update!(**args) @max_messages = args[:max_messages] if args.key?(:max_messages) @return_immediately = args[:return_immediately] if args.key?(:return_immediately) end |