# File lib/aws/core/rest_request_builder.rb, line 22 def initialize operation, options = {} @http = operation[:http] @rules = operation[:inputs] @validator = Options::Validator.new(@rules) @serializer = case options[:format] when :xml namespace = options[:xmlnamespace] name = operation[:name] Options::XMLSerializer.new(namespace, name, operation) when :json Options::JSONSerializer.new(@rules, @http[:request_payload]) else raise ArgumentError, "unhandled format: #{options[:format]}" end end