1[
2  {
3    "description": "Scalar members",
4    "metadata": {
5      "protocol": "query",
6      "apiVersion": "2014-01-01"
7    },
8    "shapes": {
9      "InputShape": {
10        "type": "structure",
11        "members": {
12          "Foo": {
13            "shape": "StringType"
14          },
15          "Bar": {
16            "shape": "StringType"
17          },
18          "Baz": {
19            "shape": "BooleanType"
20          }
21        }
22      },
23      "StringType": {
24        "type": "string"
25      },
26      "BooleanType": {
27        "type": "boolean"
28      }
29    },
30    "cases": [
31      {
32        "given": {
33          "input": {
34            "shape": "InputShape"
35          },
36          "name": "OperationName"
37        },
38        "params": {
39          "Foo": "val1",
40          "Bar": "val2"
41        },
42        "serialized": {
43          "uri": "/",
44          "body": "Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2"
45        }
46      },
47      {
48        "given": {
49          "input": {
50            "shape": "InputShape"
51          },
52          "name": "OperationName"
53        },
54        "params": {
55          "Baz": true
56        },
57        "serialized": {
58          "uri": "/",
59          "body": "Action=OperationName&Version=2014-01-01&Baz=true"
60        }
61      },
62      {
63        "given": {
64          "input": {
65            "shape": "InputShape"
66          },
67          "name": "OperationName"
68        },
69        "params": {
70          "Baz": false
71        },
72        "serialized": {
73          "uri": "/",
74          "body": "Action=OperationName&Version=2014-01-01&Baz=false"
75        }
76      }
77    ]
78  },
79  {
80    "description": "Nested structure members",
81    "metadata": {
82      "protocol": "query",
83      "apiVersion": "2014-01-01"
84    },
85    "shapes": {
86      "InputShape": {
87        "type": "structure",
88        "members": {
89          "StructArg": {
90            "shape": "StructType"
91          }
92        }
93      },
94      "StructType": {
95        "type": "structure",
96        "members": {
97          "ScalarArg": {
98            "shape": "StringType"
99          }
100        }
101      },
102      "StringType": {
103        "type": "string"
104      }
105    },
106    "cases": [
107      {
108        "given": {
109          "input": {
110            "shape": "InputShape"
111          },
112          "name": "OperationName"
113        },
114        "params": {
115          "StructArg": {
116            "ScalarArg": "foo"
117          }
118        },
119        "serialized": {
120          "uri": "/",
121          "body": "Action=OperationName&Version=2014-01-01&StructArg.ScalarArg=foo"
122        }
123      }
124    ]
125  },
126  {
127    "description": "List types",
128    "metadata": {
129      "protocol": "query",
130      "apiVersion": "2014-01-01"
131    },
132    "shapes": {
133      "InputShape": {
134        "type": "structure",
135        "members": {
136          "ListArg": {
137            "shape": "ListType"
138          }
139        }
140      },
141      "ListType": {
142        "type": "list",
143        "member": {
144          "shape": "Strings"
145        }
146      },
147      "Strings": {
148        "type": "string"
149      }
150    },
151    "cases": [
152      {
153        "given": {
154          "input": {
155            "shape": "InputShape"
156          },
157          "name": "OperationName"
158        },
159        "params": {
160          "ListArg": [
161            "foo",
162            "bar",
163            "baz"
164          ]
165        },
166        "serialized": {
167          "uri": "/",
168          "body": "Action=OperationName&Version=2014-01-01&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz"
169        }
170      },
171      {
172        "given": {
173          "input": {
174            "shape": "InputShape"
175          },
176          "name": "OperationName"
177        },
178        "params": {
179          "ListArg": []
180        },
181        "serialized": {
182          "uri": "/",
183          "body": "Action=OperationName&Version=2014-01-01&ListArg="
184        }
185      }
186    ]
187  },
188  {
189    "description": "Flattened list",
190    "metadata": {
191      "protocol": "query",
192      "apiVersion": "2014-01-01"
193    },
194    "shapes": {
195      "InputShape": {
196        "type": "structure",
197        "members": {
198          "ScalarArg": {
199            "shape": "StringType"
200          },
201          "ListArg": {
202            "shape": "ListType"
203          },
204          "NamedListArg": {
205            "shape": "NamedListType"
206          }
207        }
208      },
209      "ListType": {
210        "type": "list",
211        "member": {
212          "shape": "StringType"
213        },
214        "flattened": true
215      },
216      "NamedListType": {
217        "type": "list",
218        "member": {
219          "shape": "StringType",
220          "locationName": "Foo"
221        },
222        "flattened": true
223      },
224      "StringType": {
225        "type": "string"
226      }
227    },
228    "cases": [
229      {
230        "given": {
231          "input": {
232            "shape": "InputShape"
233          },
234          "name": "OperationName"
235        },
236        "params": {
237          "ScalarArg": "foo",
238          "ListArg": [
239            "a",
240            "b",
241            "c"
242          ]
243        },
244        "serialized": {
245          "uri": "/",
246          "body": "Action=OperationName&Version=2014-01-01&ScalarArg=foo&ListArg.1=a&ListArg.2=b&ListArg.3=c"
247        }
248      },
249      {
250        "given": {
251          "input": {
252            "shape": "InputShape"
253          },
254          "name": "OperationName"
255        },
256        "params": {
257          "NamedListArg": [
258            "a"
259          ]
260        },
261        "serialized": {
262          "uri": "/",
263          "body": "Action=OperationName&Version=2014-01-01&Foo.1=a"
264        }
265      }
266    ]
267  },
268  {
269    "description": "Serialize flattened map type",
270    "metadata": {
271      "protocol": "query",
272      "apiVersion": "2014-01-01"
273    },
274    "shapes": {
275      "InputShape": {
276        "type": "structure",
277        "members": {
278          "MapArg": {
279            "shape": "StringMap"
280          }
281        }
282      },
283      "StringMap": {
284        "type": "map",
285        "key": {
286          "shape": "StringType"
287        },
288        "value": {
289          "shape": "StringType"
290        },
291        "flattened": true
292      },
293      "StringType": {
294        "type": "string"
295      }
296    },
297    "cases": [
298      {
299        "given": {
300          "input": {
301            "shape": "InputShape"
302          },
303          "name": "OperationName"
304        },
305        "params": {
306          "MapArg": {
307            "key1": "val1",
308            "key2": "val2"
309          }
310        },
311        "serialized": {
312          "uri": "/",
313          "body": "Action=OperationName&Version=2014-01-01&MapArg.1.key=key1&MapArg.1.value=val1&MapArg.2.key=key2&MapArg.2.value=val2"
314        }
315      }
316    ]
317  },
318  {
319    "description": "Non flattened list with LocationName",
320    "metadata": {
321      "protocol": "query",
322      "apiVersion": "2014-01-01"
323    },
324    "shapes": {
325      "InputShape": {
326        "type": "structure",
327        "members": {
328          "ListArg": {
329            "shape": "ListType"
330          }
331        }
332      },
333      "ListType": {
334        "type": "list",
335        "member": {
336          "shape": "StringType",
337          "locationName": "item"
338        }
339      },
340      "StringType": {
341        "type": "string"
342      }
343    },
344    "cases": [
345      {
346        "given": {
347          "input": {
348            "shape": "InputShape"
349          },
350          "name": "OperationName"
351        },
352        "params": {
353          "ListArg": [
354            "a",
355            "b",
356            "c"
357          ]
358        },
359        "serialized": {
360          "uri": "/",
361          "body": "Action=OperationName&Version=2014-01-01&ListArg.item.1=a&ListArg.item.2=b&ListArg.item.3=c"
362        }
363      }
364    ]
365  },
366  {
367    "description": "Flattened list with LocationName",
368    "metadata": {
369      "protocol": "query",
370      "apiVersion": "2014-01-01"
371    },
372    "shapes": {
373      "InputShape": {
374        "type": "structure",
375        "members": {
376          "ScalarArg": {
377            "shape": "StringType"
378          },
379          "ListArg": {
380            "shape": "ListType"
381          }
382        }
383      },
384      "ListType": {
385        "type": "list",
386        "member": {
387          "shape": "StringType",
388          "locationName": "ListArgLocation"
389        },
390        "flattened": true
391      },
392      "StringType": {
393        "type": "string"
394      }
395    },
396    "cases": [
397      {
398        "given": {
399          "input": {
400            "shape": "InputShape"
401          },
402          "name": "OperationName"
403        },
404        "params": {
405          "ScalarArg": "foo",
406          "ListArg": [
407            "a",
408            "b",
409            "c"
410          ]
411        },
412        "serialized": {
413          "uri": "/",
414          "body": "Action=OperationName&Version=2014-01-01&ScalarArg=foo&ListArgLocation.1=a&ListArgLocation.2=b&ListArgLocation.3=c"
415        }
416      }
417    ]
418  },
419  {
420    "description": "Serialize map type",
421    "metadata": {
422      "protocol": "query",
423      "apiVersion": "2014-01-01"
424    },
425    "shapes": {
426      "InputShape": {
427        "type": "structure",
428        "members": {
429          "MapArg": {
430            "shape": "StringMap"
431          }
432        }
433      },
434      "StringMap": {
435        "type": "map",
436        "key": {
437          "shape": "StringType"
438        },
439        "value": {
440          "shape": "StringType"
441        }
442      },
443      "StringType": {
444        "type": "string"
445      }
446    },
447    "cases": [
448      {
449        "given": {
450          "input": {
451            "shape": "InputShape"
452          },
453          "name": "OperationName"
454        },
455        "params": {
456          "MapArg": {
457            "key1": "val1",
458            "key2": "val2"
459          }
460        },
461        "serialized": {
462          "uri": "/",
463          "body": "Action=OperationName&Version=2014-01-01&MapArg.entry.1.key=key1&MapArg.entry.1.value=val1&MapArg.entry.2.key=key2&MapArg.entry.2.value=val2"
464        }
465      }
466    ]
467  },
468  {
469    "description": "Serialize map type with locationName",
470    "metadata": {
471      "protocol": "query",
472      "apiVersion": "2014-01-01"
473    },
474    "shapes": {
475      "InputShape": {
476        "type": "structure",
477        "members": {
478          "MapArg": {
479            "shape": "StringMap"
480          }
481        }
482      },
483      "StringMap": {
484        "type": "map",
485        "key": {
486          "shape": "StringType",
487          "locationName": "TheKey"
488        },
489        "value": {
490          "shape": "StringType",
491          "locationName": "TheValue"
492        }
493      },
494      "StringType": {
495        "type": "string"
496      }
497    },
498    "cases": [
499      {
500        "given": {
501          "input": {
502            "shape": "InputShape"
503          },
504          "name": "OperationName"
505        },
506        "params": {
507          "MapArg": {
508            "key1": "val1",
509            "key2": "val2"
510          }
511        },
512        "serialized": {
513          "uri": "/",
514          "body": "Action=OperationName&Version=2014-01-01&MapArg.entry.1.TheKey=key1&MapArg.entry.1.TheValue=val1&MapArg.entry.2.TheKey=key2&MapArg.entry.2.TheValue=val2"
515        }
516      }
517    ]
518  },
519  {
520    "description": "Base64 encoded Blobs",
521    "metadata": {
522      "protocol": "query",
523      "apiVersion": "2014-01-01"
524    },
525    "shapes": {
526      "InputShape": {
527        "type": "structure",
528        "members": {
529          "BlobArg": {
530            "shape": "BlobType"
531          }
532        }
533      },
534      "BlobType": {
535        "type": "blob"
536      }
537    },
538    "cases": [
539      {
540        "given": {
541          "input": {
542            "shape": "InputShape"
543          },
544          "name": "OperationName"
545        },
546        "params": {
547          "BlobArg": "foo"
548        },
549        "serialized": {
550          "uri": "/",
551          "body": "Action=OperationName&Version=2014-01-01&BlobArg=Zm9v"
552        }
553      }
554    ]
555  },
556  {
557    "description": "Base64 encoded Blobs nested",
558    "metadata": {
559      "protocol": "query",
560      "apiVersion": "2014-01-01"
561    },
562    "shapes": {
563      "InputShape": {
564        "type": "structure",
565        "members": {
566		  "BlobArgs": {
567			"shape": "BlobsType"
568		  }
569        }
570      },
571	  "BlobsType": {
572        "type": "list",
573        "member": {
574          "shape": "BlobType"
575        },
576        "flattened": true
577	  },
578      "BlobType": {
579        "type": "blob"
580      }
581    },
582    "cases": [
583      {
584        "given": {
585          "input": {
586            "shape": "InputShape"
587          },
588          "name": "OperationName"
589        },
590        "params": {
591          "BlobArgs": ["foo"]
592        },
593        "serialized": {
594          "uri": "/",
595          "body": "Action=OperationName&Version=2014-01-01&BlobArgs.1=Zm9v"
596        }
597      }
598    ]
599  },
600  {
601    "description": "Timestamp values",
602    "metadata": {
603      "protocol": "query",
604      "apiVersion": "2014-01-01"
605    },
606    "shapes": {
607      "InputShape": {
608        "type": "structure",
609        "members": {
610          "TimeArg": {
611            "shape": "TimestampType"
612          }
613        }
614      },
615      "TimestampType": {
616        "type": "timestamp"
617      }
618    },
619    "cases": [
620      {
621        "given": {
622          "input": {
623            "shape": "InputShape"
624          },
625          "name": "OperationName"
626        },
627        "params": {
628          "TimeArg": 1422172800
629        },
630        "serialized": {
631          "uri": "/",
632          "body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z"
633        }
634      }
635    ]
636  },
637  {
638    "description": "Recursive shapes",
639    "metadata": {
640      "protocol": "query",
641      "apiVersion": "2014-01-01"
642    },
643    "shapes": {
644      "InputShape": {
645        "type": "structure",
646        "members": {
647          "RecursiveStruct": {
648            "shape": "RecursiveStructType"
649          }
650        }
651      },
652      "RecursiveStructType": {
653        "type": "structure",
654        "members": {
655          "NoRecurse": {
656            "shape": "StringType"
657          },
658          "RecursiveStruct": {
659            "shape": "RecursiveStructType"
660          },
661          "RecursiveList": {
662            "shape": "RecursiveListType"
663          },
664          "RecursiveMap": {
665            "shape": "RecursiveMapType"
666          }
667        }
668      },
669      "RecursiveListType": {
670        "type": "list",
671        "member": {
672          "shape": "RecursiveStructType"
673        }
674      },
675      "RecursiveMapType": {
676        "type": "map",
677        "key": {
678          "shape": "StringType"
679        },
680        "value": {
681          "shape": "RecursiveStructType"
682        }
683      },
684      "StringType": {
685        "type": "string"
686      }
687    },
688    "cases": [
689      {
690        "given": {
691          "input": {
692            "shape": "InputShape"
693          },
694          "name": "OperationName"
695        },
696        "params": {
697          "RecursiveStruct": {
698            "NoRecurse": "foo"
699          }
700        },
701        "serialized": {
702          "uri": "/",
703          "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.NoRecurse=foo"
704        }
705      },
706      {
707        "given": {
708          "input": {
709            "shape": "InputShape"
710          },
711          "name": "OperationName"
712        },
713        "params": {
714          "RecursiveStruct": {
715            "RecursiveStruct": {
716              "NoRecurse": "foo"
717            }
718          }
719        },
720        "serialized": {
721          "uri": "/",
722          "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveStruct.NoRecurse=foo"
723        }
724      },
725      {
726        "given": {
727          "input": {
728            "shape": "InputShape"
729          },
730          "name": "OperationName"
731        },
732        "params": {
733          "RecursiveStruct": {
734            "RecursiveStruct": {
735              "RecursiveStruct": {
736                "RecursiveStruct": {
737                  "NoRecurse": "foo"
738                }
739              }
740            }
741          }
742        },
743        "serialized": {
744          "uri": "/",
745          "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveStruct.RecursiveStruct.RecursiveStruct.NoRecurse=foo"
746        }
747      },
748      {
749        "given": {
750          "input": {
751            "shape": "InputShape"
752          },
753          "name": "OperationName"
754        },
755        "params": {
756          "RecursiveStruct": {
757            "RecursiveList": [
758              {
759                "NoRecurse": "foo"
760              },
761              {
762                "NoRecurse": "bar"
763              }
764            ]
765          }
766        },
767        "serialized": {
768          "uri": "/",
769          "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.NoRecurse=bar"
770        }
771      },
772      {
773        "given": {
774          "input": {
775            "shape": "InputShape"
776          },
777          "name": "OperationName"
778        },
779        "params": {
780          "RecursiveStruct": {
781            "RecursiveList": [
782              {
783                "NoRecurse": "foo"
784              },
785              {
786                "RecursiveStruct": {
787                  "NoRecurse": "bar"
788                }
789              }
790            ]
791          }
792        },
793        "serialized": {
794          "uri": "/",
795          "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.RecursiveStruct.NoRecurse=bar"
796        }
797      },
798      {
799        "given": {
800          "input": {
801            "shape": "InputShape"
802          },
803          "name": "OperationName"
804        },
805        "params": {
806          "RecursiveStruct": {
807            "RecursiveMap": {
808              "foo": {
809                "NoRecurse": "foo"
810              },
811              "bar": {
812                "NoRecurse": "bar"
813              }
814            }
815          }
816        },
817        "serialized": {
818          "uri": "/",
819          "body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveMap.entry.1.key=foo&RecursiveStruct.RecursiveMap.entry.1.value.NoRecurse=foo&RecursiveStruct.RecursiveMap.entry.2.key=bar&RecursiveStruct.RecursiveMap.entry.2.value.NoRecurse=bar"
820        }
821      }
822    ]
823  },
824  {
825    "description": "Idempotency token auto fill",
826    "metadata": {
827      "protocol": "query",
828      "apiVersion": "2014-01-01"
829    },
830    "shapes": {
831      "InputShape": {
832        "type": "structure",
833        "members": {
834          "Token": {
835            "shape": "StringType",
836              "idempotencyToken": true
837          }
838        }
839      },
840      "StringType": {
841        "type": "string"
842      }
843    },
844    "cases": [
845      {
846        "given": {
847          "input": {
848            "shape": "InputShape"
849          },
850          "http": {
851            "method": "POST"
852          },
853          "name": "OperationName"
854        },
855        "params": {
856          "Token": "abc123"
857        },
858        "serialized": {
859          "uri": "/",
860          "headers": {},
861          "body": "Action=OperationName&Version=2014-01-01&Token=abc123"
862        }
863      },
864      {
865        "given": {
866          "input": {
867            "shape": "InputShape"
868          },
869          "http": {
870            "method": "POST"
871          },
872          "name": "OperationName"
873        },
874        "params": {
875        },
876        "serialized": {
877          "uri": "/",
878          "headers": {},
879          "body": "Action=OperationName&Version=2014-01-01&Token=00000000-0000-4000-8000-000000000000"
880        }
881      }
882    ]
883  },
884  {
885    "description": "Enum",
886    "metadata": {
887      "protocol": "query",
888      "apiVersion": "2014-01-01"
889    },
890    "shapes": {
891      "InputShape": {
892        "type": "structure",
893        "members": {
894          "FooEnum": {
895            "shape": "EnumType"
896          },
897          "ListEnums": {
898            "shape": "EnumList"
899          }
900        }
901      },
902      "EnumType":{
903        "type":"string",
904        "enum":[
905          "foo",
906          "bar"
907        ]
908      },
909      "EnumList":{
910        "type":"list",
911        "member": {"shape": "EnumType"}
912      }
913    },
914    "cases": [
915      {
916        "given": {
917          "input": {
918            "shape": "InputShape"
919          },
920          "http": {
921            "method": "POST"
922          },
923          "name": "OperationName"
924        },
925        "params": {
926          "FooEnum": "foo",
927          "ListEnums": ["foo", "", "bar"]
928        },
929        "serialized": {
930          "uri": "/",
931          "headers": {},
932          "body": "Action=OperationName&Version=2014-01-01&FooEnum=foo&ListEnums.member.1=foo&ListEnums.member.2=&ListEnums.member.3=bar"
933        }
934      },
935      {
936        "given": {
937          "input": {
938            "shape": "InputShape"
939          },
940          "http": {
941            "method": "POST"
942          },
943          "name": "OperationName"
944        },
945        "params": {
946          "FooEnum": "foo"
947        },
948        "serialized": {
949          "uri": "/",
950          "headers": {},
951          "body": "Action=OperationName&Version=2014-01-01&FooEnum=foo"
952        }
953      },
954      {
955        "given": {
956          "input": {
957            "shape": "InputShape"
958          },
959          "http": {
960            "method": "POST"
961          }, "name": "OperationName"
962        },
963        "params": {
964        },
965        "serialized": {
966          "uri": "/",
967          "headers": {},
968          "body": "Action=OperationName&Version=2014-01-01"
969        }
970      }
971    ]
972  }
973]
974