module AWS::Core::Collection::Batchable

def _each_response options, limit, batch_size, &block

def _each_response options, limit, batch_size, &block
  next_token = nil
  begin
    page_opts = {}
    page_opts[next_token_key] = next_token if next_token
    response = client.send(request_method, options.merge(page_opts))
    yield(response)
    next_token = _next_token_for(response)
  end until next_token.nil?
  
  nil
end