Sha256: f9aeb6e4858c27bf26e5935f54c532419269286467e3a8d7a570ea3724f3c33e

Contents?: true

Size: 943 Bytes

Versions: 44

Compression:

Stored size: 943 Bytes

Contents

# frozen_string_literal: true

module Aws
  module DynamoDB
    class Client

      def stub_data(operation_name, data = {})
        if config.simple_attributes
          rules = config.api.operation(operation_name).output
          translator = Plugins::SimpleAttributes::ValueTranslator
          data = translator.apply(rules, :marshal, data)
          data = super(operation_name, data)
          translator.apply(rules, :unmarshal, data)
        else
          super
        end
      end

      private

      def data_to_http_resp(operation_name, data)
        api = config.api
        operation = api.operation(operation_name)
        translator = Plugins::SimpleAttributes::ValueTranslator
        translator = translator.new(operation.output, :marshal)
        data = translator.apply(data)
        ParamValidator.validate!(operation.output, data)
        protocol_helper.stub_data(api, operation, data)
      end

    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
aws-sdk-dynamodb-1.93.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.92.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.91.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.90.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.89.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.88.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.87.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.86.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.85.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.84.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.83.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.82.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.81.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.80.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.79.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.78.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.77.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.76.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.75.0 lib/aws-sdk-dynamodb/customizations/client.rb
aws-sdk-dynamodb-1.74.0 lib/aws-sdk-dynamodb/customizations/client.rb