Sha256: d61da406aedccc9c1e5c3b5a348fe9435d2dd9de6c3656614a5eb2cd62948b74

Contents?: true

Size: 836 Bytes

Versions: 199

Compression:

Stored size: 836 Bytes

Contents

# frozen_string_literal: true

module Aws
  module Plugins
    # @api private
    class ParamConverter < Seahorse::Client::Plugin

      option(:convert_params,
         default: true,
         doc_type: 'Boolean',
         docstring: <<-DOCS
When `true`, an attempt is made to coerce request parameters into
the required types.
         DOCS
      )

      def add_handlers(handlers, config)
        handlers.add(Handler, step: :initialize) if config.convert_params
      end

      class Handler < Seahorse::Client::Handler

        def call(context)
          converter = Aws::ParamConverter.new(context.operation.input)
          context.params = converter.convert(context.params)
          @handler.call(context).on_complete do |resp|
            converter.close_opened_files
          end
        end

      end
    end
  end
end

Version data entries

199 entries across 199 versions & 1 rubygems

Version Path
aws-sdk-core-3.172.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.171.1 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.171.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.170.1 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.170.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.169.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.168.4 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.168.3 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.168.2 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.168.1 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.168.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.167.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.166.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.165.1 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.165.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.164.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.163.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.162.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.161.0 lib/aws-sdk-core/plugins/param_converter.rb
aws-sdk-core-3.160.0 lib/aws-sdk-core/plugins/param_converter.rb