query.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  1. [
  2. {
  3. "description": "Scalar members",
  4. "metadata": {
  5. "protocol": "query"
  6. },
  7. "shapes": {
  8. "OutputShape": {
  9. "type": "structure",
  10. "members": {
  11. "Str": {
  12. "shape": "StringType"
  13. },
  14. "Num": {
  15. "shape": "IntegerType",
  16. "locationName": "FooNum"
  17. },
  18. "FalseBool": {
  19. "shape": "BooleanType"
  20. },
  21. "TrueBool": {
  22. "shape": "BooleanType"
  23. },
  24. "Float": {
  25. "shape": "FloatType"
  26. },
  27. "Double": {
  28. "shape": "DoubleType"
  29. },
  30. "Long": {
  31. "shape": "LongType"
  32. },
  33. "Char": {
  34. "shape": "CharType"
  35. },
  36. "Timestamp": {
  37. "shape": "TimestampType"
  38. }
  39. }
  40. },
  41. "StringType": {
  42. "type": "string"
  43. },
  44. "IntegerType": {
  45. "type": "integer"
  46. },
  47. "BooleanType": {
  48. "type": "boolean"
  49. },
  50. "FloatType": {
  51. "type": "float"
  52. },
  53. "DoubleType": {
  54. "type": "double"
  55. },
  56. "LongType": {
  57. "type": "long"
  58. },
  59. "CharType": {
  60. "type": "character"
  61. },
  62. "TimestampType": {
  63. "type": "timestamp"
  64. }
  65. },
  66. "cases": [
  67. {
  68. "given": {
  69. "output": {
  70. "resultWrapper": "OperationNameResult",
  71. "shape": "OutputShape"
  72. },
  73. "name": "OperationName"
  74. },
  75. "result": {
  76. "Str": "myname",
  77. "Num": 123,
  78. "FalseBool": false,
  79. "TrueBool": true,
  80. "Float": 1.2,
  81. "Double": 1.3,
  82. "Long": 200,
  83. "Char": "a",
  84. "Timestamp": 1422172800
  85. },
  86. "response": {
  87. "status_code": 200,
  88. "headers": {},
  89. "body": "<OperationNameResponse><OperationNameResult><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp></OperationNameResult><ResponseMetadata><RequestId>request-id</RequestId></ResponseMetadata></OperationNameResponse>"
  90. }
  91. }
  92. ]
  93. },
  94. {
  95. "description": "Not all members in response",
  96. "metadata": {
  97. "protocol": "query"
  98. },
  99. "shapes": {
  100. "OutputShape": {
  101. "type": "structure",
  102. "members": {
  103. "Str": {
  104. "shape": "StringType"
  105. },
  106. "Num": {
  107. "shape": "IntegerType"
  108. }
  109. }
  110. },
  111. "StringType": {
  112. "type": "string"
  113. },
  114. "IntegerType": {
  115. "type": "integer"
  116. }
  117. },
  118. "cases": [
  119. {
  120. "given": {
  121. "output": {
  122. "resultWrapper": "OperationNameResult",
  123. "shape": "OutputShape"
  124. },
  125. "name": "OperationName"
  126. },
  127. "result": {
  128. "Str": "myname"
  129. },
  130. "response": {
  131. "status_code": 200,
  132. "headers": {},
  133. "body": "<OperationNameResponse><OperationNameResult><Str>myname</Str></OperationNameResult><ResponseMetadata><RequestId>request-id</RequestId></ResponseMetadata></OperationNameResponse>"
  134. }
  135. }
  136. ]
  137. },
  138. {
  139. "description": "Blob",
  140. "metadata": {
  141. "protocol": "query"
  142. },
  143. "shapes": {
  144. "OutputShape": {
  145. "type": "structure",
  146. "members": {
  147. "Blob": {
  148. "shape": "BlobType"
  149. }
  150. }
  151. },
  152. "BlobType": {
  153. "type": "blob"
  154. }
  155. },
  156. "cases": [
  157. {
  158. "given": {
  159. "output": {
  160. "resultWrapper": "OperationNameResult",
  161. "shape": "OutputShape"
  162. },
  163. "name": "OperationName"
  164. },
  165. "result": {
  166. "Blob": "value"
  167. },
  168. "response": {
  169. "status_code": 200,
  170. "headers": {},
  171. "body": "<OperationNameResponse><OperationNameResult><Blob>dmFsdWU=</Blob></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  172. }
  173. }
  174. ]
  175. },
  176. {
  177. "description": "Lists",
  178. "metadata": {
  179. "protocol": "query"
  180. },
  181. "shapes": {
  182. "OutputShape": {
  183. "type": "structure",
  184. "members": {
  185. "ListMember": {
  186. "shape": "ListShape"
  187. }
  188. }
  189. },
  190. "ListShape": {
  191. "type": "list",
  192. "member": {
  193. "shape": "StringType"
  194. }
  195. },
  196. "StringType": {
  197. "type": "string"
  198. }
  199. },
  200. "cases": [
  201. {
  202. "given": {
  203. "output": {
  204. "resultWrapper": "OperationNameResult",
  205. "shape": "OutputShape"
  206. },
  207. "name": "OperationName"
  208. },
  209. "result": {
  210. "ListMember": ["abc", "123"]
  211. },
  212. "response": {
  213. "status_code": 200,
  214. "headers": {},
  215. "body": "<OperationNameResponse><OperationNameResult><ListMember><member>abc</member><member>123</member></ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  216. }
  217. }
  218. ]
  219. },
  220. {
  221. "description": "List with custom member name",
  222. "metadata": {
  223. "protocol": "query"
  224. },
  225. "shapes": {
  226. "OutputShape": {
  227. "type": "structure",
  228. "members": {
  229. "ListMember": {
  230. "shape": "ListShape"
  231. }
  232. }
  233. },
  234. "ListShape": {
  235. "type": "list",
  236. "member": {
  237. "shape": "StringType",
  238. "locationName": "item"
  239. }
  240. },
  241. "StringType": {
  242. "type": "string"
  243. }
  244. },
  245. "cases": [
  246. {
  247. "given": {
  248. "output": {
  249. "resultWrapper": "OperationNameResult",
  250. "shape": "OutputShape"
  251. },
  252. "name": "OperationName"
  253. },
  254. "result": {
  255. "ListMember": ["abc", "123"]
  256. },
  257. "response": {
  258. "status_code": 200,
  259. "headers": {},
  260. "body": "<OperationNameResponse><OperationNameResult><ListMember><item>abc</item><item>123</item></ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  261. }
  262. }
  263. ]
  264. },
  265. {
  266. "description": "Flattened List",
  267. "metadata": {
  268. "protocol": "query"
  269. },
  270. "shapes": {
  271. "OutputShape": {
  272. "type": "structure",
  273. "members": {
  274. "ListMember": {
  275. "shape": "ListType"
  276. }
  277. }
  278. },
  279. "ListType": {
  280. "type": "list",
  281. "flattened": true,
  282. "member": {
  283. "shape": "StringType"
  284. }
  285. },
  286. "StringType": {
  287. "type": "string"
  288. }
  289. },
  290. "cases": [
  291. {
  292. "given": {
  293. "output": {
  294. "resultWrapper": "OperationNameResult",
  295. "shape": "OutputShape"
  296. },
  297. "name": "OperationName"
  298. },
  299. "result": {
  300. "ListMember": ["abc", "123"]
  301. },
  302. "response": {
  303. "status_code": 200,
  304. "headers": {},
  305. "body": "<OperationNameResponse><OperationNameResult><ListMember>abc</ListMember><ListMember>123</ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  306. }
  307. }
  308. ]
  309. },
  310. {
  311. "description": "Flattened single element list",
  312. "metadata": {
  313. "protocol": "query"
  314. },
  315. "shapes": {
  316. "OutputShape": {
  317. "type": "structure",
  318. "members": {
  319. "ListMember": {
  320. "shape": "ListType"
  321. }
  322. }
  323. },
  324. "ListType": {
  325. "type": "list",
  326. "flattened": true,
  327. "member": {
  328. "shape": "StringType"
  329. }
  330. },
  331. "StringType": {
  332. "type": "string"
  333. }
  334. },
  335. "cases": [
  336. {
  337. "given": {
  338. "output": {
  339. "resultWrapper": "OperationNameResult",
  340. "shape": "OutputShape"
  341. },
  342. "name": "OperationName"
  343. },
  344. "result": {
  345. "ListMember": ["abc"]
  346. },
  347. "response": {
  348. "status_code": 200,
  349. "headers": {},
  350. "body": "<OperationNameResponse><OperationNameResult><ListMember>abc</ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  351. }
  352. }
  353. ]
  354. },
  355. {
  356. "description": "List of structures",
  357. "metadata": {
  358. "protocol": "query"
  359. },
  360. "shapes": {
  361. "OutputShape": {
  362. "type": "structure",
  363. "members": {
  364. "List": {
  365. "shape": "ListOfStructs"
  366. }
  367. }
  368. },
  369. "ListOfStructs": {
  370. "type": "list",
  371. "member": {
  372. "shape": "StructureShape"
  373. }
  374. },
  375. "StructureShape": {
  376. "type": "structure",
  377. "members": {
  378. "Foo": {
  379. "shape": "StringShape"
  380. },
  381. "Bar": {
  382. "shape": "StringShape"
  383. },
  384. "Baz": {
  385. "shape": "StringShape"
  386. }
  387. }
  388. },
  389. "StringShape": {
  390. "type": "string"
  391. }
  392. },
  393. "cases": [
  394. {
  395. "given": {
  396. "output": {
  397. "resultWrapper": "OperationNameResult",
  398. "shape": "OutputShape"
  399. },
  400. "name": "OperationName"
  401. },
  402. "result": {
  403. "List": [{"Foo": "firstfoo", "Bar": "firstbar", "Baz": "firstbaz"}, {"Foo": "secondfoo", "Bar": "secondbar", "Baz": "secondbaz"}]
  404. },
  405. "response": {
  406. "status_code": 200,
  407. "headers": {},
  408. "body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><List><member><Foo>firstfoo</Foo><Bar>firstbar</Bar><Baz>firstbaz</Baz></member><member><Foo>secondfoo</Foo><Bar>secondbar</Bar><Baz>secondbaz</Baz></member></List></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  409. }
  410. }
  411. ]
  412. },
  413. {
  414. "description": "Flattened list of structures",
  415. "metadata": {
  416. "protocol": "query"
  417. },
  418. "shapes": {
  419. "OutputShape": {
  420. "type": "structure",
  421. "resultWrapper": "OperationNameResult",
  422. "members": {
  423. "List": {
  424. "shape": "ListOfStructs"
  425. }
  426. }
  427. },
  428. "ListOfStructs": {
  429. "type": "list",
  430. "flattened": true,
  431. "member": {
  432. "shape": "StructureShape"
  433. }
  434. },
  435. "StructureShape": {
  436. "type": "structure",
  437. "members": {
  438. "Foo": {
  439. "shape": "StringShape"
  440. },
  441. "Bar": {
  442. "shape": "StringShape"
  443. },
  444. "Baz": {
  445. "shape": "StringShape"
  446. }
  447. }
  448. },
  449. "StringShape": {
  450. "type": "string"
  451. }
  452. },
  453. "cases": [
  454. {
  455. "given": {
  456. "output": {
  457. "shape": "OutputShape"
  458. },
  459. "name": "OperationName"
  460. },
  461. "result": {
  462. "List": [{"Foo": "firstfoo", "Bar": "firstbar", "Baz": "firstbaz"}, {"Foo": "secondfoo", "Bar": "secondbar", "Baz": "secondbaz"}]
  463. },
  464. "response": {
  465. "status_code": 200,
  466. "headers": {},
  467. "body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><List><Foo>firstfoo</Foo><Bar>firstbar</Bar><Baz>firstbaz</Baz></List><List><Foo>secondfoo</Foo><Bar>secondbar</Bar><Baz>secondbaz</Baz></List></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  468. }
  469. }
  470. ]
  471. },
  472. {
  473. "description": "Flattened list with location name",
  474. "metadata": {
  475. "protocol": "query"
  476. },
  477. "shapes": {
  478. "OutputShape": {
  479. "type": "structure",
  480. "members": {
  481. "List": {
  482. "shape": "ListType"
  483. }
  484. }
  485. },
  486. "ListType": {
  487. "type": "list",
  488. "flattened": true,
  489. "member": {
  490. "shape": "StringShape",
  491. "locationName": "NamedList"
  492. }
  493. },
  494. "StringShape": {
  495. "type": "string"
  496. }
  497. },
  498. "cases": [
  499. {
  500. "given": {
  501. "output": {
  502. "resultWrapper": "OperationNameResult",
  503. "shape": "OutputShape"
  504. },
  505. "name": "OperationName"
  506. },
  507. "result": {
  508. "List": ["a", "b"]
  509. },
  510. "response": {
  511. "status_code": 200,
  512. "headers": {},
  513. "body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><NamedList>a</NamedList><NamedList>b</NamedList></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  514. }
  515. }
  516. ]
  517. },
  518. {
  519. "description": "Normal map",
  520. "metadata": {
  521. "protocol": "query"
  522. },
  523. "shapes": {
  524. "OutputShape": {
  525. "type": "structure",
  526. "members": {
  527. "Map": {
  528. "shape": "StringMap"
  529. }
  530. }
  531. },
  532. "StringMap": {
  533. "type": "map",
  534. "key": {
  535. "shape": "StringType"
  536. },
  537. "value": {
  538. "shape": "StructType"
  539. }
  540. },
  541. "StringType": {
  542. "type": "string"
  543. },
  544. "StructType": {
  545. "type": "structure",
  546. "members": {
  547. "foo": {
  548. "shape": "StringType"
  549. }
  550. }
  551. }
  552. },
  553. "cases": [
  554. {
  555. "given": {
  556. "output": {
  557. "resultWrapper": "OperationNameResult",
  558. "shape": "OutputShape"
  559. },
  560. "name": "OperationName"
  561. },
  562. "result": {
  563. "Map": {
  564. "qux": {
  565. "foo": "bar"
  566. },
  567. "baz": {
  568. "foo": "bam"
  569. }
  570. }
  571. },
  572. "response": {
  573. "status_code": 200,
  574. "headers": {},
  575. "body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08\"><OperationNameResult><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  576. }
  577. }
  578. ]
  579. },
  580. {
  581. "description": "Flattened map",
  582. "metadata": {
  583. "protocol": "query"
  584. },
  585. "shapes": {
  586. "OutputShape": {
  587. "type": "structure",
  588. "members": {
  589. "Map": {
  590. "shape": "StringMap",
  591. "flattened": true
  592. }
  593. }
  594. },
  595. "StringMap": {
  596. "type": "map",
  597. "key": {
  598. "shape": "StringType"
  599. },
  600. "value": {
  601. "shape": "StringType"
  602. }
  603. },
  604. "StringType": {
  605. "type": "string"
  606. }
  607. },
  608. "cases": [
  609. {
  610. "given": {
  611. "output": {
  612. "resultWrapper": "OperationNameResult",
  613. "shape": "OutputShape"
  614. },
  615. "name": "OperationName"
  616. },
  617. "result": {
  618. "Map": {
  619. "qux": "bar",
  620. "baz": "bam"
  621. }
  622. },
  623. "response": {
  624. "status_code": 200,
  625. "headers": {},
  626. "body": "<OperationNameResponse><OperationNameResult><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  627. }
  628. }
  629. ]
  630. },
  631. {
  632. "description": "Flattened map in shape definition",
  633. "metadata": {
  634. "protocol": "query"
  635. },
  636. "shapes": {
  637. "OutputShape": {
  638. "type": "structure",
  639. "members": {
  640. "Map": {
  641. "shape": "StringMap",
  642. "locationName": "Attribute"
  643. }
  644. }
  645. },
  646. "StringMap": {
  647. "type": "map",
  648. "key": {
  649. "shape": "StringType",
  650. "locationName": "Name"
  651. },
  652. "value": {
  653. "shape": "StringType",
  654. "locationName": "Value"
  655. },
  656. "flattened": true,
  657. "locationName": "Attribute"
  658. },
  659. "StringType": {
  660. "type": "string"
  661. }
  662. },
  663. "cases": [
  664. {
  665. "given": {
  666. "output": {
  667. "resultWrapper": "OperationNameResult",
  668. "shape": "OutputShape"
  669. },
  670. "name": "OperationName"
  671. },
  672. "result": {
  673. "Map": {
  674. "qux": "bar"
  675. }
  676. },
  677. "response": {
  678. "status_code": 200,
  679. "headers": {},
  680. "body": "<OperationNameResponse><OperationNameResult><Attribute><Name>qux</Name><Value>bar</Value></Attribute></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  681. }
  682. }
  683. ]
  684. },
  685. {
  686. "description": "Named map",
  687. "metadata": {
  688. "protocol": "query"
  689. },
  690. "shapes": {
  691. "OutputShape": {
  692. "type": "structure",
  693. "members": {
  694. "Map": {
  695. "shape": "MapType"
  696. }
  697. }
  698. },
  699. "MapType": {
  700. "type": "map",
  701. "flattened": true,
  702. "key": {
  703. "locationName": "foo",
  704. "shape": "StringType"
  705. },
  706. "value": {
  707. "locationName": "bar",
  708. "shape": "StringType"
  709. }
  710. },
  711. "StringType": {
  712. "type": "string"
  713. }
  714. },
  715. "cases": [
  716. {
  717. "given": {
  718. "output": {
  719. "resultWrapper": "OperationNameResult",
  720. "shape": "OutputShape"
  721. },
  722. "name": "OperationName"
  723. },
  724. "result": {
  725. "Map": {
  726. "qux": "bar",
  727. "baz": "bam"
  728. }
  729. },
  730. "response": {
  731. "status_code": 200,
  732. "headers": {},
  733. "body": "<OperationNameResponse><OperationNameResult><Map><foo>qux</foo><bar>bar</bar></Map><Map><foo>baz</foo><bar>bam</bar></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
  734. }
  735. }
  736. ]
  737. },
  738. {
  739. "description": "Empty string",
  740. "metadata": {
  741. "protocol": "query"
  742. },
  743. "shapes": {
  744. "OutputShape": {
  745. "type": "structure",
  746. "members": {
  747. "Foo": {
  748. "shape": "StringType"
  749. }
  750. }
  751. },
  752. "StringType": {
  753. "type": "string"
  754. }
  755. },
  756. "cases": [
  757. {
  758. "given": {
  759. "output": {
  760. "shape": "OutputShape"
  761. },
  762. "name": "OperationName"
  763. },
  764. "result": {
  765. "Foo": ""
  766. },
  767. "response": {
  768. "status_code": 200,
  769. "headers": {},
  770. "body": "<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>"
  771. }
  772. }
  773. ]
  774. }
  775. ]