class Aws::DynamoDB::Plugins::SimpleAttributes::Handler
def call(context)
def call(context) context.params = translate_input(context) @handler.call(context).on(200) do |response| response.data = translate_output(response) end rescue Aws::Errors::ServiceError => e e.data = translate_error_data(context, e.data) raise e end
def translate_error_data(context, error_data)
def translate_error_data(context, error_data) shape = context.operation.errors.find do |e| error_data.is_a?(e.shape.struct_class) end if shape ValueTranslator.new(shape, :unmarshal).apply(error_data) else error_data end end
def translate_input(context)
def translate_input(context) if (shape = context.operation.input) ValueTranslator.new(shape, :marshal).apply(context.params) else context.params end end
def translate_output(response)
def translate_output(response) if (shape = response.context.operation.output) ValueTranslator.new(shape, :unmarshal).apply(response.data) else response.data end end