# File lib/fog/aws/requests/dns/list_hosted_zones.rb, line 50
        def list_hosted_zones(options = {})
          maxitems = [options[:max_items]||100,100].min

          if options[:marker].nil?
            start = 0
          else
            start = self.data[:zones].find_index {|z| z[:id] == options[:marker]}
          end

          zones     = self.data[:zones].values[start, maxitems]
          next_zone = self.data[:zones].values[start + maxitems]
          truncated = !next_zone.nil?

          response = Excon::Response.new
          response.status = 200
          response.body = {
            'HostedZones' => zones.map do |z|
              {
                'Id' => z[:id],
                'Name' => z[:name],
                'CallerReference' => z[:reference],
                'Comment' => z[:comment],
              }
            end,
            'Marker' => options[:marker].to_s,
            'MaxItems' => maxitems,
            'IsTruncated' => truncated
          }

          if truncated
            response.body['NextMarker'] = next_zone[:id]
          end

          response
        end