Sha256: d97edc3a6b69b6aa044f9f1bc965d2683610fe42f34e69383069075de7774e95

Contents?: true

Size: 731 Bytes

Versions: 55

Compression:

Stored size: 731 Bytes

Contents

module Seahorse
  module Client
    module Plugins

      # @seahorse.client.option [Boolean] :convert_params (true)
      #   When `true`, an attempt is made to coerce request parameters
      #   into the required types.
      class ParamConversion < Plugin

        option(:convert_params, true)

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

        class Handler < Client::Handler

          def call(context)
            if input = context.operation.input
              context.params = ParamConverter.convert(input, context.params)
            end
            @handler.call(context)
          end

        end
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
aws-sdk-core-2.0.8 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.7 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.6 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.5 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.4 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.3 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.2 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.1 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.0 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.0.rc16 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.0.rc15 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.0.rc14 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.0.rc13 vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.0.rc12 vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.0.rc11 vendor/seahorse/lib/seahorse/client/plugins/param_conversion.rb