Class: Google::Apis::PubsubV1beta2::PullRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/pubsub_v1beta2/classes.rb,
lib/google/apis/pubsub_v1beta2/representations.rb,
lib/google/apis/pubsub_v1beta2/representations.rb

Overview

Request for the Pull method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PullRequest

Returns a new instance of PullRequest.



579
580
581
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 579

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

Instance Attribute Details

#max_messagesFixnum

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

Returns:

  • (Fixnum)


565
566
567
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 565

def max_messages
  @max_messages
end

#return_immediatelyBoolean Also known as: return_immediately?

Optional. 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. 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

Returns:

  • (Boolean)


576
577
578
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 576

def return_immediately
  @return_immediately
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



584
585
586
587
# File 'lib/google/apis/pubsub_v1beta2/classes.rb', line 584

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