[
  {
    "description": "Scalar members",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "ImaHeader": {
            "shape": "HeaderShape"
          },
          "ImaHeaderLocation": {
            "shape": "HeaderShape",
            "locationName": "X-Foo"
          },
          "Status": {
            "shape": "StatusShape",
            "location": "statusCode"
          },
          "Str": {
            "shape": "StringType"
          },
          "Num": {
            "shape": "IntegerType"
          },
          "FalseBool": {
            "shape": "BooleanType"
          },
          "TrueBool": {
            "shape": "BooleanType"
          },
          "Float": {
            "shape": "FloatType"
          },
          "Double": {
            "shape": "DoubleType"
          },
          "Long": {
            "shape": "LongType"
          },
          "Char": {
            "shape": "CharType"
          }
        }
      },
      "HeaderShape": {
        "type": "string",
        "location": "header"
      },
      "StatusShape": {
        "type": "integer"
      },
      "StringType": {
        "type": "string"
      },
      "IntegerType": {
        "type": "integer"
      },
      "BooleanType": {
        "type": "boolean"
      },
      "FloatType": {
        "type": "float"
      },
      "DoubleType": {
        "type": "double"
      },
      "LongType": {
        "type": "long"
      },
      "CharType": {
        "type": "character"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "ImaHeader": "test",
          "ImaHeaderLocation": "abc",
          "Status": 200,
          "Str": "myname",
          "Num": 123,
          "FalseBool": false,
          "TrueBool": true,
          "Float": 1.2,
          "Double": 1.3,
          "Long": 200,
          "Char": "a"
        },
        "response": {
          "status_code": 200,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc"
          },
          "body": "{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}"
        },
        "description": "legacy rest-json Scalar members"
      }
    ]
  },
  {
    "description": "Blob members",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "BlobMember": {
            "shape": "BlobType"
          },
          "StructMember": {
            "shape": "BlobContainer"
          }
        }
      },
      "BlobType": {
        "type": "blob"
      },
      "BlobContainer": {
        "type": "structure",
        "members": {
          "foo": {
            "shape": "BlobType"
          }
        }
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "BlobMember": "hi!",
          "StructMember": {
            "foo": "there!"
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}"
        },
        "description": "legacy rest-json Blob members"
      }
    ]
  },
  {
    "description": "Timestamp members",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "TimeArg": {
            "shape": "TimestampType"
          },
          "TimeArgInHeader": {
            "shape": "TimestampType",
            "location": "header",
            "locationName": "x-amz-timearg"
          },
          "TimeCustom": {
            "timestampFormat": "rfc822",
            "shape": "TimestampType"
          },
          "TimeCustomInHeader": {
            "timestampFormat": "unixTimestamp",
            "shape": "TimestampType",
            "location": "header",
            "locationName": "x-amz-timecustom"
          },
          "TimeFormat": {
            "shape": "TimestampFormatType"
          },
          "TimeFormatInHeader": {
            "shape": "TimestampFormatType",
            "location": "header",
            "locationName": "x-amz-timeformat"
          },
          "StructMember": {
            "shape": "TimeContainer"
          }
        }
      },
      "TimeContainer": {
        "type": "structure",
        "members": {
          "foo": {
            "shape": "TimestampType"
          },
          "bar": {
            "shape": "TimestampFormatType"
          }
        }
      },
      "TimestampFormatType": {
        "timestampFormat": "iso8601",
        "type": "timestamp"
      },
      "TimestampType": {
        "type": "timestamp"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "TimeArg": 1398796238,
          "TimeArgInHeader": 1398796238,
          "TimeCustom": 1398796238,
          "TimeCustomInHeader": 1398796238,
          "TimeFormat": 1398796238,
          "TimeFormatInHeader": 1398796238,
          "StructMember": {
            "foo": 1398796238,
            "bar": 1398796238
          }
        },
        "response": {
          "status_code": 200,
          "headers": {
            "x-amz-timearg": "Tue, 29 Apr 2014 18:30:38 GMT",
            "x-amz-timecustom": "1398796238",
            "x-amz-timeformat": "2014-04-29T18:30:38Z"
          },
          "body": "{\"TimeArg\": 1398796238, \"TimeCustom\": \"Tue, 29 Apr 2014 18:30:38 GMT\", \"TimeFormat\": \"2014-04-29T18:30:38Z\", \"StructMember\": {\"foo\": 1398796238, \"bar\": \"2014-04-29T18:30:38Z\"}}"
        },
        "description": "legacy rest-json Timestamp members"
      }
    ]
  },
  {
    "description": "Lists",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "ListMember": {
            "shape": "ListType"
          }
        }
      },
      "ListType": {
        "type": "list",
        "member": {
          "shape": "StringType"
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "ListMember": [
            "a",
            "b"
          ]
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"ListMember\": [\"a\", \"b\"]}"
        },
        "description": "legacy rest-json Lists"
      }
    ]
  },
  {
    "description": "Lists with structure member",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "ListMember": {
            "shape": "ListType"
          }
        }
      },
      "ListType": {
        "type": "list",
        "member": {
          "shape": "SingleStruct"
        }
      },
      "StringType": {
        "type": "string"
      },
      "SingleStruct": {
        "type": "structure",
        "members": {
          "Foo": {
            "shape": "StringType"
          }
        }
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "ListMember": [
            {
              "Foo": "a"
            },
            {
              "Foo": "b"
            }
          ]
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"ListMember\": [{\"Foo\": \"a\"}, {\"Foo\": \"b\"}]}"
        },
        "description": "legacy rest-json Lists with structure member"
      }
    ]
  },
  {
    "description": "Maps",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "MapMember": {
            "shape": "MapType"
          }
        }
      },
      "MapType": {
        "type": "map",
        "key": {
          "shape": "StringType"
        },
        "value": {
          "shape": "ListType"
        }
      },
      "ListType": {
        "type": "list",
        "member": {
          "shape": "IntegerType"
        }
      },
      "StringType": {
        "type": "string"
      },
      "IntegerType": {
        "type": "integer"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "MapMember": {
            "a": [
              1,
              2
            ],
            "b": [
              3,
              4
            ]
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}"
        },
        "description": "legacy rest-json Maps"
      }
    ]
  },
  {
    "description": "Complex Map Values",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "MapMember": {
            "shape": "MapType"
          }
        }
      },
      "MapType": {
        "type": "map",
        "key": {
          "shape": "StringType"
        },
        "value": {
          "shape": "TimeType"
        }
      },
      "TimeType": {
        "type": "timestamp"
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "MapMember": {
            "a": 1398796238,
            "b": 1398796238
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"MapMember\": {\"a\": 1398796238, \"b\": 1398796238}}"
        },
        "description": "legacy rest-json Complex Map Values"
      }
    ]
  },
  {
    "description": "Ignores extra data",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "StrType": {
            "shape": "StrType"
          }
        }
      },
      "StrType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {},
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"foo\": \"bar\"}"
        },
        "description": "legacy rest-json Ignores extra data"
      }
    ]
  },
  {
    "description": "Ignores undefined output",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {},
    "cases": [
      {
        "given": {
          "name": "OperationName"
        },
        "result": {},
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "OK"
        },
        "description": "legacy rest-json Ignores undefined output"
      }
    ]
  },
  {
    "description": "Supports header maps",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "AllHeaders": {
            "shape": "HeaderMap",
            "location": "headers"
          },
          "PrefixedHeaders": {
            "shape": "HeaderMap",
            "location": "headers",
            "locationName": "X-"
          }
        }
      },
      "HeaderMap": {
        "type": "map",
        "key": {
          "shape": "StringType"
        },
        "value": {
          "shape": "StringType"
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "AllHeaders": {
            "Content-Length": "10",
            "x-Foo": "bar",
            "X-bam": "boo"
          },
          "PrefixedHeaders": {
            "Foo": "bar",
            "bam": "boo"
          }
        },
        "response": {
          "status_code": 200,
          "headers": {
            "Content-Length": "10",
            "x-Foo": "bar",
            "X-bam": "boo"
          },
          "body": "{}"
        },
        "description": "legacy rest-json Supports header maps"
      }
    ]
  },
  {
    "description": "JSON payload",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "payload": "Data",
        "members": {
          "Header": {
            "shape": "StringType",
            "location": "header",
            "locationName": "X-Foo"
          },
          "Data": {
            "shape": "BodyStructure"
          }
        }
      },
      "BodyStructure": {
        "type": "structure",
        "members": {
          "Foo": {
            "shape": "StringType"
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "Header": "baz",
          "Data": {
            "Foo": "abc"
          }
        },
        "response": {
          "status_code": 200,
          "headers": {
            "X-Foo": "baz"
          },
          "body": "{\"Foo\": \"abc\"}"
        },
        "description": "legacy rest-json JSON payload"
      }
    ]
  },
  {
    "description": "Streaming payload",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "payload": "Stream",
        "members": {
          "Stream": {
            "shape": "Stream"
          }
        }
      },
      "Stream": {
        "type": "blob"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "Stream": "abc"
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "abc"
        },
        "description": "legacy rest-json Streaming payload"
      }
    ]
  },
  {
    "description": "JSON value trait",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "Attr": {
            "shape": "StringType",
            "jsonvalue": true,
            "location": "header",
            "locationName": "X-Amz-Foo"
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "Attr": {
            "Foo": "Bar"
          }
        },
        "response": {
          "status_code": 200,
          "headers": {
            "X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="
          },
          "body": ""
        },
        "description": "legacy rest-json JSON value trait 1"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "Attr": {}
        },
        "response": {
          "status_code": 200,
          "headers": {
            "X-Amz-Foo": "e30="
          },
          "body": ""
        },
        "description": "legacy rest-json JSON value trait 2"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {},
        "response": {
          "status_code": 200,
          "headers": {
            "X-Amz-Foo": ""
          },
          "body": ""
        },
        "description": "legacy rest-json JSON value trait 3"
      }
    ]
  },
  {
    "description": "Modeled exceptions",
    "metadata": {
      "protocol": "rest-json"
    },
    "shapes": {
      "ExceptionShape": {
        "type": "structure",
        "members": {
          "ImaHeader": {
            "shape": "HeaderShape"
          },
          "ImaHeaderLocation": {
            "shape": "HeaderShape",
            "locationName": "X-Foo"
          },
          "Status": {
            "shape": "StatusShape",
            "location": "statusCode"
          },
          "BodyMember": {
            "shape": "StringType"
          },
          "Message": {
            "shape": "StringType"
          }
        }
      },
      "OtherExceptionShape": {
        "BodyMember": {
          "shape": "StringType"
        }
      },
      "HeaderShape": {
        "type": "string",
        "location": "header"
      },
      "StatusShape": {
        "type": "integer"
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "errors": [
            {
              "shape": "ExceptionShape"
            }
          ],
          "name": "OperationName"
        },
        "error": {
          "ImaHeader": "test",
          "ImaHeaderLocation": "abc",
          "Status": 400,
          "BodyMember": "mybody",
          "Message": "mymessage"
        },
        "errorCode": "ExceptionShape",
        "errorMessage": "mymessage",
        "response": {
          "status_code": 400,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc",
            "X-Amzn-Errortype": "ExceptionShape"
          },
          "body": "{\"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}"
        },
        "description": "legacy rest-json Modeled exceptions 1"
      },
      {
        "given": {
          "errors": [
            {
              "shape": "ExceptionShape"
            }
          ],
          "name": "OperationName"
        },
        "error": {
          "ImaHeader": "test",
          "ImaHeaderLocation": "abc",
          "Status": 400,
          "BodyMember": "mybody",
          "Message": "mymessage"
        },
        "errorCode": "ExceptionShape",
        "errorMessage": "mymessage",
        "response": {
          "status_code": 400,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc"
          },
          "body": "{ \"code\": \"ExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}"
        },
        "description": "legacy rest-json Modeled exceptions 2"
      },
      {
        "given": {
          "errors": [
            {
              "shape": "ExceptionShape"
            }
          ],
          "name": "OperationName"
        },
        "error": {
          "ImaHeader": "test",
          "ImaHeaderLocation": "abc",
          "Status": 400,
          "BodyMember": "mybody",
          "Message": "mymessage"
        },
        "errorCode": "ExceptionShape",
        "errorMessage": "mymessage",
        "response": {
          "status_code": 400,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc",
            "X-Amzn-Errortype": "ExceptionShape"
          },
          "body": "{ \"code\": \"OtherExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}"
        },
        "description": "legacy rest-json Modeled exceptions 3"
      },
      {
        "given": {
          "errors": [
            {
              "shape": "ExceptionShape"
            }
          ],
          "name": "OperationName"
        },
        "error": {},
        "errorCode": "OtherExceptionShape",
        "errorMessage": "mymessage",
        "response": {
          "status_code": 400,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc",
            "X-Amzn-Errortype": "OtherExceptionShape"
          },
          "body": "{ \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}"
        },
        "description": "legacy rest-json Modeled exceptions 4"
      },
      {
        "given": {
          "errors": [
            {
              "shape": "ExceptionShape"
            }
          ],
          "name": "OperationName"
        },
        "error": {},
        "errorCode": "OtherExceptionShape",
        "errorMessage": "mymessage",
        "response": {
          "status_code": 400,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc"
          },
          "body": "{ \"code\": \"OtherExceptionShape\", \"BodyMember\": \"mybody\", \"Message\": \"mymessage\"}"
        },
        "description": "legacy rest-json Modeled exceptions 5"
      },
      {
        "given": {
          "errors": [
            {
              "shape": "ExceptionShape"
            }
          ],
          "name": "OperationName"
        },
        "error": {},
        "errorCode": "UndefinedShape",
        "response": {
          "status_code": 400,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc",
            "X-Amzn-Errortype": "UndefinedShape"
          },
          "body": "{ \"BodyMember\": \"mybody\"}"
        },
        "description": "legacy rest-json Modeled exceptions 6"
      },
      {
        "given": {
          "errors": [
            {
              "shape": "ExceptionShape"
            }
          ],
          "name": "OperationName"
        },
        "error": {},
        "errorCode": "UndefinedShape",
        "response": {
          "status_code": 400,
          "headers": {
            "ImaHeader": "test",
            "X-Foo": "abc"
          },
          "body": "{ \"code\": \"UndefinedShape\", \"BodyMember\": \"mybody\"}"
        },
        "description": "legacy rest-json Modeled exceptions 7"
      }
    ]
  },
  {
    "description": "Serializes document with standalone primitive as part of the JSON response payload with no escaping.",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "documentValue": {
            "shape": "DocumentType"
          }
        }
      },
      "DocumentType": {
        "type": "structure",
        "document": true
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "documentValue": "foo"
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"documentValue\": \"foo\"}"
        },
        "description": "legacy rest-json Serializes document with standalone primitive as part of the JSON response payload with no escaping. 1"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "documentValue": 123
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"documentValue\": 123}"
        },
        "description": "legacy rest-json Serializes document with standalone primitive as part of the JSON response payload with no escaping. 2"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "documentValue": true
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"documentValue\": true}"
        },
        "description": "legacy rest-json Serializes document with standalone primitive as part of the JSON response payload with no escaping. 3"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "documentValue": ""
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"documentValue\": \"\"}"
        },
        "description": "legacy rest-json Serializes document with standalone primitive as part of the JSON response payload with no escaping. 4"
      }
    ]
  },
  {
    "description": "Serializes inline documents as part of the JSON response payload with no escaping.",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "documentValue": {
            "shape": "DocumentType"
          }
        }
      },
      "DocumentType": {
        "type": "structure",
        "document": true
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "documentValue": {
            "foo": "bar"
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"documentValue\": {\"foo\": \"bar\"}}"
        },
        "description": "legacy rest-json Serializes inline documents as part of the JSON response payload with no escaping."
      }
    ]
  },
  {
    "description": "Serializes aggregate documents as part of the JSON response payload with no escaping.",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "documentValue": {
            "shape": "DocumentType"
          }
        }
      },
      "DocumentType": {
        "type": "structure",
        "document": true
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "documentValue": {
            "childDocument1": {
              "foo": "test"
            },
            "childDocument2": {
              "bar": true
            },
            "childDocument3": 123
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"documentValue\": {\"childDocument1\": {\"foo\": \"test\"}, \"childDocument2\": {\"bar\": true}, \"childDocument3\": 123}}"
        },
        "description": "legacy rest-json Serializes aggregate documents as part of the JSON response payload with no escaping. 1"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "documentValue": [
            {
              "foo": "test"
            },
            {
              "bar": true
            },
            123
          ]
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"documentValue\": [{\"foo\": \"test\"}, {\"bar\": true}, 123]}"
        },
        "description": "legacy rest-json Serializes aggregate documents as part of the JSON response payload with no escaping. 2"
      }
    ]
  },
  {
    "description": "Unions",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "OutputShape": {
        "type": "structure",
        "members": {
          "UnionMember": {
            "shape": "UnionType"
          }
        }
      },
      "UnionType": {
        "type": "structure",
        "members": {
          "S": {
            "shape": "StringType"
          },
          "L": {
            "shape": "ListType"
          }
        },
        "union": true
      },
      "ListType": {
        "type": "list",
        "member": {
          "shape": "StringType"
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "UnionMember": {
            "S": "string value"
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"UnionMember\": {\"S\": \"string value\"}}"
        },
        "description": "legacy rest-json Unions 1"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "UnionMember": {
            "L": [
              "a",
              "b"
            ]
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"UnionMember\": {\"L\": [\"a\", \"b\"]}}"
        },
        "description": "legacy rest-json Unions 2"
      },
      {
        "given": {
          "output": {
            "shape": "OutputShape"
          },
          "name": "OperationName"
        },
        "result": {
          "UnionMember": {
            "Unknown": {
              "SomeUnknownMember": "un-modeled member"
            }
          }
        },
        "response": {
          "status_code": 200,
          "headers": {},
          "body": "{\"UnionMember\": {\"SomeUnknownMember\": \"un-modeled member\"}}"
        },
        "description": "legacy rest-json Unions 3"
      }
    ]
  }
]
