github.com/aavshr/aws-sdk-go@v1.41.3/models/protocol_tests/output/query.json (about) 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 "resultWrapper": "OperationNameResult", 761 "shape": "OutputShape" 762 }, 763 "name": "OperationName" 764 }, 765 "result": { 766 "Foo": "" 767 }, 768 "response": { 769 "status_code": 200, 770 "headers": {}, 771 "body": "<OperationNameResponse><OperationNameResult><Foo/></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>" 772 } 773 } 774 ] 775 }, 776 { 777 "description": "Timestamp members", 778 "metadata": { 779 "protocol": "query" 780 }, 781 "shapes": { 782 "OutputShape": { 783 "type": "structure", 784 "members": { 785 "TimeArg": { 786 "shape": "TimestampType" 787 }, 788 "TimeCustom": { 789 "timestampFormat": "rfc822", 790 "shape": "TimestampType" 791 }, 792 "TimeFormat": { 793 "shape": "TimestampFormatType" 794 }, 795 "StructMember": { 796 "shape": "TimeContainer" 797 } 798 } 799 }, 800 "TimeContainer": { 801 "type": "structure", 802 "members": { 803 "foo": { 804 "shape": "TimestampType" 805 }, 806 "bar": { 807 "shape": "TimestampFormatType" 808 } 809 } 810 }, 811 "TimestampFormatType": { 812 "timestampFormat": "unixTimestamp", 813 "type": "timestamp" 814 }, 815 "TimestampType": { 816 "type": "timestamp" 817 } 818 }, 819 "cases": [ 820 { 821 "given": { 822 "output": { 823 "shape": "OutputShape" 824 }, 825 "name": "OperationName" 826 }, 827 "result": { 828 "TimeArg": 1398796238, 829 "TimeCustom": 1398796238, 830 "TimeFormat": 1398796238, 831 "StructMember": { 832 "foo": 1398796238, 833 "bar": 1398796238 834 } 835 }, 836 "response": { 837 "status_code": 200, 838 "headers": {}, 839 "body": "<OperationNameResponse><StructMember><foo>2014-04-29T18:30:38Z</foo><bar>1398796238</bar></StructMember><TimeArg>2014-04-29T18:30:38Z</TimeArg><TimeCustom>Tue, 29 Apr 2014 18:30:38 GMT</TimeCustom><TimeFormat>1398796238</TimeFormat><RequestId>requestid</RequestId></OperationNameResponse>" 840 } 841 } 842 ] 843 }, 844 { 845 "description": "Enum output", 846 "metadata": { 847 "protocol": "query" 848 }, 849 "shapes": { 850 "OutputShape": { 851 "type": "structure", 852 "members": { 853 "FooEnum": { 854 "shape": "EC2EnumType" 855 }, 856 "ListEnums": { 857 "shape": "EC2EnumList" 858 } 859 } 860 }, 861 "EC2EnumType":{ 862 "type":"string", 863 "enum":[ 864 "foo", 865 "bar" 866 ] 867 }, 868 "EC2EnumList":{ 869 "type":"list", 870 "member": {"shape": "EC2EnumType"} 871 } 872 }, 873 "cases": [ 874 { 875 "given": { 876 "output": { 877 "shape": "OutputShape" 878 }, 879 "name": "OperationName" 880 }, 881 "result": { 882 "FooEnum": "foo", 883 "ListEnums": ["foo", "bar"] 884 }, 885 "response": { 886 "status_code": 200, 887 "headers": {}, 888 "body": "<OperationNameResponse><FooEnum>foo</FooEnum><ListEnums><member>foo</member><member>bar</member></ListEnums></OperationNameResponse>" 889 } 890 } 891 ] 892 } 893 ]