Class: Aws::DynamoDB::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/dynamodb.rb

Instance Method Summary collapse

Instance Method Details

#data_to_http_resp(operation_name, data) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/aws-sdk-core/dynamodb.rb', line 16

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

#stub_data(operation_name, data = {}) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/aws-sdk-core/dynamodb.rb', line 26

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