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.48 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.47 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.46 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.45 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.44 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.43 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.42 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.41 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.40 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.39 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.38 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.37 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.36 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.35 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.34 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.33 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.32 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.31 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.30 lib/seahorse/client/plugins/param_conversion.rb
aws-sdk-core-2.0.29 lib/seahorse/client/plugins/param_conversion.rb