A read-only set of configuration used by the QueuePoller.
@api private
@api private
@return [Proc,nil]
@return [Integer,nil]
@return [Hash]
@return [Boolean]
# File lib/aws-sdk-resources/services/sqs/queue_poller.rb, line 479 def initialize(options) @idle_timeout = nil @skip_delete = false @before_request = nil @request_params = { wait_time_seconds: 20, max_number_of_messages: 1, visibility_timeout: nil, attribute_names: ['All'], message_attribute_names: ['All'], } options.each do |opt_name, value| if CONFIG_OPTIONS.include?(opt_name) instance_variable_set("@#{opt_name}", value) elsif PARAM_OPTIONS.include?(opt_name) @request_params[opt_name] = value else raise ArgumentError, "invalid option #{opt_name.inspect}" end end @request_params.freeze freeze end
@return [PollerConfig] Returns a new {PollerConfig} instance
with the given options applied.
# File lib/aws-sdk-resources/services/sqs/queue_poller.rb, line 505 def with(options) self.class.new(to_h.merge(options)) end
# File lib/aws-sdk-resources/services/sqs/queue_poller.rb, line 511 def to_h hash = {} CONFIG_OPTIONS.each { |key| hash[key] = send(key) } PARAM_OPTIONS.each { |key| hash[key] = @request_params[key] } hash end