You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: error_list.rb
    path of file: ./repos/aws-sdk-ruby/build_tools/aws-sdk-code-generator/lib/aws-sdk-code-generator
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module AwsSdkCodeGenerator
  class ErrorList

    include Enumerable

    def initialize(options)
      @api = options[:api]
      @module_name = options[:module_name]
      @errors = @api['shapes'].inject([]) do |es, (name, shape)|
        # only generate error shape with non empty members
        # excluding event shapes marked as error
        if error_struct?(shape)
          members = shape['members'].inject([]) do |arr, (k, v)|
            arr << {
      
    
    def initialize(options)
      @api = options[:api]
      @module_name = options[:module_name]
      @errors = @api['shapes'].inject([]) do |es, (name, shape)|
        # only generate error shape with non empty members
        # excluding event shapes marked as error
        if error_struct?(shape)
          members = shape['members'].inject([]) do |arr, (k, v)|
            arr << {
              name: Underscore.underscore(k),
              type: Docstring.ucfirst(v['type'] ||'String'),
              shared: k.downcase == 'message' || k.downcase == 'code'
            }
            arr
          end
          es << Error.new(
            name: name,
            members: members,
            data_type: "#{@module_name}::Types::#{name}",
            retryable: !!shape['retryable'],
            throttling: throttling?(shape)
          )
        end
        es
      end