Sha256: e20010c8afa4004404fb17ee713c03e9b671f49cfb244206e959080204907fdc

Contents?: true

Size: 1.31 KB

Versions: 54

Compression:

Stored size: 1.31 KB

Contents

Aws.add_service(:DynamoDB, {
  api: "#{Aws::API_DIR}/dynamodb/2012-08-10/api-2.json",
  docs: "#{Aws::API_DIR}/dynamodb/2012-08-10/docs-2.json",
  paginators: "#{Aws::API_DIR}/dynamodb/2012-08-10/paginators-1.json",
  resources: "#{Aws::API_DIR}/dynamodb/2012-08-10/resources-1.json",
  waiters: "#{Aws::API_DIR}/dynamodb/2012-08-10/waiters-2.json",
})

module Aws
  module DynamoDB
    autoload :AttributeValue, 'aws-sdk-core/dynamodb/attribute_value'

    class Client

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

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

    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
aws-sdk-core-2.2.20 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.19 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.18 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.17 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.16 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.15 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.14 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.13 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.12 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.11 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.10 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.9 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.8 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.7 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.6 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.5 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.4 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.3 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.2 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.2.1 lib/aws-sdk-core/dynamodb.rb