Sha256: 14418f004c6aee99cde51ec76a02a74f30014c87ce3b9d70ac0ad625a4debc83

Contents?: true

Size: 1.37 KB

Versions: 940

Compression:

Stored size: 1.37 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",
  examples: "#{Aws::API_DIR}/dynamodb/2012-08-10/examples-1.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

940 entries across 940 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.612 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.611 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.610 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.609 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.608 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.607 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.606 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.605 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.604 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.603 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.602 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.601 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.600 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.599 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.598 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.597 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.596 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.595 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.594 lib/aws-sdk-core/dynamodb.rb
aws-sdk-core-2.11.593 lib/aws-sdk-core/dynamodb.rb