class Aws::Stubbing::Protocols::Json

def build_body(operation, data)

def build_body(operation, data)
  Aws::Json::Builder.new(operation.output).to_json(data)
end

def content_type(api)

def content_type(api)
  "application/x-amz-json-#{api.metadata['jsonVersion']}"
end

def stub_data(api, operation, data)

def stub_data(api, operation, data)
  resp = Seahorse::Client::Http::Response.new
  resp.status_code = 200
  resp.headers["Content-Type"] = content_type(api)
  resp.headers["x-amzn-RequestId"] = "stubbed-request-id"
  resp.body = build_body(operation, data)
  resp
end

def stub_error(error_code)

def stub_error(error_code)
  http_resp = Seahorse::Client::Http::Response.new
  http_resp.status_code = 400
  http_resp.body = <<-JSON.strip
: #{error_code.inspect},
ge": "stubbed-response-error-message"
  JSON
  http_resp
end