[ { "description": "Scalar members", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "ImaHeader": { "shape": "HeaderShape" }, "ImaHeaderLocation": { "shape": "HeaderShape", "locationName": "X-Foo" }, "Str": { "shape": "StringType" }, "Num": { "shape": "IntegerType", "locationName": "FooNum" }, "FalseBool": { "shape": "BooleanType" }, "TrueBool": { "shape": "BooleanType" }, "Float": { "shape": "FloatType" }, "Double": { "shape": "DoubleType" }, "Long": { "shape": "LongType" }, "Char": { "shape": "CharType" }, "Timestamp": { "shape": "TimestampType" } } }, "StringType": { "type": "string" }, "IntegerType": { "type": "integer" }, "BooleanType": { "type": "boolean" }, "FloatType": { "type": "float" }, "DoubleType": { "type": "double" }, "LongType": { "type": "long" }, "CharType": { "type": "character" }, "HeaderShape": { "type": "string", "location": "header" }, "StatusShape": { "type": "integer", "location": "statusCode" }, "TimestampType": { "type": "timestamp" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "ImaHeader": "test", "ImaHeaderLocation": "abc", "Str": "myname", "Num": 123, "FalseBool": false, "TrueBool": true, "Float": 1.2, "Double": 1.3, "Long": 200, "Char": "a", "Timestamp": 1422172800 }, "response": { "status_code": 200, "headers": { "ImaHeader": "test", "X-Foo": "abc" }, "body": "myname123falsetrue1.21.3200a2015-01-25T08:00:00Z" } }, { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "ImaHeader": "test", "ImaHeaderLocation": "abc", "Str": "", "Num": 123, "FalseBool": false, "TrueBool": true, "Float": 1.2, "Double": 1.3, "Long": 200, "Char": "a", "Timestamp": 1422172800 }, "response": { "status_code": 200, "headers": { "ImaHeader": "test", "X-Foo": "abc" }, "body": "123falsetrue1.21.3200a2015-01-25T08:00:00Z" } } ] }, { "description": "Blob", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "Blob": { "shape": "BlobType" } } }, "BlobType": { "type": "blob" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Blob": "value" }, "response": { "status_code": 200, "headers": {}, "body": "dmFsdWU=" } } ] }, { "description": "Lists", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "ListMember": { "shape": "ListShape" } } }, "ListShape": { "type": "list", "member": { "shape": "StringType" } }, "StringType": { "type": "string" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "ListMember": ["abc", "123"] }, "response": { "status_code": 200, "headers": {}, "body": "abc123" } } ] }, { "description": "List with custom member name", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "ListMember": { "shape": "ListShape" } } }, "ListShape": { "type": "list", "member": { "shape": "StringType", "locationName": "item" } }, "StringType": { "type": "string" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "ListMember": ["abc", "123"] }, "response": { "status_code": 200, "headers": {}, "body": "abc123" } } ] }, { "description": "Flattened List", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "ListMember": { "shape": "StringList", "flattened": true } } }, "StringList": { "type": "list", "member": { "shape": "StringType" } }, "StringType": { "type": "string" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "ListMember": ["abc", "123"] }, "response": { "status_code": 200, "headers": {}, "body": "abc123" } } ] }, { "description": "Normal map", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "Map": { "shape": "StringMap" } } }, "StringMap": { "type": "map", "key": { "shape": "StringType" }, "value": { "shape": "SingleStructure" } }, "SingleStructure": { "type": "structure", "members": { "foo": { "shape": "StringType" } } }, "StringType": { "type": "string" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Map": { "qux": { "foo": "bar" }, "baz": { "foo": "bam" } } }, "response": { "status_code": 200, "headers": {}, "body": "quxbarbazbam" } } ] }, { "description": "Flattened map", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "Map": { "shape": "StringMap", "flattened": true } } }, "StringMap": { "type": "map", "key": { "shape": "StringType" }, "value": { "shape": "StringType" } }, "StringType": { "type": "string" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Map": { "qux": "bar", "baz": "bam" } }, "response": { "status_code": 200, "headers": {}, "body": "quxbarbazbam" } } ] }, { "description": "Named map", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "Map": { "shape": "StringMap" } } }, "StringMap": { "type": "map", "key": { "shape": "StringType", "locationName": "foo" }, "value": { "shape": "StringType", "locationName": "bar" } }, "StringType": { "type": "string" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Map": { "qux": "bar", "baz": "bam" } }, "response": { "status_code": 200, "headers": {}, "body": "quxbarbazbam" } } ] }, { "description": "XML payload", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "payload": "Data", "members": { "Header": { "shape": "StringType", "location": "header", "locationName": "X-Foo" }, "Data": { "shape": "SingleStructure" } } }, "StringType": { "type": "string" }, "SingleStructure": { "type": "structure", "members": { "Foo": { "shape": "StringType" } } } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Header": "baz", "Data": { "Foo": "abc" } }, "response": { "status_code": 200, "headers": { "X-Foo": "baz" }, "body": "abc" } } ] }, { "description": "Streaming payload", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "payload": "Stream", "members": { "Stream": { "shape": "BlobStream" } } }, "BlobStream": { "type": "blob" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Stream": "abc" }, "response": { "status_code": 200, "headers": {}, "body": "abc" } } ] }, { "description": "Scalar members in headers", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "Str": { "locationName": "x-str", "shape": "StringHeaderType" }, "Integer": { "locationName": "x-int", "shape": "IntegerHeaderType" }, "TrueBool": { "locationName": "x-true-bool", "shape": "BooleanHeaderType" }, "FalseBool": { "locationName": "x-false-bool", "shape": "BooleanHeaderType" }, "Float": { "locationName": "x-float", "shape": "FloatHeaderType" }, "Double": { "locationName": "x-double", "shape": "DoubleHeaderType" }, "Long": { "locationName": "x-long", "shape": "LongHeaderType" }, "Char": { "locationName": "x-char", "shape": "CharHeaderType" }, "Timestamp": { "locationName": "x-timestamp", "shape": "TimestampHeaderType" } } }, "StringHeaderType": { "location": "header", "type": "string" }, "IntegerHeaderType": { "location": "header", "type": "integer" }, "BooleanHeaderType": { "location": "header", "type": "boolean" }, "FloatHeaderType": { "location": "header", "type": "float" }, "DoubleHeaderType": { "location": "header", "type": "double" }, "LongHeaderType": { "location": "header", "type": "long" }, "CharHeaderType": { "location": "header", "type": "character" }, "TimestampHeaderType": { "location": "header", "type": "timestamp" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Str": "string", "Integer": 1, "TrueBool": true, "FalseBool": false, "Float": 1.5, "Double": 1.5, "Long": 100, "Char": "a", "Timestamp": 1422172800 }, "response": { "status_code": 200, "headers": { "x-str": "string", "x-int": "1", "x-true-bool": "true", "x-false-bool": "false", "x-float": "1.5", "x-double": "1.5", "x-long": "100", "x-char": "a", "x-timestamp": "Sun, 25 Jan 2015 08:00:00 GMT" }, "body": "" } } ] }, { "description": "Empty string", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "Foo": { "shape": "StringType" } } }, "StringType": { "type": "string" } }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Foo": "" }, "response": { "status_code": 200, "headers": {}, "body": "requestid" } } ] }, { "description": "Parse XML Attributes", "metadata": { "protocol": "rest-xml" }, "shapes": { "OutputShape": { "type": "structure", "members": { "Grants": { "shape": "Grants", "locationName": "AccessControlList" } } }, "Grants": { "type": "list", "member": { "shape": "Grant" } }, "Grant": { "type": "structure", "members": { "Grantee": {"shape": "Grantee"} } }, "Grantee": { "type": "structure", "members": { "DisplayName": {"shape": "String"}, "ID": {"shape": "String"}, "Type": { "shape": "String", "locationName": "xsi:type", "xmlAttribute": true } } }, "String": {"type": "string"} }, "cases": [ { "given": { "output": { "shape": "OutputShape" }, "name": "OperationName" }, "result": { "Grants": [ { "Grantee": { "DisplayName": "name", "ID": "id", "Type": "CanonicalUser" } } ] }, "response": { "status_code": 200, "headers": {}, "body": "id name" } } ] } ]