Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
botocore / tests / unit / protocols / input / rest-json.json
Size: Mime:
[
  {
    "description": "No parameters",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {},
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/2014-01-01/jobs"
          },
          "name": "OperationName"
        },
        "serialized": {
          "body": "",
          "uri": "/2014-01-01/jobs",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "URI parameter only with no location name",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "PipelineId": {
            "shape": "StringType",
            "location": "uri"
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "PipelineId": "foo"
        },
        "serialized": {
          "body": "",
          "uri": "/2014-01-01/jobsByPipeline/foo",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "URI parameter only with location name",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "Foo": {
            "shape": "StringType",
            "location": "uri",
            "locationName": "PipelineId"
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "Foo": "bar"
        },
        "serialized": {
          "body": "",
          "uri": "/2014-01-01/jobsByPipeline/bar",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "Querystring list of strings",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "Items": {
            "shape": "StringList",
            "location": "querystring",
            "locationName": "item"
          }
        }
      },
      "StringList": {
        "type": "list",
        "member": {
          "shape": "String"
        }
      },
      "String": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/path"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "Items": ["value1", "value2"]
        },
        "serialized": {
          "body": "",
          "uri": "/path?item=value1&item=value2",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "String to string maps in querystring",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "PipelineId": {
            "shape": "StringType",
            "location": "uri"
          },
          "QueryDoc": {
            "shape": "MapStringStringType",
            "location": "querystring"
          }
        }
      },
      "MapStringStringType": {
        "type": "map",
        "key": {
          "shape": "StringType"
        },
        "value": {
          "shape": "StringType"
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "PipelineId": "foo",
          "QueryDoc": {
            "bar": "baz",
            "fizz": "buzz"
          }
        },
        "serialized": {
          "body": "",
          "uri": "/2014-01-01/jobsByPipeline/foo?bar=baz&fizz=buzz",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "String to string list maps in querystring",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "PipelineId": {
            "shape": "StringType",
            "location": "uri"
          },
          "QueryDoc": {
            "shape": "MapStringStringListType",
            "location": "querystring"
          }
        }
      },
      "MapStringStringListType": {
        "type": "map",
        "key": {
          "shape": "StringType"
        },
        "value": {
          "shape": "StringListType"
        }
      },
      "StringListType": {
        "type": "list",
        "member": {
          "shape": "StringType"
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "PipelineId": "id",
          "QueryDoc": {
            "foo": ["bar", "baz"],
            "fizz": ["buzz", "pop"]
          }
        },
        "serialized": {
          "body": "",
          "uri": "/2014-01-01/jobsByPipeline/id?foo=bar&foo=baz&fizz=buzz&fizz=pop",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "Boolean in querystring",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "BoolQuery": {
            "shape": "BoolType",
            "location": "querystring",
            "locationName": "bool-query"
          }
        }
      },
      "BoolType": {
        "type": "boolean"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/path"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "BoolQuery": true
        },
        "serialized": {
          "body": "",
          "uri": "/path?bool-query=true",
          "headers": {}
        }
      },
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/path"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "BoolQuery": false
        },
        "serialized": {
          "body": "",
          "uri": "/path?bool-query=false",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "URI parameter and querystring params",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "PipelineId": {
            "shape": "StringType",
            "location": "uri",
            "locationName": "PipelineId"
          },
          "Ascending": {
            "shape": "StringType",
            "location": "querystring",
            "locationName": "Ascending"
          },
          "PageToken": {
            "shape": "StringType",
            "location": "querystring",
            "locationName": "PageToken"
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "GET",
            "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "PipelineId": "foo",
          "Ascending": "true",
          "PageToken": "bar"
        },
        "serialized": {
          "body": "",
          "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "URI parameter, querystring params and JSON body",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "PipelineId": {
            "shape": "StringType",
            "location": "uri",
            "locationName": "PipelineId"
          },
          "Ascending": {
            "shape": "StringType",
            "location": "querystring",
            "locationName": "Ascending"
          },
          "PageToken": {
            "shape": "StringType",
            "location": "querystring",
            "locationName": "PageToken"
          },
          "Config": {
            "shape": "StructType"
          }
        }
      },
      "StringType": {
        "type": "string"
      },
      "StructType": {
        "type": "structure",
        "members": {
          "A": {
            "shape": "StringType"
          },
          "B": {
            "shape": "StringType"
          }
        }
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "PipelineId": "foo",
          "Ascending": "true",
          "PageToken": "bar",
          "Config": {
            "A": "one",
            "B": "two"
          }
        },
        "serialized": {
          "body": "{\"Config\": {\"A\": \"one\", \"B\": \"two\"}}",
          "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar",
          "headers": {}
        }
      }
    ]
  },
  {
    "description": "URI parameter, querystring params, headers and JSON body",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "PipelineId": {
            "shape": "StringType",
            "location": "uri",
            "locationName": "PipelineId"
          },
          "Ascending": {
            "shape": "StringType",
            "location": "querystring",
            "locationName": "Ascending"
          },
          "Checksum": {
            "shape": "StringType",
            "location": "header",
            "locationName": "x-amz-checksum"
          },
          "PageToken": {
            "shape": "StringType",
            "location": "querystring",
            "locationName": "PageToken"
          },
          "Config": {
            "shape": "StructType"
          }
        }
      },
      "StringType": {
        "type": "string"
      },
      "StructType": {
        "type": "structure",
        "members": {
          "A": {
            "shape": "StringType"
          },
          "B": {
            "shape": "StringType"
          }
        }
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/2014-01-01/jobsByPipeline/{PipelineId}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "PipelineId": "foo",
          "Ascending": "true",
          "Checksum": "12345",
          "PageToken": "bar",
          "Config": {
            "A": "one",
            "B": "two"
          }
        },
        "serialized": {
          "body": "{\"Config\": {\"A\": \"one\", \"B\": \"two\"}}",
          "uri": "/2014-01-01/jobsByPipeline/foo?Ascending=true&PageToken=bar",
          "headers": {
            "x-amz-checksum": "12345"
          }
        }
      }
    ]
  },
  {
    "description": "Streaming payload",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "vaultName": {
            "shape": "StringType",
            "location": "uri",
            "locationName": "vaultName"
          },
          "checksum": {
            "shape": "StringType",
            "location": "header",
            "locationName": "x-amz-sha256-tree-hash"
          },
          "body": {
            "shape": "Stream"
          }
        },
        "required": [
          "vaultName"
        ],
        "payload": "body"
      },
      "StringType": {
        "type": "string"
      },
      "Stream": {
        "type": "blob",
        "streaming": true
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/2014-01-01/vaults/{vaultName}/archives"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "vaultName": "name",
          "checksum": "foo",
          "body": "contents"
        },
        "serialized": {
          "body": "contents",
          "uri": "/2014-01-01/vaults/name/archives",
          "headers": {
            "x-amz-sha256-tree-hash": "foo"
          }
        }
      }
    ]
  },
  {
    "description": "Serialize blobs in body",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "Foo": {
            "shape": "StringType",
            "location": "uri",
            "locationName": "Foo"
          },
          "Bar": {"shape": "BlobType"}
        },
        "required": [
          "Foo"
        ]
      },
      "StringType": {
        "type": "string"
      },
      "BlobType": {
        "type": "blob"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/2014-01-01/{Foo}"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "Foo": "foo_name",
          "Bar": "Blob param"
        },
        "serialized": {
          "body": "{\"Bar\": \"QmxvYiBwYXJhbQ==\"}",
          "uri": "/2014-01-01/foo_name"
        }
      }
    ]
  },
  {
    "description": "Blob payload",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "foo": {
            "shape": "FooShape"
          }
        }
      },
      "FooShape": {
        "type": "blob"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/"
          },
          "input": {
            "shape": "InputShape",
            "payload": "foo"
          },
          "name": "OperationName"
        },
        "params": {
          "foo": "bar"
        },
        "serialized": {
          "method": "POST",
          "body": "bar",
          "uri": "/"
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/"
          },
          "input": {
            "shape": "InputShape",
            "payload": "foo"
          },
          "name": "OperationName"
        },
        "params": {
        },
        "serialized": {
          "method": "POST",
          "body": "",
          "uri": "/"
        }
      }
    ]
  },
  {
    "description": "Structure payload",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "foo": {
            "shape": "FooShape"
          }
        }
      },
      "FooShape": {
        "locationName": "foo",
        "type": "structure",
        "members": {
          "baz": {
            "shape": "BazShape"
          }
        }
      },
      "BazShape": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/"
          },
          "input": {
            "shape": "InputShape",
            "payload": "foo"
          },
          "name": "OperationName"
        },
        "params": {
          "foo": {
            "baz": "bar"
          }
        },
        "serialized": {
          "method": "POST",
          "body": "{\"baz\": \"bar\"}",
          "uri": "/"
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/"
          },
          "input": {
            "shape": "InputShape",
            "payload": "foo"
          },
          "name": "OperationName"
        },
        "params": {},
        "serialized": {
          "method": "POST",
          "body": "{}",
          "uri": "/"
        }
      }
    ]
  },
  {
    "description": "Omits null query params, but serializes empty strings",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "foo": {
            "location":"querystring",
            "locationName":"param-name",
            "shape": "Foo"
          }
        }
      },
      "Foo": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "name": "OperationName",
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "input": { "shape": "InputShape" }
        },
        "params": { "foo": null },
        "serialized": {
          "method": "POST",
          "body": "",
          "uri": "/path"
        }
      },
      {
        "given": {
          "name": "OperationName",
          "http": {
            "method": "POST",
            "requestUri": "/path?abc=mno"
          },
          "input": { "shape": "InputShape" }
        },
        "params": { "foo": "" },
        "serialized": {
          "method": "POST",
          "body": "",
          "uri": "/path?abc=mno&param-name="
        }
      }
    ]
  },
  {
    "description": "Recursive shapes",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "RecursiveStruct": {
            "shape": "RecursiveStructType"
          }
        }
      },
      "RecursiveStructType": {
        "type": "structure",
        "members": {
          "NoRecurse": {
            "shape": "StringType"
          },
          "RecursiveStruct": {
            "shape": "RecursiveStructType"
          },
          "RecursiveList": {
            "shape": "RecursiveListType"
          },
          "RecursiveMap": {
            "shape": "RecursiveMapType"
          }
        }
      },
      "RecursiveListType": {
        "type": "list",
        "member": {
          "shape": "RecursiveStructType"
        }
      },
      "RecursiveMapType": {
        "type": "map",
        "key": {
          "shape": "StringType"
        },
        "value": {
          "shape": "RecursiveStructType"
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "RecursiveStruct": {
            "NoRecurse": "foo"
          }
        },
        "serialized": {
          "uri": "/path" ,
          "headers": {},
          "body": "{\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}"
        }
      },
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "RecursiveStruct": {
            "RecursiveStruct": {
              "NoRecurse": "foo"
            }
          }
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}"
        }
      },
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "RecursiveStruct": {
            "RecursiveStruct": {
              "RecursiveStruct": {
                "RecursiveStruct": {
                  "NoRecurse": "foo"
                }
              }
            }
          }
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}}}"
        }
      },
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "RecursiveStruct": {
            "RecursiveList": [
              {
                "NoRecurse": "foo"
              },
              {
                "NoRecurse": "bar"
              }
            ]
          }
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"NoRecurse\": \"bar\"}]}}"
        }
      },
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "RecursiveStruct": {
            "RecursiveList": [
              {
                "NoRecurse": "foo"
              },
              {
                "RecursiveStruct": {
                  "NoRecurse": "bar"
                }
              }
            ]
          }
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"RecursiveStruct\": {\"NoRecurse\": \"bar\"}}]}}"
        }
      },
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "RecursiveStruct": {
            "RecursiveMap": {
              "foo": {
                "NoRecurse": "foo"
              },
              "bar": {
                "NoRecurse": "bar"
              }
            }
          }
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"RecursiveStruct\": {\"RecursiveMap\": {\"foo\": {\"NoRecurse\": \"foo\"}, \"bar\": {\"NoRecurse\": \"bar\"}}}}"
        }
      }
    ]
  },
  {
    "description": "Timestamp values",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "TimeArg": {
            "shape": "TimestampType"
          },
          "TimeArgInHeader": {
            "shape": "TimestampType",
            "location": "header",
            "locationName": "x-amz-timearg"
          },
          "TimeArgInQuery": {
            "shape": "TimestampType",
            "location": "querystring",
            "locationName": "TimeQuery"
          },
          "TimeCustom": {
            "timestampFormat": "iso8601",
            "shape": "TimestampType"
          },
          "TimeCustomInHeader": {
            "timestampFormat": "unixTimestamp",
            "shape": "TimestampType",
            "location": "header",
            "locationName": "x-amz-timecustom-header"
          },
          "TimeCustomInQuery": {
            "timestampFormat": "unixTimestamp",
            "shape": "TimestampType",
            "location": "querystring",
            "locationName": "TimeCustomQuery"
          },
          "TimeFormat": {
            "shape": "TimestampFormatRfcType"
          },
          "TimeFormatInHeader": {
            "shape": "TimestampFormatUnixType",
            "location": "header",
            "locationName": "x-amz-timeformat-header"
          },
          "TimeFormatInQuery": {
            "shape": "TimestampFormatUnixType",
            "location": "querystring",
            "locationName": "TimeFormatQuery"
          }
        }
      },
      "TimestampFormatRfcType": {
        "timestampFormat": "rfc822",
        "type": "timestamp"
      },
      "TimestampFormatUnixType": {
        "timestampFormat": "unixTimestamp",
        "type": "timestamp"
      },
      "TimestampType": {
        "type": "timestamp"
      }
    },
    "cases": [
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "TimeArg": 1422172800,
          "TimeArgInQuery": 1422172800,
          "TimeArgInHeader": 1422172800,
          "TimeCustom": 1422172800,
          "TimeCustomInQuery": 1422172800,
          "TimeCustomInHeader": 1422172800,
          "TimeFormat": 1422172800,
          "TimeFormatInQuery": 1422172800,
          "TimeFormatInHeader": 1422172800
        },
        "serialized": {
          "uri": "/path?TimeQuery=2015-01-25T08%3A00%3A00Z&TimeCustomQuery=1422172800&TimeFormatQuery=1422172800",
          "headers": {
            "x-amz-timearg": "Sun, 25 Jan 2015 08:00:00 GMT",
            "x-amz-timecustom-header": "1422172800",
            "x-amz-timeformat-header": "1422172800"
          },
          "body": "{\"TimeArg\": 1422172800, \"TimeCustom\": \"2015-01-25T08:00:00Z\", \"TimeFormat\": \"Sun, 25 Jan 2015 08:00:00 GMT\"}"
        }
      }
    ]
  },
  {
    "description": "Named locations in JSON body",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "TimeArg": {
            "shape": "TimestampType",
            "locationName": "timestamp_location"
          }
        }
      },
      "TimestampType": {
        "type": "timestamp"
      }
    },
    "cases": [
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "TimeArg": 1422172800
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"timestamp_location\": 1422172800}"
        }
      }
    ]
  },
  {
    "description": "String payload",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "foo": {
            "shape": "FooShape"
          }
        }
      },
      "FooShape": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/"
          },
          "input": {
            "shape": "InputShape",
            "payload": "foo"
          },
          "name": "OperationName"
        },
        "params": {
          "foo": "bar"
        },
        "serialized": {
          "method": "POST",
          "body": "bar",
          "uri": "/"
        }
      }
    ]
  },
  {
    "description": "Idempotency token auto fill",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "Token": {
            "shape": "StringType",
            "idempotencyToken": true
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "Token": "abc123"
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"Token\": \"abc123\"}"
        }
      },
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}"
        }
      }
    ]
  },
  {
    "description": "JSON value trait",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "Attr": {
            "shape": "StringType",
              "jsonvalue": true,
              "location": "header",
              "locationName": "X-Amz-Foo"
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
          "Attr": {"Foo":"Bar"}
        },
        "serialized": {
          "uri": "/path",
          "headers": {"X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="},
          "body": ""
        }
      },
      {
        "given": {
          "input": {
            "shape": "InputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "name": "OperationName"
        },
        "params": {
        },
        "serialized": {
          "uri": "/path",
          "headers": {},
          "body": ""
        }
      }
    ]
  },
  {
    "description": "Endpoint host trait",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "clientEndpoint": "https://service.region.amazonaws.com",
    "shapes": {
      "StaticInputShape": {
        "type": "structure",
        "members": {
          "Name": {
            "shape": "StringType"
          }
        }
      },
      "MemberRefInputShape": {
        "type": "structure",
        "members": {
          "Name": {
            "shape": "StringType",
            "hostLabel": true
          }
        }
      },
      "StringType": {
        "type": "string"
      }
    },
    "cases": [
      {
        "given": {
          "name": "StaticOp",
          "input": {
            "shape": "StaticInputShape"
          },
          "http": {
            "method": "POST",
            "requestUri": "/path"
          },
          "endpoint":{
              "hostPrefix": "data-"
          }
        },
        "params": {
          "Name": "myname"
        },
        "serialized": {
          "uri": "/path",
          "body": "{\"Name\": \"myname\"}",
          "host": "data-service.region.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "MemberRefOp",
          "input": {
            "shape": "MemberRefInputShape"
          },
          "http": {
            "method": "GET",
            "requestUri": "/path"
          },
          "endpoint":{
              "hostPrefix": "foo-{Name}."
          }
        },
        "params": {
          "Name": "myname"
        },
        "serialized": {
          "uri": "/path",
          "body": "{\"Name\": \"myname\"}",
          "host": "foo-myname.service.region.amazonaws.com"
        }
      }
    ]
  },
  {
    "description": "Serializes document with standalone primitive as part of the JSON request payload with no escaping.",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "documentValue": {
            "shape": "DocumentType"
          }
        }
      },
      "DocumentType": {
        "type": "structure",
        "document": true
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": "foo"
        },
        "serialized": {
          "body": "{\"documentValue\": \"foo\"}",
          "uri": "/InlineDocument"
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": 123
        },
        "serialized": {
          "body": "{\"documentValue\": 123}",
          "uri": "/InlineDocument"
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": 1.2
        },
        "serialized": {
          "body": "{\"documentValue\": 1.2}",
          "uri": "/InlineDocument"
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": true
        },
        "serialized": {
          "body": "{\"documentValue\": true}",
          "uri": "/InlineDocument"
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": ""
        },
        "serialized": {
          "body": "{\"documentValue\": \"\"}",
          "uri": "/InlineDocument"
        }
      }
    ]
  },
  {
    "description": "Serializes inline documents as part of the JSON request payload with no escaping.",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "documentValue": {
            "shape": "DocumentType"
          }
        }
      },
      "DocumentType": {
        "type": "structure",
        "document": true
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": {"foo": "bar"}
        },
        "serialized": {
          "body": "{\"documentValue\": {\"foo\": \"bar\"}}",
          "uri": "/InlineDocument"
        }
      }
    ]
  },
  {
    "description": "Serializes aggregate documents as part of the JSON request payload with no escaping.",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "documentValue": {
            "shape": "DocumentType"
          }
        }
      },
      "DocumentType": {
        "type": "structure",
        "document": true
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": {
              "str": "test",
              "num": 123,
              "float": 1.2,
              "bool": true,
              "null": "",
              "document": {"foo": false},
              "list": ["myname", 321, 1.3, true, "", {"nested": true}, [200, ""]]
          }
        },
        "serialized": {
          "body": "{\"documentValue\": {\"str\": \"test\", \"num\": 123, \"float\": 1.2, \"bool\": true, \"null\": \"\", \"document\": {\"foo\": false}, \"list\": [\"myname\", 321, 1.3, true, \"\", {\"nested\": true}, [200, \"\"]]}}",
          "uri": "/InlineDocument"
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/InlineDocument"
          },
          "input": {
            "shape": "InputShape"
          },
          "name": "OperationName"
        },
        "params": {
          "documentValue": [
              "test",
              123,
              1.2,
              true,
              "",
              {"str": "myname", "num": 321, "float": 1.3, "bool": true, "null": "", "document": {"nested": true}, "list": [200, ""]},
              ["foo", false]
          ]
        },
        "serialized": {
          "body": "{\"documentValue\": [\"test\", 123, 1.2, true, \"\", {\"str\": \"myname\", \"num\": 321, \"float\": 1.3, \"bool\": true, \"null\": \"\", \"document\": {\"nested\": true}, \"list\": [200, \"\"]}, [\"foo\", false]]}",
          "uri": "/InlineDocument"
        }
      }
    ]
      },
  {
    "description": "Content-Type and JSON body",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "clientEndpoint": "https://rest-json-test.amazonaws.com",
    "shapes":{
      "Integer":{
        "type":"integer"
      },
      "String":{"type":"string"},
      "Blob":{"type":"blob"},
      "NoPayloadRequest":{
        "type":"structure",
        "required":[],
        "members":{
          "testId":{
            "shape":"TestId",
            "documentation":"<p> The unique ID for a test. </p>",
            "location":"header",
            "locationName":"x-amz-test-id"
          }
        },
        "documentation":"<p> The request structure for a no payload request. </p>"
      },
      "TestId":{
        "type":"string",
        "max":8,
        "min":3,
        "pattern":"t-[a-z0-9-]+"
      },
      "TestConfig":{
        "type":"structure",
        "required":[],
        "members":{
          "timeout":{
            "shape":"Integer",
            "documentation":"<p> Timeout in seconds </p>"
          }
        }
      },
      "PayloadConfig":{
        "type":"structure",
        "required":[],
        "members":{
          "data":{
            "shape":"Integer",
            "documentation":"<p> Numerical data </p>"
          }
        }
      },
      "TestBodyRequest":{
        "type":"structure",
        "required":[],
        "members":{
          "testConfig":{
            "shape":"TestConfig",
            "documentation":"<p> Content to post </p>"
          },
          "testId":{
            "shape":"TestId",
            "documentation":"<p> Optional test identifier </p>",
            "location":"header",
            "locationName":"x-amz-test-id"
          }
        },
        "documentation":"<p> The request structure for a test body request. </p>"
      },
      "TestPayloadRequest":{
        "type":"structure",
        "required":[],
        "members":{
          "payloadConfig":{
            "shape":"PayloadConfig",
            "documentation":"<p> Payload to post </p>"
          },
          "testId":{
            "shape":"TestId",
            "documentation":"<p> Optional test identifier </p>",
            "location":"header",
            "locationName":"x-amz-test-id"
          }
        },
        "documentation":"<p> The request structure for a payload request. </p>",
        "payload":"payloadConfig"
      },
      "TestBlobPayloadRequest":{
        "type":"structure",
        "required":[],
        "members":{
          "data":{
            "shape":"Blob",
            "documentation":"<p> Blob payload to post </p>"
          },
          "contentType":{
            "shape":"String",
            "documentation":"<p> Optional content-type header </p>",
            "location":"header",
            "locationName":"Content-Type"
          }
        },
        "documentation":"<p> The request structure for a blob payload request. </p>",
        "payload":"data"
      }
    },
    "cases": [
      {
        "given": {
          "name": "TestBody",
          "input": {
            "shape": "TestBodyRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/body"
          }
        },
        "params": {
          "testConfig": {
            "timeout": 10
          },
          "testId": "t-12345"
        },
        "serialized": {
          "uri": "/body",
          "body": "{\"testConfig\": {\"timeout\": 10}}",
          "headers": {
            "x-amz-test-id": "t-12345",
            "Content-Type": "application/json"
          },
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "TestBodyNoParams",
          "input": {
            "shape": "TestBodyRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/body"
          }
        },
        "params": {},
        "serialized": {
          "uri": "/body",
          "body": "{}",
          "headers": {
            "Content-Type": "application/json"
          },
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "TestPayloadNoParams",
          "input": {
            "shape": "TestPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/payload"
          }
        },
        "params": {},
        "serialized": {
          "uri": "/payload",
          "body": "{}",
          "headers": {
            "Content-Type": "application/json"
          },
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "TestPayload",
          "input": {
            "shape": "TestPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/payload"
          }
        },
        "params": {
          "payloadConfig": {
            "data": 25
          },
          "testId": "t-12345"
        },
        "serialized": {
          "uri": "/payload",
          "body": "{\"data\": 25}",
          "headers": {
            "x-amz-test-id": "t-12345",
            "Content-Type": "application/json"
          },
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "TestPayloadNoBody",
          "input": {
            "shape": "TestPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/payload"
          }
        },
        "params": {
          "testId": "t-12345"
        },
        "serialized": {
          "uri": "/payload",
          "body": "{}",
          "headers": {
            "x-amz-test-id": "t-12345",
            "Content-Type": "application/json"
          },
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "TestBlobPayload",
          "input": {
            "shape": "TestBlobPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/blob-payload"
          }
        },
        "params": {
          "data": "1234",
          "contentType": "image/jpg"
        },
        "serialized": {
          "uri": "/blob-payload",
          "body": "1234",
          "headers": {
            "Content-Type": "image/jpg"
          },
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "TestBlobPayloadNoContentType",
          "input": {
            "shape": "TestBlobPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/blob-payload"
          }
        },
        "params": {
          "data": "1234"
        },
        "serialized": {
          "uri": "/blob-payload",
          "body": "1234",
          "forbidHeaders": ["Content-Length"],
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "TestBlobPayloadNoParams",
          "input": {
            "shape": "TestBlobPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/blob-payload"
          }
        },
        "params": {},
        "serialized": {
          "uri": "/blob-payload",
          "body": "",
          "headers": {},
          "forbidHeaders": [
            "Content-Type"
          ],
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "NoPayload",
          "input": {
            "shape": "NoPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/no-payload"
          }
        },
        "params": {},
        "serialized": {
          "uri": "/no-payload",
          "body": "",
          "forbidHeaders": [
            "Content-Type",
            "Content-Length"
          ],
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "NoPayloadWithHeader",
          "input": {
            "shape": "NoPayloadRequest"
          },
          "http": {
            "method": "POST",
            "requestUri": "/no-payload"
          }
        },
        "params": {
          "testId": "t-12345"
        },
        "serialized": {
          "uri": "/no-payload",
          "body": "",
          "headers": {
              "x-amz-test-id": "t-12345"
          },
          "forbidHeaders": [
            "Content-Type",
            "Content-Length"
          ],
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "NoPayloadGET",
          "input": {
            "shape": "NoPayloadRequest"
          },
          "http": {
            "method": "GET",
            "requestUri": "/no-payload"
          }
        },
        "params": {},
        "serialized": {
          "uri": "/no-payload",
          "body": "",
          "forbidHeaders": [
            "Content-Type",
            "Content-Length"
          ],
          "host": "rest-json-test.amazonaws.com"
        }
      },
      {
        "given": {
          "name": "NoPayloadWithHeaderGET",
          "input": {
            "shape": "NoPayloadRequest"
          },
          "http": {
            "method": "GET",
            "requestUri": "/no-payload"
          }
        },
        "params": {
          "testId": "t-12345"
        },
        "serialized": {
          "uri": "/no-payload",
          "body": "",
          "headers": {
              "x-amz-test-id": "t-12345"
          },
          "forbidHeaders": [
            "Content-Type",
            "Content-Length"
          ],
          "host": "rest-json-test.amazonaws.com"
        }
      }
    ]
  },
  {
    "description": "List in header",
    "metadata": {
      "protocol": "rest-json",
      "apiVersion": "2014-01-01"
    },
    "clientEndpoint": "https://rest-json-test.amazonaws.com",
    "shapes": {
      "InputShape": {
        "type": "structure",
        "members": {
          "ListParam": {
            "shape": "ListShape",
            "location": "header",
            "locationName": "x-amz-list-param"
          }
        }
      },
      "ListShape": {
        "type": "list",
        "member": {
          "shape": "EnumType"
        }
      },
      "EnumType": {
        "type": "string",
        "enum": ["one", "two", "three"]
      }
    },
    "cases": [
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/2014-01-01/example"
          },
          "input": {
            "shape": "InputShape",
            "locationName": "OperationRequest"
          },
          "name": "OperationName"
        },
        "params": {
          "ListParam": [
            "one",
            "two",
            "three"
          ]
        },
        "serialized": {
          "method": "POST",
          "body": "",
          "uri": "/2014-01-01/example",
          "headers": {
            "x-amz-list-param": "one,two,three"
          }
        }
      },
      {
        "given": {
          "http": {
            "method": "POST",
            "requestUri": "/2014-01-01/example"
          },
          "input": {
            "shape": "InputShape",
            "locationName": "OperationRequest"
          },
          "name": "OperationName"
        },
        "params": {
          "ListParam": []
        },
        "serialized": {
          "method": "POST",
          "body": "",
          "uri": "/2014-01-01/example",
          "headers": {},
          "forbidHeaders": ["x-amz-list-param"]
        }
      }
    ]
  }
]