class Aws::Query::Handler

def apply_params(param_list, params, rules)

def apply_params(param_list, params, rules)
  ParamBuilder.new(param_list).apply(rules, params)
end

def build_request(context)

def build_request(context)
  context.http_request.http_method = 'POST'
  context.http_request.headers['Content-Type'] = CONTENT_TYPE
  param_list = ParamList.new
  param_list.set('Version', context.config.api.version)
  param_list.set('Action', context.operation.name)
  if input_shape = context.operation.input
    apply_params(param_list, context.params, input_shape)
  end
  context.http_request.body = param_list.to_io
end

def call(context)

Returns:
  • (Seahorse::Client::Response) -

Parameters:
  • context (Seahorse::Client::RequestContext) --
def call(context)
  build_request(context)
  @handler.call(context).on_success do |response|
    response.error = nil
    parsed = parse_xml(context)
    if parsed.nil? || parsed == EmptyStructure
      response.data = EmptyStructure.new
    else
      response.data = parsed
    end
  end
end

def parse_xml(context)

def parse_xml(context)
  data = Xml::Parser.new(rules(context)).parse(xml(context))
  remove_wrapper(data, context)
end

def remove_wrapper(data, context)

def remove_wrapper(data, context)
  if context.operation.output
    if data.response_metadata
      context[:request_id] = data.response_metadata.request_id
    end
    data.result || Structure.new(*context.operation.output.shape.member_names)
  else
    data
  end
end

def rules(context)

def rules(context)
  shape = Seahorse::Model::Shapes::StructureShape.new
  if context.operation.output
    shape.add_member(:result, ShapeRef.new(
      shape: context.operation.output.shape,
      location_name: context.operation.name + 'Result'
    ))
  end
  shape.struct_class = WRAPPER_STRUCT
  shape.add_member(:response_metadata, METADATA_REF)
  ShapeRef.new(shape: shape)
end

def xml(context)

def xml(context)
  context.http_response.body_contents
end