@aws-sdk/client-rekognition 3.503.1 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -1522,7 +1522,7 @@ var se_UpdateStreamProcessorCommand = /* @__PURE__ */ __name(async (input, conte
1522
1522
  }, "se_UpdateStreamProcessorCommand");
1523
1523
  var de_AssociateFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
1524
1524
  if (output.statusCode >= 300) {
1525
- return de_AssociateFacesCommandError(output, context);
1525
+ return de_CommandError(output, context);
1526
1526
  }
1527
1527
  const data = await parseBody(output.body, context);
1528
1528
  let contents = {};
@@ -1533,52 +1533,9 @@ var de_AssociateFacesCommand = /* @__PURE__ */ __name(async (output, context) =>
1533
1533
  };
1534
1534
  return response;
1535
1535
  }, "de_AssociateFacesCommand");
1536
- var de_AssociateFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
1537
- const parsedOutput = {
1538
- ...output,
1539
- body: await parseErrorBody(output.body, context)
1540
- };
1541
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1542
- switch (errorCode) {
1543
- case "AccessDeniedException":
1544
- case "com.amazonaws.rekognition#AccessDeniedException":
1545
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1546
- case "ConflictException":
1547
- case "com.amazonaws.rekognition#ConflictException":
1548
- throw await de_ConflictExceptionRes(parsedOutput, context);
1549
- case "IdempotentParameterMismatchException":
1550
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
1551
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1552
- case "InternalServerError":
1553
- case "com.amazonaws.rekognition#InternalServerError":
1554
- throw await de_InternalServerErrorRes(parsedOutput, context);
1555
- case "InvalidParameterException":
1556
- case "com.amazonaws.rekognition#InvalidParameterException":
1557
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1558
- case "ProvisionedThroughputExceededException":
1559
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1560
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1561
- case "ResourceNotFoundException":
1562
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1563
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1564
- case "ServiceQuotaExceededException":
1565
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
1566
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1567
- case "ThrottlingException":
1568
- case "com.amazonaws.rekognition#ThrottlingException":
1569
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1570
- default:
1571
- const parsedBody = parsedOutput.body;
1572
- return throwDefaultError({
1573
- output,
1574
- parsedBody,
1575
- errorCode
1576
- });
1577
- }
1578
- }, "de_AssociateFacesCommandError");
1579
1536
  var de_CompareFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
1580
1537
  if (output.statusCode >= 300) {
1581
- return de_CompareFacesCommandError(output, context);
1538
+ return de_CommandError(output, context);
1582
1539
  }
1583
1540
  const data = await parseBody(output.body, context);
1584
1541
  let contents = {};
@@ -1589,49 +1546,9 @@ var de_CompareFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
1589
1546
  };
1590
1547
  return response;
1591
1548
  }, "de_CompareFacesCommand");
1592
- var de_CompareFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
1593
- const parsedOutput = {
1594
- ...output,
1595
- body: await parseErrorBody(output.body, context)
1596
- };
1597
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1598
- switch (errorCode) {
1599
- case "AccessDeniedException":
1600
- case "com.amazonaws.rekognition#AccessDeniedException":
1601
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1602
- case "ImageTooLargeException":
1603
- case "com.amazonaws.rekognition#ImageTooLargeException":
1604
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1605
- case "InternalServerError":
1606
- case "com.amazonaws.rekognition#InternalServerError":
1607
- throw await de_InternalServerErrorRes(parsedOutput, context);
1608
- case "InvalidImageFormatException":
1609
- case "com.amazonaws.rekognition#InvalidImageFormatException":
1610
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1611
- case "InvalidParameterException":
1612
- case "com.amazonaws.rekognition#InvalidParameterException":
1613
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1614
- case "InvalidS3ObjectException":
1615
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1616
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1617
- case "ProvisionedThroughputExceededException":
1618
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1619
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1620
- case "ThrottlingException":
1621
- case "com.amazonaws.rekognition#ThrottlingException":
1622
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1623
- default:
1624
- const parsedBody = parsedOutput.body;
1625
- return throwDefaultError({
1626
- output,
1627
- parsedBody,
1628
- errorCode
1629
- });
1630
- }
1631
- }, "de_CompareFacesCommandError");
1632
1549
  var de_CopyProjectVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1633
1550
  if (output.statusCode >= 300) {
1634
- return de_CopyProjectVersionCommandError(output, context);
1551
+ return de_CommandError(output, context);
1635
1552
  }
1636
1553
  const data = await parseBody(output.body, context);
1637
1554
  let contents = {};
@@ -1642,52 +1559,9 @@ var de_CopyProjectVersionCommand = /* @__PURE__ */ __name(async (output, context
1642
1559
  };
1643
1560
  return response;
1644
1561
  }, "de_CopyProjectVersionCommand");
1645
- var de_CopyProjectVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1646
- const parsedOutput = {
1647
- ...output,
1648
- body: await parseErrorBody(output.body, context)
1649
- };
1650
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1651
- switch (errorCode) {
1652
- case "AccessDeniedException":
1653
- case "com.amazonaws.rekognition#AccessDeniedException":
1654
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1655
- case "InternalServerError":
1656
- case "com.amazonaws.rekognition#InternalServerError":
1657
- throw await de_InternalServerErrorRes(parsedOutput, context);
1658
- case "InvalidParameterException":
1659
- case "com.amazonaws.rekognition#InvalidParameterException":
1660
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1661
- case "LimitExceededException":
1662
- case "com.amazonaws.rekognition#LimitExceededException":
1663
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1664
- case "ProvisionedThroughputExceededException":
1665
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1666
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1667
- case "ResourceInUseException":
1668
- case "com.amazonaws.rekognition#ResourceInUseException":
1669
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1670
- case "ResourceNotFoundException":
1671
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1672
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1673
- case "ServiceQuotaExceededException":
1674
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
1675
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1676
- case "ThrottlingException":
1677
- case "com.amazonaws.rekognition#ThrottlingException":
1678
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1679
- default:
1680
- const parsedBody = parsedOutput.body;
1681
- return throwDefaultError({
1682
- output,
1683
- parsedBody,
1684
- errorCode
1685
- });
1686
- }
1687
- }, "de_CopyProjectVersionCommandError");
1688
1562
  var de_CreateCollectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1689
1563
  if (output.statusCode >= 300) {
1690
- return de_CreateCollectionCommandError(output, context);
1564
+ return de_CommandError(output, context);
1691
1565
  }
1692
1566
  const data = await parseBody(output.body, context);
1693
1567
  let contents = {};
@@ -1698,46 +1572,9 @@ var de_CreateCollectionCommand = /* @__PURE__ */ __name(async (output, context)
1698
1572
  };
1699
1573
  return response;
1700
1574
  }, "de_CreateCollectionCommand");
1701
- var de_CreateCollectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1702
- const parsedOutput = {
1703
- ...output,
1704
- body: await parseErrorBody(output.body, context)
1705
- };
1706
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1707
- switch (errorCode) {
1708
- case "AccessDeniedException":
1709
- case "com.amazonaws.rekognition#AccessDeniedException":
1710
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1711
- case "InternalServerError":
1712
- case "com.amazonaws.rekognition#InternalServerError":
1713
- throw await de_InternalServerErrorRes(parsedOutput, context);
1714
- case "InvalidParameterException":
1715
- case "com.amazonaws.rekognition#InvalidParameterException":
1716
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1717
- case "ProvisionedThroughputExceededException":
1718
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1719
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1720
- case "ResourceAlreadyExistsException":
1721
- case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
1722
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1723
- case "ServiceQuotaExceededException":
1724
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
1725
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1726
- case "ThrottlingException":
1727
- case "com.amazonaws.rekognition#ThrottlingException":
1728
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1729
- default:
1730
- const parsedBody = parsedOutput.body;
1731
- return throwDefaultError({
1732
- output,
1733
- parsedBody,
1734
- errorCode
1735
- });
1736
- }
1737
- }, "de_CreateCollectionCommandError");
1738
1575
  var de_CreateDatasetCommand = /* @__PURE__ */ __name(async (output, context) => {
1739
1576
  if (output.statusCode >= 300) {
1740
- return de_CreateDatasetCommandError(output, context);
1577
+ return de_CommandError(output, context);
1741
1578
  }
1742
1579
  const data = await parseBody(output.body, context);
1743
1580
  let contents = {};
@@ -1748,52 +1585,9 @@ var de_CreateDatasetCommand = /* @__PURE__ */ __name(async (output, context) =>
1748
1585
  };
1749
1586
  return response;
1750
1587
  }, "de_CreateDatasetCommand");
1751
- var de_CreateDatasetCommandError = /* @__PURE__ */ __name(async (output, context) => {
1752
- const parsedOutput = {
1753
- ...output,
1754
- body: await parseErrorBody(output.body, context)
1755
- };
1756
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1757
- switch (errorCode) {
1758
- case "AccessDeniedException":
1759
- case "com.amazonaws.rekognition#AccessDeniedException":
1760
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1761
- case "InternalServerError":
1762
- case "com.amazonaws.rekognition#InternalServerError":
1763
- throw await de_InternalServerErrorRes(parsedOutput, context);
1764
- case "InvalidParameterException":
1765
- case "com.amazonaws.rekognition#InvalidParameterException":
1766
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1767
- case "InvalidS3ObjectException":
1768
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1769
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1770
- case "LimitExceededException":
1771
- case "com.amazonaws.rekognition#LimitExceededException":
1772
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1773
- case "ProvisionedThroughputExceededException":
1774
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1775
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1776
- case "ResourceAlreadyExistsException":
1777
- case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
1778
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1779
- case "ResourceNotFoundException":
1780
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1781
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1782
- case "ThrottlingException":
1783
- case "com.amazonaws.rekognition#ThrottlingException":
1784
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1785
- default:
1786
- const parsedBody = parsedOutput.body;
1787
- return throwDefaultError({
1788
- output,
1789
- parsedBody,
1790
- errorCode
1791
- });
1792
- }
1793
- }, "de_CreateDatasetCommandError");
1794
1588
  var de_CreateFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
1795
1589
  if (output.statusCode >= 300) {
1796
- return de_CreateFaceLivenessSessionCommandError(output, context);
1590
+ return de_CommandError(output, context);
1797
1591
  }
1798
1592
  const data = await parseBody(output.body, context);
1799
1593
  let contents = {};
@@ -1804,40 +1598,9 @@ var de_CreateFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (output,
1804
1598
  };
1805
1599
  return response;
1806
1600
  }, "de_CreateFaceLivenessSessionCommand");
1807
- var de_CreateFaceLivenessSessionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1808
- const parsedOutput = {
1809
- ...output,
1810
- body: await parseErrorBody(output.body, context)
1811
- };
1812
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1813
- switch (errorCode) {
1814
- case "AccessDeniedException":
1815
- case "com.amazonaws.rekognition#AccessDeniedException":
1816
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1817
- case "InternalServerError":
1818
- case "com.amazonaws.rekognition#InternalServerError":
1819
- throw await de_InternalServerErrorRes(parsedOutput, context);
1820
- case "InvalidParameterException":
1821
- case "com.amazonaws.rekognition#InvalidParameterException":
1822
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1823
- case "ProvisionedThroughputExceededException":
1824
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1825
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1826
- case "ThrottlingException":
1827
- case "com.amazonaws.rekognition#ThrottlingException":
1828
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1829
- default:
1830
- const parsedBody = parsedOutput.body;
1831
- return throwDefaultError({
1832
- output,
1833
- parsedBody,
1834
- errorCode
1835
- });
1836
- }
1837
- }, "de_CreateFaceLivenessSessionCommandError");
1838
1601
  var de_CreateProjectCommand = /* @__PURE__ */ __name(async (output, context) => {
1839
1602
  if (output.statusCode >= 300) {
1840
- return de_CreateProjectCommandError(output, context);
1603
+ return de_CommandError(output, context);
1841
1604
  }
1842
1605
  const data = await parseBody(output.body, context);
1843
1606
  let contents = {};
@@ -1848,102 +1611,22 @@ var de_CreateProjectCommand = /* @__PURE__ */ __name(async (output, context) =>
1848
1611
  };
1849
1612
  return response;
1850
1613
  }, "de_CreateProjectCommand");
1851
- var de_CreateProjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
1852
- const parsedOutput = {
1853
- ...output,
1854
- body: await parseErrorBody(output.body, context)
1855
- };
1856
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1857
- switch (errorCode) {
1858
- case "AccessDeniedException":
1859
- case "com.amazonaws.rekognition#AccessDeniedException":
1860
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1861
- case "InternalServerError":
1862
- case "com.amazonaws.rekognition#InternalServerError":
1863
- throw await de_InternalServerErrorRes(parsedOutput, context);
1864
- case "InvalidParameterException":
1865
- case "com.amazonaws.rekognition#InvalidParameterException":
1866
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1867
- case "LimitExceededException":
1868
- case "com.amazonaws.rekognition#LimitExceededException":
1869
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1870
- case "ProvisionedThroughputExceededException":
1871
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1872
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1873
- case "ResourceInUseException":
1874
- case "com.amazonaws.rekognition#ResourceInUseException":
1875
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1876
- case "ThrottlingException":
1877
- case "com.amazonaws.rekognition#ThrottlingException":
1878
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1879
- default:
1880
- const parsedBody = parsedOutput.body;
1881
- return throwDefaultError({
1882
- output,
1883
- parsedBody,
1884
- errorCode
1885
- });
1886
- }
1887
- }, "de_CreateProjectCommandError");
1888
- var de_CreateProjectVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1889
- if (output.statusCode >= 300) {
1890
- return de_CreateProjectVersionCommandError(output, context);
1891
- }
1892
- const data = await parseBody(output.body, context);
1893
- let contents = {};
1894
- contents = (0, import_smithy_client._json)(data);
1895
- const response = {
1896
- $metadata: deserializeMetadata(output),
1897
- ...contents
1614
+ var de_CreateProjectVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
1615
+ if (output.statusCode >= 300) {
1616
+ return de_CommandError(output, context);
1617
+ }
1618
+ const data = await parseBody(output.body, context);
1619
+ let contents = {};
1620
+ contents = (0, import_smithy_client._json)(data);
1621
+ const response = {
1622
+ $metadata: deserializeMetadata(output),
1623
+ ...contents
1898
1624
  };
1899
1625
  return response;
1900
1626
  }, "de_CreateProjectVersionCommand");
1901
- var de_CreateProjectVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1902
- const parsedOutput = {
1903
- ...output,
1904
- body: await parseErrorBody(output.body, context)
1905
- };
1906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1907
- switch (errorCode) {
1908
- case "AccessDeniedException":
1909
- case "com.amazonaws.rekognition#AccessDeniedException":
1910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1911
- case "InternalServerError":
1912
- case "com.amazonaws.rekognition#InternalServerError":
1913
- throw await de_InternalServerErrorRes(parsedOutput, context);
1914
- case "InvalidParameterException":
1915
- case "com.amazonaws.rekognition#InvalidParameterException":
1916
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1917
- case "LimitExceededException":
1918
- case "com.amazonaws.rekognition#LimitExceededException":
1919
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1920
- case "ProvisionedThroughputExceededException":
1921
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1922
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1923
- case "ResourceInUseException":
1924
- case "com.amazonaws.rekognition#ResourceInUseException":
1925
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1926
- case "ResourceNotFoundException":
1927
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1928
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1929
- case "ServiceQuotaExceededException":
1930
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
1931
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1932
- case "ThrottlingException":
1933
- case "com.amazonaws.rekognition#ThrottlingException":
1934
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1935
- default:
1936
- const parsedBody = parsedOutput.body;
1937
- return throwDefaultError({
1938
- output,
1939
- parsedBody,
1940
- errorCode
1941
- });
1942
- }
1943
- }, "de_CreateProjectVersionCommandError");
1944
1627
  var de_CreateStreamProcessorCommand = /* @__PURE__ */ __name(async (output, context) => {
1945
1628
  if (output.statusCode >= 300) {
1946
- return de_CreateStreamProcessorCommandError(output, context);
1629
+ return de_CommandError(output, context);
1947
1630
  }
1948
1631
  const data = await parseBody(output.body, context);
1949
1632
  let contents = {};
@@ -1954,49 +1637,9 @@ var de_CreateStreamProcessorCommand = /* @__PURE__ */ __name(async (output, cont
1954
1637
  };
1955
1638
  return response;
1956
1639
  }, "de_CreateStreamProcessorCommand");
1957
- var de_CreateStreamProcessorCommandError = /* @__PURE__ */ __name(async (output, context) => {
1958
- const parsedOutput = {
1959
- ...output,
1960
- body: await parseErrorBody(output.body, context)
1961
- };
1962
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1963
- switch (errorCode) {
1964
- case "AccessDeniedException":
1965
- case "com.amazonaws.rekognition#AccessDeniedException":
1966
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1967
- case "InternalServerError":
1968
- case "com.amazonaws.rekognition#InternalServerError":
1969
- throw await de_InternalServerErrorRes(parsedOutput, context);
1970
- case "InvalidParameterException":
1971
- case "com.amazonaws.rekognition#InvalidParameterException":
1972
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1973
- case "LimitExceededException":
1974
- case "com.amazonaws.rekognition#LimitExceededException":
1975
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1976
- case "ProvisionedThroughputExceededException":
1977
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1978
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1979
- case "ResourceInUseException":
1980
- case "com.amazonaws.rekognition#ResourceInUseException":
1981
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1982
- case "ServiceQuotaExceededException":
1983
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
1984
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1985
- case "ThrottlingException":
1986
- case "com.amazonaws.rekognition#ThrottlingException":
1987
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1988
- default:
1989
- const parsedBody = parsedOutput.body;
1990
- return throwDefaultError({
1991
- output,
1992
- parsedBody,
1993
- errorCode
1994
- });
1995
- }
1996
- }, "de_CreateStreamProcessorCommandError");
1997
1640
  var de_CreateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
1998
1641
  if (output.statusCode >= 300) {
1999
- return de_CreateUserCommandError(output, context);
1642
+ return de_CommandError(output, context);
2000
1643
  }
2001
1644
  const data = await parseBody(output.body, context);
2002
1645
  let contents = {};
@@ -2007,52 +1650,9 @@ var de_CreateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
2007
1650
  };
2008
1651
  return response;
2009
1652
  }, "de_CreateUserCommand");
2010
- var de_CreateUserCommandError = /* @__PURE__ */ __name(async (output, context) => {
2011
- const parsedOutput = {
2012
- ...output,
2013
- body: await parseErrorBody(output.body, context)
2014
- };
2015
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2016
- switch (errorCode) {
2017
- case "AccessDeniedException":
2018
- case "com.amazonaws.rekognition#AccessDeniedException":
2019
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2020
- case "ConflictException":
2021
- case "com.amazonaws.rekognition#ConflictException":
2022
- throw await de_ConflictExceptionRes(parsedOutput, context);
2023
- case "IdempotentParameterMismatchException":
2024
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
2025
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2026
- case "InternalServerError":
2027
- case "com.amazonaws.rekognition#InternalServerError":
2028
- throw await de_InternalServerErrorRes(parsedOutput, context);
2029
- case "InvalidParameterException":
2030
- case "com.amazonaws.rekognition#InvalidParameterException":
2031
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2032
- case "ProvisionedThroughputExceededException":
2033
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2034
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2035
- case "ResourceNotFoundException":
2036
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2037
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2038
- case "ServiceQuotaExceededException":
2039
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
2040
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2041
- case "ThrottlingException":
2042
- case "com.amazonaws.rekognition#ThrottlingException":
2043
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2044
- default:
2045
- const parsedBody = parsedOutput.body;
2046
- return throwDefaultError({
2047
- output,
2048
- parsedBody,
2049
- errorCode
2050
- });
2051
- }
2052
- }, "de_CreateUserCommandError");
2053
1653
  var de_DeleteCollectionCommand = /* @__PURE__ */ __name(async (output, context) => {
2054
1654
  if (output.statusCode >= 300) {
2055
- return de_DeleteCollectionCommandError(output, context);
1655
+ return de_CommandError(output, context);
2056
1656
  }
2057
1657
  const data = await parseBody(output.body, context);
2058
1658
  let contents = {};
@@ -2063,43 +1663,9 @@ var de_DeleteCollectionCommand = /* @__PURE__ */ __name(async (output, context)
2063
1663
  };
2064
1664
  return response;
2065
1665
  }, "de_DeleteCollectionCommand");
2066
- var de_DeleteCollectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
2067
- const parsedOutput = {
2068
- ...output,
2069
- body: await parseErrorBody(output.body, context)
2070
- };
2071
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2072
- switch (errorCode) {
2073
- case "AccessDeniedException":
2074
- case "com.amazonaws.rekognition#AccessDeniedException":
2075
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2076
- case "InternalServerError":
2077
- case "com.amazonaws.rekognition#InternalServerError":
2078
- throw await de_InternalServerErrorRes(parsedOutput, context);
2079
- case "InvalidParameterException":
2080
- case "com.amazonaws.rekognition#InvalidParameterException":
2081
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2082
- case "ProvisionedThroughputExceededException":
2083
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2084
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2085
- case "ResourceNotFoundException":
2086
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2087
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2088
- case "ThrottlingException":
2089
- case "com.amazonaws.rekognition#ThrottlingException":
2090
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2091
- default:
2092
- const parsedBody = parsedOutput.body;
2093
- return throwDefaultError({
2094
- output,
2095
- parsedBody,
2096
- errorCode
2097
- });
2098
- }
2099
- }, "de_DeleteCollectionCommandError");
2100
1666
  var de_DeleteDatasetCommand = /* @__PURE__ */ __name(async (output, context) => {
2101
1667
  if (output.statusCode >= 300) {
2102
- return de_DeleteDatasetCommandError(output, context);
1668
+ return de_CommandError(output, context);
2103
1669
  }
2104
1670
  const data = await parseBody(output.body, context);
2105
1671
  let contents = {};
@@ -2110,49 +1676,9 @@ var de_DeleteDatasetCommand = /* @__PURE__ */ __name(async (output, context) =>
2110
1676
  };
2111
1677
  return response;
2112
1678
  }, "de_DeleteDatasetCommand");
2113
- var de_DeleteDatasetCommandError = /* @__PURE__ */ __name(async (output, context) => {
2114
- const parsedOutput = {
2115
- ...output,
2116
- body: await parseErrorBody(output.body, context)
2117
- };
2118
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2119
- switch (errorCode) {
2120
- case "AccessDeniedException":
2121
- case "com.amazonaws.rekognition#AccessDeniedException":
2122
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2123
- case "InternalServerError":
2124
- case "com.amazonaws.rekognition#InternalServerError":
2125
- throw await de_InternalServerErrorRes(parsedOutput, context);
2126
- case "InvalidParameterException":
2127
- case "com.amazonaws.rekognition#InvalidParameterException":
2128
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2129
- case "LimitExceededException":
2130
- case "com.amazonaws.rekognition#LimitExceededException":
2131
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2132
- case "ProvisionedThroughputExceededException":
2133
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2134
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2135
- case "ResourceInUseException":
2136
- case "com.amazonaws.rekognition#ResourceInUseException":
2137
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2138
- case "ResourceNotFoundException":
2139
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2140
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2141
- case "ThrottlingException":
2142
- case "com.amazonaws.rekognition#ThrottlingException":
2143
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2144
- default:
2145
- const parsedBody = parsedOutput.body;
2146
- return throwDefaultError({
2147
- output,
2148
- parsedBody,
2149
- errorCode
2150
- });
2151
- }
2152
- }, "de_DeleteDatasetCommandError");
2153
1679
  var de_DeleteFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
2154
1680
  if (output.statusCode >= 300) {
2155
- return de_DeleteFacesCommandError(output, context);
1681
+ return de_CommandError(output, context);
2156
1682
  }
2157
1683
  const data = await parseBody(output.body, context);
2158
1684
  let contents = {};
@@ -2163,43 +1689,9 @@ var de_DeleteFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
2163
1689
  };
2164
1690
  return response;
2165
1691
  }, "de_DeleteFacesCommand");
2166
- var de_DeleteFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2167
- const parsedOutput = {
2168
- ...output,
2169
- body: await parseErrorBody(output.body, context)
2170
- };
2171
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2172
- switch (errorCode) {
2173
- case "AccessDeniedException":
2174
- case "com.amazonaws.rekognition#AccessDeniedException":
2175
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2176
- case "InternalServerError":
2177
- case "com.amazonaws.rekognition#InternalServerError":
2178
- throw await de_InternalServerErrorRes(parsedOutput, context);
2179
- case "InvalidParameterException":
2180
- case "com.amazonaws.rekognition#InvalidParameterException":
2181
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2182
- case "ProvisionedThroughputExceededException":
2183
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2184
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2185
- case "ResourceNotFoundException":
2186
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2187
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2188
- case "ThrottlingException":
2189
- case "com.amazonaws.rekognition#ThrottlingException":
2190
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2191
- default:
2192
- const parsedBody = parsedOutput.body;
2193
- return throwDefaultError({
2194
- output,
2195
- parsedBody,
2196
- errorCode
2197
- });
2198
- }
2199
- }, "de_DeleteFacesCommandError");
2200
1692
  var de_DeleteProjectCommand = /* @__PURE__ */ __name(async (output, context) => {
2201
1693
  if (output.statusCode >= 300) {
2202
- return de_DeleteProjectCommandError(output, context);
1694
+ return de_CommandError(output, context);
2203
1695
  }
2204
1696
  const data = await parseBody(output.body, context);
2205
1697
  let contents = {};
@@ -2210,96 +1702,22 @@ var de_DeleteProjectCommand = /* @__PURE__ */ __name(async (output, context) =>
2210
1702
  };
2211
1703
  return response;
2212
1704
  }, "de_DeleteProjectCommand");
2213
- var de_DeleteProjectCommandError = /* @__PURE__ */ __name(async (output, context) => {
2214
- const parsedOutput = {
2215
- ...output,
2216
- body: await parseErrorBody(output.body, context)
2217
- };
2218
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2219
- switch (errorCode) {
2220
- case "AccessDeniedException":
2221
- case "com.amazonaws.rekognition#AccessDeniedException":
2222
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2223
- case "InternalServerError":
2224
- case "com.amazonaws.rekognition#InternalServerError":
2225
- throw await de_InternalServerErrorRes(parsedOutput, context);
2226
- case "InvalidParameterException":
2227
- case "com.amazonaws.rekognition#InvalidParameterException":
2228
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2229
- case "ProvisionedThroughputExceededException":
2230
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2231
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2232
- case "ResourceInUseException":
2233
- case "com.amazonaws.rekognition#ResourceInUseException":
2234
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2235
- case "ResourceNotFoundException":
2236
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2237
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2238
- case "ThrottlingException":
2239
- case "com.amazonaws.rekognition#ThrottlingException":
2240
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2241
- default:
2242
- const parsedBody = parsedOutput.body;
2243
- return throwDefaultError({
2244
- output,
2245
- parsedBody,
2246
- errorCode
2247
- });
2248
- }
2249
- }, "de_DeleteProjectCommandError");
2250
- var de_DeleteProjectPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
2251
- if (output.statusCode >= 300) {
2252
- return de_DeleteProjectPolicyCommandError(output, context);
2253
- }
2254
- const data = await parseBody(output.body, context);
2255
- let contents = {};
2256
- contents = (0, import_smithy_client._json)(data);
2257
- const response = {
2258
- $metadata: deserializeMetadata(output),
2259
- ...contents
1705
+ var de_DeleteProjectPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
1706
+ if (output.statusCode >= 300) {
1707
+ return de_CommandError(output, context);
1708
+ }
1709
+ const data = await parseBody(output.body, context);
1710
+ let contents = {};
1711
+ contents = (0, import_smithy_client._json)(data);
1712
+ const response = {
1713
+ $metadata: deserializeMetadata(output),
1714
+ ...contents
2260
1715
  };
2261
1716
  return response;
2262
1717
  }, "de_DeleteProjectPolicyCommand");
2263
- var de_DeleteProjectPolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
2264
- const parsedOutput = {
2265
- ...output,
2266
- body: await parseErrorBody(output.body, context)
2267
- };
2268
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2269
- switch (errorCode) {
2270
- case "AccessDeniedException":
2271
- case "com.amazonaws.rekognition#AccessDeniedException":
2272
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2273
- case "InternalServerError":
2274
- case "com.amazonaws.rekognition#InternalServerError":
2275
- throw await de_InternalServerErrorRes(parsedOutput, context);
2276
- case "InvalidParameterException":
2277
- case "com.amazonaws.rekognition#InvalidParameterException":
2278
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2279
- case "InvalidPolicyRevisionIdException":
2280
- case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException":
2281
- throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
2282
- case "ProvisionedThroughputExceededException":
2283
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2284
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2285
- case "ResourceNotFoundException":
2286
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2287
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2288
- case "ThrottlingException":
2289
- case "com.amazonaws.rekognition#ThrottlingException":
2290
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2291
- default:
2292
- const parsedBody = parsedOutput.body;
2293
- return throwDefaultError({
2294
- output,
2295
- parsedBody,
2296
- errorCode
2297
- });
2298
- }
2299
- }, "de_DeleteProjectPolicyCommandError");
2300
1718
  var de_DeleteProjectVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
2301
1719
  if (output.statusCode >= 300) {
2302
- return de_DeleteProjectVersionCommandError(output, context);
1720
+ return de_CommandError(output, context);
2303
1721
  }
2304
1722
  const data = await parseBody(output.body, context);
2305
1723
  let contents = {};
@@ -2310,46 +1728,9 @@ var de_DeleteProjectVersionCommand = /* @__PURE__ */ __name(async (output, conte
2310
1728
  };
2311
1729
  return response;
2312
1730
  }, "de_DeleteProjectVersionCommand");
2313
- var de_DeleteProjectVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
2314
- const parsedOutput = {
2315
- ...output,
2316
- body: await parseErrorBody(output.body, context)
2317
- };
2318
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2319
- switch (errorCode) {
2320
- case "AccessDeniedException":
2321
- case "com.amazonaws.rekognition#AccessDeniedException":
2322
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2323
- case "InternalServerError":
2324
- case "com.amazonaws.rekognition#InternalServerError":
2325
- throw await de_InternalServerErrorRes(parsedOutput, context);
2326
- case "InvalidParameterException":
2327
- case "com.amazonaws.rekognition#InvalidParameterException":
2328
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2329
- case "ProvisionedThroughputExceededException":
2330
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2331
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2332
- case "ResourceInUseException":
2333
- case "com.amazonaws.rekognition#ResourceInUseException":
2334
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2335
- case "ResourceNotFoundException":
2336
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2337
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2338
- case "ThrottlingException":
2339
- case "com.amazonaws.rekognition#ThrottlingException":
2340
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2341
- default:
2342
- const parsedBody = parsedOutput.body;
2343
- return throwDefaultError({
2344
- output,
2345
- parsedBody,
2346
- errorCode
2347
- });
2348
- }
2349
- }, "de_DeleteProjectVersionCommandError");
2350
1731
  var de_DeleteStreamProcessorCommand = /* @__PURE__ */ __name(async (output, context) => {
2351
1732
  if (output.statusCode >= 300) {
2352
- return de_DeleteStreamProcessorCommandError(output, context);
1733
+ return de_CommandError(output, context);
2353
1734
  }
2354
1735
  const data = await parseBody(output.body, context);
2355
1736
  let contents = {};
@@ -2360,46 +1741,9 @@ var de_DeleteStreamProcessorCommand = /* @__PURE__ */ __name(async (output, cont
2360
1741
  };
2361
1742
  return response;
2362
1743
  }, "de_DeleteStreamProcessorCommand");
2363
- var de_DeleteStreamProcessorCommandError = /* @__PURE__ */ __name(async (output, context) => {
2364
- const parsedOutput = {
2365
- ...output,
2366
- body: await parseErrorBody(output.body, context)
2367
- };
2368
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2369
- switch (errorCode) {
2370
- case "AccessDeniedException":
2371
- case "com.amazonaws.rekognition#AccessDeniedException":
2372
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2373
- case "InternalServerError":
2374
- case "com.amazonaws.rekognition#InternalServerError":
2375
- throw await de_InternalServerErrorRes(parsedOutput, context);
2376
- case "InvalidParameterException":
2377
- case "com.amazonaws.rekognition#InvalidParameterException":
2378
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2379
- case "ProvisionedThroughputExceededException":
2380
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2381
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2382
- case "ResourceInUseException":
2383
- case "com.amazonaws.rekognition#ResourceInUseException":
2384
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2385
- case "ResourceNotFoundException":
2386
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2387
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2388
- case "ThrottlingException":
2389
- case "com.amazonaws.rekognition#ThrottlingException":
2390
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2391
- default:
2392
- const parsedBody = parsedOutput.body;
2393
- return throwDefaultError({
2394
- output,
2395
- parsedBody,
2396
- errorCode
2397
- });
2398
- }
2399
- }, "de_DeleteStreamProcessorCommandError");
2400
1744
  var de_DeleteUserCommand = /* @__PURE__ */ __name(async (output, context) => {
2401
1745
  if (output.statusCode >= 300) {
2402
- return de_DeleteUserCommandError(output, context);
1746
+ return de_CommandError(output, context);
2403
1747
  }
2404
1748
  const data = await parseBody(output.body, context);
2405
1749
  let contents = {};
@@ -2410,49 +1754,9 @@ var de_DeleteUserCommand = /* @__PURE__ */ __name(async (output, context) => {
2410
1754
  };
2411
1755
  return response;
2412
1756
  }, "de_DeleteUserCommand");
2413
- var de_DeleteUserCommandError = /* @__PURE__ */ __name(async (output, context) => {
2414
- const parsedOutput = {
2415
- ...output,
2416
- body: await parseErrorBody(output.body, context)
2417
- };
2418
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2419
- switch (errorCode) {
2420
- case "AccessDeniedException":
2421
- case "com.amazonaws.rekognition#AccessDeniedException":
2422
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2423
- case "ConflictException":
2424
- case "com.amazonaws.rekognition#ConflictException":
2425
- throw await de_ConflictExceptionRes(parsedOutput, context);
2426
- case "IdempotentParameterMismatchException":
2427
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
2428
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2429
- case "InternalServerError":
2430
- case "com.amazonaws.rekognition#InternalServerError":
2431
- throw await de_InternalServerErrorRes(parsedOutput, context);
2432
- case "InvalidParameterException":
2433
- case "com.amazonaws.rekognition#InvalidParameterException":
2434
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2435
- case "ProvisionedThroughputExceededException":
2436
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2437
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2438
- case "ResourceNotFoundException":
2439
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2440
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2441
- case "ThrottlingException":
2442
- case "com.amazonaws.rekognition#ThrottlingException":
2443
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2444
- default:
2445
- const parsedBody = parsedOutput.body;
2446
- return throwDefaultError({
2447
- output,
2448
- parsedBody,
2449
- errorCode
2450
- });
2451
- }
2452
- }, "de_DeleteUserCommandError");
2453
1757
  var de_DescribeCollectionCommand = /* @__PURE__ */ __name(async (output, context) => {
2454
1758
  if (output.statusCode >= 300) {
2455
- return de_DescribeCollectionCommandError(output, context);
1759
+ return de_CommandError(output, context);
2456
1760
  }
2457
1761
  const data = await parseBody(output.body, context);
2458
1762
  let contents = {};
@@ -2463,43 +1767,9 @@ var de_DescribeCollectionCommand = /* @__PURE__ */ __name(async (output, context
2463
1767
  };
2464
1768
  return response;
2465
1769
  }, "de_DescribeCollectionCommand");
2466
- var de_DescribeCollectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
2467
- const parsedOutput = {
2468
- ...output,
2469
- body: await parseErrorBody(output.body, context)
2470
- };
2471
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2472
- switch (errorCode) {
2473
- case "AccessDeniedException":
2474
- case "com.amazonaws.rekognition#AccessDeniedException":
2475
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2476
- case "InternalServerError":
2477
- case "com.amazonaws.rekognition#InternalServerError":
2478
- throw await de_InternalServerErrorRes(parsedOutput, context);
2479
- case "InvalidParameterException":
2480
- case "com.amazonaws.rekognition#InvalidParameterException":
2481
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2482
- case "ProvisionedThroughputExceededException":
2483
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2484
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2485
- case "ResourceNotFoundException":
2486
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2487
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2488
- case "ThrottlingException":
2489
- case "com.amazonaws.rekognition#ThrottlingException":
2490
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2491
- default:
2492
- const parsedBody = parsedOutput.body;
2493
- return throwDefaultError({
2494
- output,
2495
- parsedBody,
2496
- errorCode
2497
- });
2498
- }
2499
- }, "de_DescribeCollectionCommandError");
2500
1770
  var de_DescribeDatasetCommand = /* @__PURE__ */ __name(async (output, context) => {
2501
1771
  if (output.statusCode >= 300) {
2502
- return de_DescribeDatasetCommandError(output, context);
1772
+ return de_CommandError(output, context);
2503
1773
  }
2504
1774
  const data = await parseBody(output.body, context);
2505
1775
  let contents = {};
@@ -2510,43 +1780,9 @@ var de_DescribeDatasetCommand = /* @__PURE__ */ __name(async (output, context) =
2510
1780
  };
2511
1781
  return response;
2512
1782
  }, "de_DescribeDatasetCommand");
2513
- var de_DescribeDatasetCommandError = /* @__PURE__ */ __name(async (output, context) => {
2514
- const parsedOutput = {
2515
- ...output,
2516
- body: await parseErrorBody(output.body, context)
2517
- };
2518
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2519
- switch (errorCode) {
2520
- case "AccessDeniedException":
2521
- case "com.amazonaws.rekognition#AccessDeniedException":
2522
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2523
- case "InternalServerError":
2524
- case "com.amazonaws.rekognition#InternalServerError":
2525
- throw await de_InternalServerErrorRes(parsedOutput, context);
2526
- case "InvalidParameterException":
2527
- case "com.amazonaws.rekognition#InvalidParameterException":
2528
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2529
- case "ProvisionedThroughputExceededException":
2530
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2531
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2532
- case "ResourceNotFoundException":
2533
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2534
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2535
- case "ThrottlingException":
2536
- case "com.amazonaws.rekognition#ThrottlingException":
2537
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2538
- default:
2539
- const parsedBody = parsedOutput.body;
2540
- return throwDefaultError({
2541
- output,
2542
- parsedBody,
2543
- errorCode
2544
- });
2545
- }
2546
- }, "de_DescribeDatasetCommandError");
2547
1783
  var de_DescribeProjectsCommand = /* @__PURE__ */ __name(async (output, context) => {
2548
1784
  if (output.statusCode >= 300) {
2549
- return de_DescribeProjectsCommandError(output, context);
1785
+ return de_CommandError(output, context);
2550
1786
  }
2551
1787
  const data = await parseBody(output.body, context);
2552
1788
  let contents = {};
@@ -2557,43 +1793,9 @@ var de_DescribeProjectsCommand = /* @__PURE__ */ __name(async (output, context)
2557
1793
  };
2558
1794
  return response;
2559
1795
  }, "de_DescribeProjectsCommand");
2560
- var de_DescribeProjectsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2561
- const parsedOutput = {
2562
- ...output,
2563
- body: await parseErrorBody(output.body, context)
2564
- };
2565
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2566
- switch (errorCode) {
2567
- case "AccessDeniedException":
2568
- case "com.amazonaws.rekognition#AccessDeniedException":
2569
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2570
- case "InternalServerError":
2571
- case "com.amazonaws.rekognition#InternalServerError":
2572
- throw await de_InternalServerErrorRes(parsedOutput, context);
2573
- case "InvalidPaginationTokenException":
2574
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2575
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2576
- case "InvalidParameterException":
2577
- case "com.amazonaws.rekognition#InvalidParameterException":
2578
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2579
- case "ProvisionedThroughputExceededException":
2580
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2581
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2582
- case "ThrottlingException":
2583
- case "com.amazonaws.rekognition#ThrottlingException":
2584
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2585
- default:
2586
- const parsedBody = parsedOutput.body;
2587
- return throwDefaultError({
2588
- output,
2589
- parsedBody,
2590
- errorCode
2591
- });
2592
- }
2593
- }, "de_DescribeProjectsCommandError");
2594
1796
  var de_DescribeProjectVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {
2595
1797
  if (output.statusCode >= 300) {
2596
- return de_DescribeProjectVersionsCommandError(output, context);
1798
+ return de_CommandError(output, context);
2597
1799
  }
2598
1800
  const data = await parseBody(output.body, context);
2599
1801
  let contents = {};
@@ -2604,46 +1806,9 @@ var de_DescribeProjectVersionsCommand = /* @__PURE__ */ __name(async (output, co
2604
1806
  };
2605
1807
  return response;
2606
1808
  }, "de_DescribeProjectVersionsCommand");
2607
- var de_DescribeProjectVersionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2608
- const parsedOutput = {
2609
- ...output,
2610
- body: await parseErrorBody(output.body, context)
2611
- };
2612
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2613
- switch (errorCode) {
2614
- case "AccessDeniedException":
2615
- case "com.amazonaws.rekognition#AccessDeniedException":
2616
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2617
- case "InternalServerError":
2618
- case "com.amazonaws.rekognition#InternalServerError":
2619
- throw await de_InternalServerErrorRes(parsedOutput, context);
2620
- case "InvalidPaginationTokenException":
2621
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2622
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2623
- case "InvalidParameterException":
2624
- case "com.amazonaws.rekognition#InvalidParameterException":
2625
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2626
- case "ProvisionedThroughputExceededException":
2627
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2628
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2629
- case "ResourceNotFoundException":
2630
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2631
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2632
- case "ThrottlingException":
2633
- case "com.amazonaws.rekognition#ThrottlingException":
2634
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2635
- default:
2636
- const parsedBody = parsedOutput.body;
2637
- return throwDefaultError({
2638
- output,
2639
- parsedBody,
2640
- errorCode
2641
- });
2642
- }
2643
- }, "de_DescribeProjectVersionsCommandError");
2644
1809
  var de_DescribeStreamProcessorCommand = /* @__PURE__ */ __name(async (output, context) => {
2645
1810
  if (output.statusCode >= 300) {
2646
- return de_DescribeStreamProcessorCommandError(output, context);
1811
+ return de_CommandError(output, context);
2647
1812
  }
2648
1813
  const data = await parseBody(output.body, context);
2649
1814
  let contents = {};
@@ -2654,43 +1819,9 @@ var de_DescribeStreamProcessorCommand = /* @__PURE__ */ __name(async (output, co
2654
1819
  };
2655
1820
  return response;
2656
1821
  }, "de_DescribeStreamProcessorCommand");
2657
- var de_DescribeStreamProcessorCommandError = /* @__PURE__ */ __name(async (output, context) => {
2658
- const parsedOutput = {
2659
- ...output,
2660
- body: await parseErrorBody(output.body, context)
2661
- };
2662
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2663
- switch (errorCode) {
2664
- case "AccessDeniedException":
2665
- case "com.amazonaws.rekognition#AccessDeniedException":
2666
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2667
- case "InternalServerError":
2668
- case "com.amazonaws.rekognition#InternalServerError":
2669
- throw await de_InternalServerErrorRes(parsedOutput, context);
2670
- case "InvalidParameterException":
2671
- case "com.amazonaws.rekognition#InvalidParameterException":
2672
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2673
- case "ProvisionedThroughputExceededException":
2674
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2675
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2676
- case "ResourceNotFoundException":
2677
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2678
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2679
- case "ThrottlingException":
2680
- case "com.amazonaws.rekognition#ThrottlingException":
2681
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2682
- default:
2683
- const parsedBody = parsedOutput.body;
2684
- return throwDefaultError({
2685
- output,
2686
- parsedBody,
2687
- errorCode
2688
- });
2689
- }
2690
- }, "de_DescribeStreamProcessorCommandError");
2691
1822
  var de_DetectCustomLabelsCommand = /* @__PURE__ */ __name(async (output, context) => {
2692
1823
  if (output.statusCode >= 300) {
2693
- return de_DetectCustomLabelsCommandError(output, context);
1824
+ return de_CommandError(output, context);
2694
1825
  }
2695
1826
  const data = await parseBody(output.body, context);
2696
1827
  let contents = {};
@@ -2701,58 +1832,9 @@ var de_DetectCustomLabelsCommand = /* @__PURE__ */ __name(async (output, context
2701
1832
  };
2702
1833
  return response;
2703
1834
  }, "de_DetectCustomLabelsCommand");
2704
- var de_DetectCustomLabelsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2705
- const parsedOutput = {
2706
- ...output,
2707
- body: await parseErrorBody(output.body, context)
2708
- };
2709
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2710
- switch (errorCode) {
2711
- case "AccessDeniedException":
2712
- case "com.amazonaws.rekognition#AccessDeniedException":
2713
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2714
- case "ImageTooLargeException":
2715
- case "com.amazonaws.rekognition#ImageTooLargeException":
2716
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
2717
- case "InternalServerError":
2718
- case "com.amazonaws.rekognition#InternalServerError":
2719
- throw await de_InternalServerErrorRes(parsedOutput, context);
2720
- case "InvalidImageFormatException":
2721
- case "com.amazonaws.rekognition#InvalidImageFormatException":
2722
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
2723
- case "InvalidParameterException":
2724
- case "com.amazonaws.rekognition#InvalidParameterException":
2725
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2726
- case "InvalidS3ObjectException":
2727
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
2728
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
2729
- case "LimitExceededException":
2730
- case "com.amazonaws.rekognition#LimitExceededException":
2731
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2732
- case "ProvisionedThroughputExceededException":
2733
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2734
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2735
- case "ResourceNotFoundException":
2736
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2737
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2738
- case "ResourceNotReadyException":
2739
- case "com.amazonaws.rekognition#ResourceNotReadyException":
2740
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
2741
- case "ThrottlingException":
2742
- case "com.amazonaws.rekognition#ThrottlingException":
2743
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2744
- default:
2745
- const parsedBody = parsedOutput.body;
2746
- return throwDefaultError({
2747
- output,
2748
- parsedBody,
2749
- errorCode
2750
- });
2751
- }
2752
- }, "de_DetectCustomLabelsCommandError");
2753
1835
  var de_DetectFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
2754
1836
  if (output.statusCode >= 300) {
2755
- return de_DetectFacesCommandError(output, context);
1837
+ return de_CommandError(output, context);
2756
1838
  }
2757
1839
  const data = await parseBody(output.body, context);
2758
1840
  let contents = {};
@@ -2763,49 +1845,9 @@ var de_DetectFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
2763
1845
  };
2764
1846
  return response;
2765
1847
  }, "de_DetectFacesCommand");
2766
- var de_DetectFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
2767
- const parsedOutput = {
2768
- ...output,
2769
- body: await parseErrorBody(output.body, context)
2770
- };
2771
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2772
- switch (errorCode) {
2773
- case "AccessDeniedException":
2774
- case "com.amazonaws.rekognition#AccessDeniedException":
2775
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2776
- case "ImageTooLargeException":
2777
- case "com.amazonaws.rekognition#ImageTooLargeException":
2778
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
2779
- case "InternalServerError":
2780
- case "com.amazonaws.rekognition#InternalServerError":
2781
- throw await de_InternalServerErrorRes(parsedOutput, context);
2782
- case "InvalidImageFormatException":
2783
- case "com.amazonaws.rekognition#InvalidImageFormatException":
2784
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
2785
- case "InvalidParameterException":
2786
- case "com.amazonaws.rekognition#InvalidParameterException":
2787
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2788
- case "InvalidS3ObjectException":
2789
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
2790
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
2791
- case "ProvisionedThroughputExceededException":
2792
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2793
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2794
- case "ThrottlingException":
2795
- case "com.amazonaws.rekognition#ThrottlingException":
2796
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2797
- default:
2798
- const parsedBody = parsedOutput.body;
2799
- return throwDefaultError({
2800
- output,
2801
- parsedBody,
2802
- errorCode
2803
- });
2804
- }
2805
- }, "de_DetectFacesCommandError");
2806
1848
  var de_DetectLabelsCommand = /* @__PURE__ */ __name(async (output, context) => {
2807
1849
  if (output.statusCode >= 300) {
2808
- return de_DetectLabelsCommandError(output, context);
1850
+ return de_CommandError(output, context);
2809
1851
  }
2810
1852
  const data = await parseBody(output.body, context);
2811
1853
  let contents = {};
@@ -2816,49 +1858,9 @@ var de_DetectLabelsCommand = /* @__PURE__ */ __name(async (output, context) => {
2816
1858
  };
2817
1859
  return response;
2818
1860
  }, "de_DetectLabelsCommand");
2819
- var de_DetectLabelsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2820
- const parsedOutput = {
2821
- ...output,
2822
- body: await parseErrorBody(output.body, context)
2823
- };
2824
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2825
- switch (errorCode) {
2826
- case "AccessDeniedException":
2827
- case "com.amazonaws.rekognition#AccessDeniedException":
2828
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2829
- case "ImageTooLargeException":
2830
- case "com.amazonaws.rekognition#ImageTooLargeException":
2831
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
2832
- case "InternalServerError":
2833
- case "com.amazonaws.rekognition#InternalServerError":
2834
- throw await de_InternalServerErrorRes(parsedOutput, context);
2835
- case "InvalidImageFormatException":
2836
- case "com.amazonaws.rekognition#InvalidImageFormatException":
2837
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
2838
- case "InvalidParameterException":
2839
- case "com.amazonaws.rekognition#InvalidParameterException":
2840
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2841
- case "InvalidS3ObjectException":
2842
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
2843
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
2844
- case "ProvisionedThroughputExceededException":
2845
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2846
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2847
- case "ThrottlingException":
2848
- case "com.amazonaws.rekognition#ThrottlingException":
2849
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2850
- default:
2851
- const parsedBody = parsedOutput.body;
2852
- return throwDefaultError({
2853
- output,
2854
- parsedBody,
2855
- errorCode
2856
- });
2857
- }
2858
- }, "de_DetectLabelsCommandError");
2859
1861
  var de_DetectModerationLabelsCommand = /* @__PURE__ */ __name(async (output, context) => {
2860
1862
  if (output.statusCode >= 300) {
2861
- return de_DetectModerationLabelsCommandError(output, context);
1863
+ return de_CommandError(output, context);
2862
1864
  }
2863
1865
  const data = await parseBody(output.body, context);
2864
1866
  let contents = {};
@@ -2869,111 +1871,22 @@ var de_DetectModerationLabelsCommand = /* @__PURE__ */ __name(async (output, con
2869
1871
  };
2870
1872
  return response;
2871
1873
  }, "de_DetectModerationLabelsCommand");
2872
- var de_DetectModerationLabelsCommandError = /* @__PURE__ */ __name(async (output, context) => {
2873
- const parsedOutput = {
2874
- ...output,
2875
- body: await parseErrorBody(output.body, context)
2876
- };
2877
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2878
- switch (errorCode) {
2879
- case "AccessDeniedException":
2880
- case "com.amazonaws.rekognition#AccessDeniedException":
2881
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2882
- case "HumanLoopQuotaExceededException":
2883
- case "com.amazonaws.rekognition#HumanLoopQuotaExceededException":
2884
- throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
2885
- case "ImageTooLargeException":
2886
- case "com.amazonaws.rekognition#ImageTooLargeException":
2887
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
2888
- case "InternalServerError":
2889
- case "com.amazonaws.rekognition#InternalServerError":
2890
- throw await de_InternalServerErrorRes(parsedOutput, context);
2891
- case "InvalidImageFormatException":
2892
- case "com.amazonaws.rekognition#InvalidImageFormatException":
2893
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
2894
- case "InvalidParameterException":
2895
- case "com.amazonaws.rekognition#InvalidParameterException":
2896
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2897
- case "InvalidS3ObjectException":
2898
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
2899
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
2900
- case "ProvisionedThroughputExceededException":
2901
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2902
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2903
- case "ResourceNotFoundException":
2904
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2905
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2906
- case "ResourceNotReadyException":
2907
- case "com.amazonaws.rekognition#ResourceNotReadyException":
2908
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
2909
- case "ThrottlingException":
2910
- case "com.amazonaws.rekognition#ThrottlingException":
2911
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2912
- default:
2913
- const parsedBody = parsedOutput.body;
2914
- return throwDefaultError({
2915
- output,
2916
- parsedBody,
2917
- errorCode
2918
- });
2919
- }
2920
- }, "de_DetectModerationLabelsCommandError");
2921
- var de_DetectProtectiveEquipmentCommand = /* @__PURE__ */ __name(async (output, context) => {
2922
- if (output.statusCode >= 300) {
2923
- return de_DetectProtectiveEquipmentCommandError(output, context);
2924
- }
2925
- const data = await parseBody(output.body, context);
2926
- let contents = {};
2927
- contents = de_DetectProtectiveEquipmentResponse(data, context);
2928
- const response = {
2929
- $metadata: deserializeMetadata(output),
2930
- ...contents
1874
+ var de_DetectProtectiveEquipmentCommand = /* @__PURE__ */ __name(async (output, context) => {
1875
+ if (output.statusCode >= 300) {
1876
+ return de_CommandError(output, context);
1877
+ }
1878
+ const data = await parseBody(output.body, context);
1879
+ let contents = {};
1880
+ contents = de_DetectProtectiveEquipmentResponse(data, context);
1881
+ const response = {
1882
+ $metadata: deserializeMetadata(output),
1883
+ ...contents
2931
1884
  };
2932
1885
  return response;
2933
1886
  }, "de_DetectProtectiveEquipmentCommand");
2934
- var de_DetectProtectiveEquipmentCommandError = /* @__PURE__ */ __name(async (output, context) => {
2935
- const parsedOutput = {
2936
- ...output,
2937
- body: await parseErrorBody(output.body, context)
2938
- };
2939
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2940
- switch (errorCode) {
2941
- case "AccessDeniedException":
2942
- case "com.amazonaws.rekognition#AccessDeniedException":
2943
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2944
- case "ImageTooLargeException":
2945
- case "com.amazonaws.rekognition#ImageTooLargeException":
2946
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
2947
- case "InternalServerError":
2948
- case "com.amazonaws.rekognition#InternalServerError":
2949
- throw await de_InternalServerErrorRes(parsedOutput, context);
2950
- case "InvalidImageFormatException":
2951
- case "com.amazonaws.rekognition#InvalidImageFormatException":
2952
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
2953
- case "InvalidParameterException":
2954
- case "com.amazonaws.rekognition#InvalidParameterException":
2955
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2956
- case "InvalidS3ObjectException":
2957
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
2958
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
2959
- case "ProvisionedThroughputExceededException":
2960
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2961
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2962
- case "ThrottlingException":
2963
- case "com.amazonaws.rekognition#ThrottlingException":
2964
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2965
- default:
2966
- const parsedBody = parsedOutput.body;
2967
- return throwDefaultError({
2968
- output,
2969
- parsedBody,
2970
- errorCode
2971
- });
2972
- }
2973
- }, "de_DetectProtectiveEquipmentCommandError");
2974
1887
  var de_DetectTextCommand = /* @__PURE__ */ __name(async (output, context) => {
2975
1888
  if (output.statusCode >= 300) {
2976
- return de_DetectTextCommandError(output, context);
1889
+ return de_CommandError(output, context);
2977
1890
  }
2978
1891
  const data = await parseBody(output.body, context);
2979
1892
  let contents = {};
@@ -2984,49 +1897,9 @@ var de_DetectTextCommand = /* @__PURE__ */ __name(async (output, context) => {
2984
1897
  };
2985
1898
  return response;
2986
1899
  }, "de_DetectTextCommand");
2987
- var de_DetectTextCommandError = /* @__PURE__ */ __name(async (output, context) => {
2988
- const parsedOutput = {
2989
- ...output,
2990
- body: await parseErrorBody(output.body, context)
2991
- };
2992
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2993
- switch (errorCode) {
2994
- case "AccessDeniedException":
2995
- case "com.amazonaws.rekognition#AccessDeniedException":
2996
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2997
- case "ImageTooLargeException":
2998
- case "com.amazonaws.rekognition#ImageTooLargeException":
2999
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
3000
- case "InternalServerError":
3001
- case "com.amazonaws.rekognition#InternalServerError":
3002
- throw await de_InternalServerErrorRes(parsedOutput, context);
3003
- case "InvalidImageFormatException":
3004
- case "com.amazonaws.rekognition#InvalidImageFormatException":
3005
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
3006
- case "InvalidParameterException":
3007
- case "com.amazonaws.rekognition#InvalidParameterException":
3008
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3009
- case "InvalidS3ObjectException":
3010
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3011
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3012
- case "ProvisionedThroughputExceededException":
3013
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3014
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3015
- case "ThrottlingException":
3016
- case "com.amazonaws.rekognition#ThrottlingException":
3017
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3018
- default:
3019
- const parsedBody = parsedOutput.body;
3020
- return throwDefaultError({
3021
- output,
3022
- parsedBody,
3023
- errorCode
3024
- });
3025
- }
3026
- }, "de_DetectTextCommandError");
3027
1900
  var de_DisassociateFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
3028
1901
  if (output.statusCode >= 300) {
3029
- return de_DisassociateFacesCommandError(output, context);
1902
+ return de_CommandError(output, context);
3030
1903
  }
3031
1904
  const data = await parseBody(output.body, context);
3032
1905
  let contents = {};
@@ -3037,49 +1910,9 @@ var de_DisassociateFacesCommand = /* @__PURE__ */ __name(async (output, context)
3037
1910
  };
3038
1911
  return response;
3039
1912
  }, "de_DisassociateFacesCommand");
3040
- var de_DisassociateFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3041
- const parsedOutput = {
3042
- ...output,
3043
- body: await parseErrorBody(output.body, context)
3044
- };
3045
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3046
- switch (errorCode) {
3047
- case "AccessDeniedException":
3048
- case "com.amazonaws.rekognition#AccessDeniedException":
3049
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3050
- case "ConflictException":
3051
- case "com.amazonaws.rekognition#ConflictException":
3052
- throw await de_ConflictExceptionRes(parsedOutput, context);
3053
- case "IdempotentParameterMismatchException":
3054
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3055
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3056
- case "InternalServerError":
3057
- case "com.amazonaws.rekognition#InternalServerError":
3058
- throw await de_InternalServerErrorRes(parsedOutput, context);
3059
- case "InvalidParameterException":
3060
- case "com.amazonaws.rekognition#InvalidParameterException":
3061
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3062
- case "ProvisionedThroughputExceededException":
3063
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3064
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3065
- case "ResourceNotFoundException":
3066
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3067
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3068
- case "ThrottlingException":
3069
- case "com.amazonaws.rekognition#ThrottlingException":
3070
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3071
- default:
3072
- const parsedBody = parsedOutput.body;
3073
- return throwDefaultError({
3074
- output,
3075
- parsedBody,
3076
- errorCode
3077
- });
3078
- }
3079
- }, "de_DisassociateFacesCommandError");
3080
1913
  var de_DistributeDatasetEntriesCommand = /* @__PURE__ */ __name(async (output, context) => {
3081
1914
  if (output.statusCode >= 300) {
3082
- return de_DistributeDatasetEntriesCommandError(output, context);
1915
+ return de_CommandError(output, context);
3083
1916
  }
3084
1917
  const data = await parseBody(output.body, context);
3085
1918
  let contents = {};
@@ -3090,46 +1923,9 @@ var de_DistributeDatasetEntriesCommand = /* @__PURE__ */ __name(async (output, c
3090
1923
  };
3091
1924
  return response;
3092
1925
  }, "de_DistributeDatasetEntriesCommand");
3093
- var de_DistributeDatasetEntriesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3094
- const parsedOutput = {
3095
- ...output,
3096
- body: await parseErrorBody(output.body, context)
3097
- };
3098
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3099
- switch (errorCode) {
3100
- case "AccessDeniedException":
3101
- case "com.amazonaws.rekognition#AccessDeniedException":
3102
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3103
- case "InternalServerError":
3104
- case "com.amazonaws.rekognition#InternalServerError":
3105
- throw await de_InternalServerErrorRes(parsedOutput, context);
3106
- case "InvalidParameterException":
3107
- case "com.amazonaws.rekognition#InvalidParameterException":
3108
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3109
- case "ProvisionedThroughputExceededException":
3110
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3111
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3112
- case "ResourceNotFoundException":
3113
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3114
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3115
- case "ResourceNotReadyException":
3116
- case "com.amazonaws.rekognition#ResourceNotReadyException":
3117
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
3118
- case "ThrottlingException":
3119
- case "com.amazonaws.rekognition#ThrottlingException":
3120
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3121
- default:
3122
- const parsedBody = parsedOutput.body;
3123
- return throwDefaultError({
3124
- output,
3125
- parsedBody,
3126
- errorCode
3127
- });
3128
- }
3129
- }, "de_DistributeDatasetEntriesCommandError");
3130
1926
  var de_GetCelebrityInfoCommand = /* @__PURE__ */ __name(async (output, context) => {
3131
1927
  if (output.statusCode >= 300) {
3132
- return de_GetCelebrityInfoCommandError(output, context);
1928
+ return de_CommandError(output, context);
3133
1929
  }
3134
1930
  const data = await parseBody(output.body, context);
3135
1931
  let contents = {};
@@ -3140,43 +1936,9 @@ var de_GetCelebrityInfoCommand = /* @__PURE__ */ __name(async (output, context)
3140
1936
  };
3141
1937
  return response;
3142
1938
  }, "de_GetCelebrityInfoCommand");
3143
- var de_GetCelebrityInfoCommandError = /* @__PURE__ */ __name(async (output, context) => {
3144
- const parsedOutput = {
3145
- ...output,
3146
- body: await parseErrorBody(output.body, context)
3147
- };
3148
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3149
- switch (errorCode) {
3150
- case "AccessDeniedException":
3151
- case "com.amazonaws.rekognition#AccessDeniedException":
3152
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3153
- case "InternalServerError":
3154
- case "com.amazonaws.rekognition#InternalServerError":
3155
- throw await de_InternalServerErrorRes(parsedOutput, context);
3156
- case "InvalidParameterException":
3157
- case "com.amazonaws.rekognition#InvalidParameterException":
3158
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3159
- case "ProvisionedThroughputExceededException":
3160
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3161
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3162
- case "ResourceNotFoundException":
3163
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3164
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3165
- case "ThrottlingException":
3166
- case "com.amazonaws.rekognition#ThrottlingException":
3167
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3168
- default:
3169
- const parsedBody = parsedOutput.body;
3170
- return throwDefaultError({
3171
- output,
3172
- parsedBody,
3173
- errorCode
3174
- });
3175
- }
3176
- }, "de_GetCelebrityInfoCommandError");
3177
1939
  var de_GetCelebrityRecognitionCommand = /* @__PURE__ */ __name(async (output, context) => {
3178
1940
  if (output.statusCode >= 300) {
3179
- return de_GetCelebrityRecognitionCommandError(output, context);
1941
+ return de_CommandError(output, context);
3180
1942
  }
3181
1943
  const data = await parseBody(output.body, context);
3182
1944
  let contents = {};
@@ -3187,46 +1949,9 @@ var de_GetCelebrityRecognitionCommand = /* @__PURE__ */ __name(async (output, co
3187
1949
  };
3188
1950
  return response;
3189
1951
  }, "de_GetCelebrityRecognitionCommand");
3190
- var de_GetCelebrityRecognitionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3191
- const parsedOutput = {
3192
- ...output,
3193
- body: await parseErrorBody(output.body, context)
3194
- };
3195
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3196
- switch (errorCode) {
3197
- case "AccessDeniedException":
3198
- case "com.amazonaws.rekognition#AccessDeniedException":
3199
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3200
- case "InternalServerError":
3201
- case "com.amazonaws.rekognition#InternalServerError":
3202
- throw await de_InternalServerErrorRes(parsedOutput, context);
3203
- case "InvalidPaginationTokenException":
3204
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3205
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3206
- case "InvalidParameterException":
3207
- case "com.amazonaws.rekognition#InvalidParameterException":
3208
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3209
- case "ProvisionedThroughputExceededException":
3210
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3211
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3212
- case "ResourceNotFoundException":
3213
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3214
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3215
- case "ThrottlingException":
3216
- case "com.amazonaws.rekognition#ThrottlingException":
3217
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3218
- default:
3219
- const parsedBody = parsedOutput.body;
3220
- return throwDefaultError({
3221
- output,
3222
- parsedBody,
3223
- errorCode
3224
- });
3225
- }
3226
- }, "de_GetCelebrityRecognitionCommandError");
3227
1952
  var de_GetContentModerationCommand = /* @__PURE__ */ __name(async (output, context) => {
3228
1953
  if (output.statusCode >= 300) {
3229
- return de_GetContentModerationCommandError(output, context);
1954
+ return de_CommandError(output, context);
3230
1955
  }
3231
1956
  const data = await parseBody(output.body, context);
3232
1957
  let contents = {};
@@ -3237,96 +1962,22 @@ var de_GetContentModerationCommand = /* @__PURE__ */ __name(async (output, conte
3237
1962
  };
3238
1963
  return response;
3239
1964
  }, "de_GetContentModerationCommand");
3240
- var de_GetContentModerationCommandError = /* @__PURE__ */ __name(async (output, context) => {
3241
- const parsedOutput = {
3242
- ...output,
3243
- body: await parseErrorBody(output.body, context)
3244
- };
3245
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3246
- switch (errorCode) {
3247
- case "AccessDeniedException":
3248
- case "com.amazonaws.rekognition#AccessDeniedException":
3249
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3250
- case "InternalServerError":
3251
- case "com.amazonaws.rekognition#InternalServerError":
3252
- throw await de_InternalServerErrorRes(parsedOutput, context);
3253
- case "InvalidPaginationTokenException":
3254
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3255
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3256
- case "InvalidParameterException":
3257
- case "com.amazonaws.rekognition#InvalidParameterException":
3258
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3259
- case "ProvisionedThroughputExceededException":
3260
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3261
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3262
- case "ResourceNotFoundException":
3263
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3264
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3265
- case "ThrottlingException":
3266
- case "com.amazonaws.rekognition#ThrottlingException":
3267
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3268
- default:
3269
- const parsedBody = parsedOutput.body;
3270
- return throwDefaultError({
3271
- output,
3272
- parsedBody,
3273
- errorCode
3274
- });
3275
- }
3276
- }, "de_GetContentModerationCommandError");
3277
- var de_GetFaceDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
3278
- if (output.statusCode >= 300) {
3279
- return de_GetFaceDetectionCommandError(output, context);
3280
- }
3281
- const data = await parseBody(output.body, context);
3282
- let contents = {};
3283
- contents = de_GetFaceDetectionResponse(data, context);
3284
- const response = {
3285
- $metadata: deserializeMetadata(output),
3286
- ...contents
1965
+ var de_GetFaceDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
1966
+ if (output.statusCode >= 300) {
1967
+ return de_CommandError(output, context);
1968
+ }
1969
+ const data = await parseBody(output.body, context);
1970
+ let contents = {};
1971
+ contents = de_GetFaceDetectionResponse(data, context);
1972
+ const response = {
1973
+ $metadata: deserializeMetadata(output),
1974
+ ...contents
3287
1975
  };
3288
1976
  return response;
3289
1977
  }, "de_GetFaceDetectionCommand");
3290
- var de_GetFaceDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3291
- const parsedOutput = {
3292
- ...output,
3293
- body: await parseErrorBody(output.body, context)
3294
- };
3295
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3296
- switch (errorCode) {
3297
- case "AccessDeniedException":
3298
- case "com.amazonaws.rekognition#AccessDeniedException":
3299
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3300
- case "InternalServerError":
3301
- case "com.amazonaws.rekognition#InternalServerError":
3302
- throw await de_InternalServerErrorRes(parsedOutput, context);
3303
- case "InvalidPaginationTokenException":
3304
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3305
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3306
- case "InvalidParameterException":
3307
- case "com.amazonaws.rekognition#InvalidParameterException":
3308
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3309
- case "ProvisionedThroughputExceededException":
3310
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3311
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3312
- case "ResourceNotFoundException":
3313
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3314
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3315
- case "ThrottlingException":
3316
- case "com.amazonaws.rekognition#ThrottlingException":
3317
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3318
- default:
3319
- const parsedBody = parsedOutput.body;
3320
- return throwDefaultError({
3321
- output,
3322
- parsedBody,
3323
- errorCode
3324
- });
3325
- }
3326
- }, "de_GetFaceDetectionCommandError");
3327
1978
  var de_GetFaceLivenessSessionResultsCommand = /* @__PURE__ */ __name(async (output, context) => {
3328
1979
  if (output.statusCode >= 300) {
3329
- return de_GetFaceLivenessSessionResultsCommandError(output, context);
1980
+ return de_CommandError(output, context);
3330
1981
  }
3331
1982
  const data = await parseBody(output.body, context);
3332
1983
  let contents = {};
@@ -3337,43 +1988,9 @@ var de_GetFaceLivenessSessionResultsCommand = /* @__PURE__ */ __name(async (outp
3337
1988
  };
3338
1989
  return response;
3339
1990
  }, "de_GetFaceLivenessSessionResultsCommand");
3340
- var de_GetFaceLivenessSessionResultsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3341
- const parsedOutput = {
3342
- ...output,
3343
- body: await parseErrorBody(output.body, context)
3344
- };
3345
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3346
- switch (errorCode) {
3347
- case "AccessDeniedException":
3348
- case "com.amazonaws.rekognition#AccessDeniedException":
3349
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3350
- case "InternalServerError":
3351
- case "com.amazonaws.rekognition#InternalServerError":
3352
- throw await de_InternalServerErrorRes(parsedOutput, context);
3353
- case "InvalidParameterException":
3354
- case "com.amazonaws.rekognition#InvalidParameterException":
3355
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3356
- case "ProvisionedThroughputExceededException":
3357
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3358
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3359
- case "SessionNotFoundException":
3360
- case "com.amazonaws.rekognition#SessionNotFoundException":
3361
- throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
3362
- case "ThrottlingException":
3363
- case "com.amazonaws.rekognition#ThrottlingException":
3364
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3365
- default:
3366
- const parsedBody = parsedOutput.body;
3367
- return throwDefaultError({
3368
- output,
3369
- parsedBody,
3370
- errorCode
3371
- });
3372
- }
3373
- }, "de_GetFaceLivenessSessionResultsCommandError");
3374
1991
  var de_GetFaceSearchCommand = /* @__PURE__ */ __name(async (output, context) => {
3375
1992
  if (output.statusCode >= 300) {
3376
- return de_GetFaceSearchCommandError(output, context);
1993
+ return de_CommandError(output, context);
3377
1994
  }
3378
1995
  const data = await parseBody(output.body, context);
3379
1996
  let contents = {};
@@ -3384,46 +2001,9 @@ var de_GetFaceSearchCommand = /* @__PURE__ */ __name(async (output, context) =>
3384
2001
  };
3385
2002
  return response;
3386
2003
  }, "de_GetFaceSearchCommand");
3387
- var de_GetFaceSearchCommandError = /* @__PURE__ */ __name(async (output, context) => {
3388
- const parsedOutput = {
3389
- ...output,
3390
- body: await parseErrorBody(output.body, context)
3391
- };
3392
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3393
- switch (errorCode) {
3394
- case "AccessDeniedException":
3395
- case "com.amazonaws.rekognition#AccessDeniedException":
3396
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3397
- case "InternalServerError":
3398
- case "com.amazonaws.rekognition#InternalServerError":
3399
- throw await de_InternalServerErrorRes(parsedOutput, context);
3400
- case "InvalidPaginationTokenException":
3401
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3402
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3403
- case "InvalidParameterException":
3404
- case "com.amazonaws.rekognition#InvalidParameterException":
3405
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3406
- case "ProvisionedThroughputExceededException":
3407
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3408
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3409
- case "ResourceNotFoundException":
3410
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3411
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3412
- case "ThrottlingException":
3413
- case "com.amazonaws.rekognition#ThrottlingException":
3414
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3415
- default:
3416
- const parsedBody = parsedOutput.body;
3417
- return throwDefaultError({
3418
- output,
3419
- parsedBody,
3420
- errorCode
3421
- });
3422
- }
3423
- }, "de_GetFaceSearchCommandError");
3424
2004
  var de_GetLabelDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
3425
2005
  if (output.statusCode >= 300) {
3426
- return de_GetLabelDetectionCommandError(output, context);
2006
+ return de_CommandError(output, context);
3427
2007
  }
3428
2008
  const data = await parseBody(output.body, context);
3429
2009
  let contents = {};
@@ -3434,46 +2014,9 @@ var de_GetLabelDetectionCommand = /* @__PURE__ */ __name(async (output, context)
3434
2014
  };
3435
2015
  return response;
3436
2016
  }, "de_GetLabelDetectionCommand");
3437
- var de_GetLabelDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3438
- const parsedOutput = {
3439
- ...output,
3440
- body: await parseErrorBody(output.body, context)
3441
- };
3442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3443
- switch (errorCode) {
3444
- case "AccessDeniedException":
3445
- case "com.amazonaws.rekognition#AccessDeniedException":
3446
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3447
- case "InternalServerError":
3448
- case "com.amazonaws.rekognition#InternalServerError":
3449
- throw await de_InternalServerErrorRes(parsedOutput, context);
3450
- case "InvalidPaginationTokenException":
3451
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3452
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3453
- case "InvalidParameterException":
3454
- case "com.amazonaws.rekognition#InvalidParameterException":
3455
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3456
- case "ProvisionedThroughputExceededException":
3457
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3458
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3459
- case "ResourceNotFoundException":
3460
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3461
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3462
- case "ThrottlingException":
3463
- case "com.amazonaws.rekognition#ThrottlingException":
3464
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3465
- default:
3466
- const parsedBody = parsedOutput.body;
3467
- return throwDefaultError({
3468
- output,
3469
- parsedBody,
3470
- errorCode
3471
- });
3472
- }
3473
- }, "de_GetLabelDetectionCommandError");
3474
2017
  var de_GetMediaAnalysisJobCommand = /* @__PURE__ */ __name(async (output, context) => {
3475
2018
  if (output.statusCode >= 300) {
3476
- return de_GetMediaAnalysisJobCommandError(output, context);
2019
+ return de_CommandError(output, context);
3477
2020
  }
3478
2021
  const data = await parseBody(output.body, context);
3479
2022
  let contents = {};
@@ -3484,43 +2027,9 @@ var de_GetMediaAnalysisJobCommand = /* @__PURE__ */ __name(async (output, contex
3484
2027
  };
3485
2028
  return response;
3486
2029
  }, "de_GetMediaAnalysisJobCommand");
3487
- var de_GetMediaAnalysisJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
3488
- const parsedOutput = {
3489
- ...output,
3490
- body: await parseErrorBody(output.body, context)
3491
- };
3492
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3493
- switch (errorCode) {
3494
- case "AccessDeniedException":
3495
- case "com.amazonaws.rekognition#AccessDeniedException":
3496
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3497
- case "InternalServerError":
3498
- case "com.amazonaws.rekognition#InternalServerError":
3499
- throw await de_InternalServerErrorRes(parsedOutput, context);
3500
- case "InvalidParameterException":
3501
- case "com.amazonaws.rekognition#InvalidParameterException":
3502
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3503
- case "ProvisionedThroughputExceededException":
3504
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3505
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3506
- case "ResourceNotFoundException":
3507
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3508
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3509
- case "ThrottlingException":
3510
- case "com.amazonaws.rekognition#ThrottlingException":
3511
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3512
- default:
3513
- const parsedBody = parsedOutput.body;
3514
- return throwDefaultError({
3515
- output,
3516
- parsedBody,
3517
- errorCode
3518
- });
3519
- }
3520
- }, "de_GetMediaAnalysisJobCommandError");
3521
2030
  var de_GetPersonTrackingCommand = /* @__PURE__ */ __name(async (output, context) => {
3522
2031
  if (output.statusCode >= 300) {
3523
- return de_GetPersonTrackingCommandError(output, context);
2032
+ return de_CommandError(output, context);
3524
2033
  }
3525
2034
  const data = await parseBody(output.body, context);
3526
2035
  let contents = {};
@@ -3531,46 +2040,9 @@ var de_GetPersonTrackingCommand = /* @__PURE__ */ __name(async (output, context)
3531
2040
  };
3532
2041
  return response;
3533
2042
  }, "de_GetPersonTrackingCommand");
3534
- var de_GetPersonTrackingCommandError = /* @__PURE__ */ __name(async (output, context) => {
3535
- const parsedOutput = {
3536
- ...output,
3537
- body: await parseErrorBody(output.body, context)
3538
- };
3539
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3540
- switch (errorCode) {
3541
- case "AccessDeniedException":
3542
- case "com.amazonaws.rekognition#AccessDeniedException":
3543
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3544
- case "InternalServerError":
3545
- case "com.amazonaws.rekognition#InternalServerError":
3546
- throw await de_InternalServerErrorRes(parsedOutput, context);
3547
- case "InvalidPaginationTokenException":
3548
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3549
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3550
- case "InvalidParameterException":
3551
- case "com.amazonaws.rekognition#InvalidParameterException":
3552
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3553
- case "ProvisionedThroughputExceededException":
3554
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3555
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3556
- case "ResourceNotFoundException":
3557
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3558
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3559
- case "ThrottlingException":
3560
- case "com.amazonaws.rekognition#ThrottlingException":
3561
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3562
- default:
3563
- const parsedBody = parsedOutput.body;
3564
- return throwDefaultError({
3565
- output,
3566
- parsedBody,
3567
- errorCode
3568
- });
3569
- }
3570
- }, "de_GetPersonTrackingCommandError");
3571
2043
  var de_GetSegmentDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
3572
2044
  if (output.statusCode >= 300) {
3573
- return de_GetSegmentDetectionCommandError(output, context);
2045
+ return de_CommandError(output, context);
3574
2046
  }
3575
2047
  const data = await parseBody(output.body, context);
3576
2048
  let contents = {};
@@ -3581,96 +2053,22 @@ var de_GetSegmentDetectionCommand = /* @__PURE__ */ __name(async (output, contex
3581
2053
  };
3582
2054
  return response;
3583
2055
  }, "de_GetSegmentDetectionCommand");
3584
- var de_GetSegmentDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3585
- const parsedOutput = {
3586
- ...output,
3587
- body: await parseErrorBody(output.body, context)
3588
- };
3589
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3590
- switch (errorCode) {
3591
- case "AccessDeniedException":
3592
- case "com.amazonaws.rekognition#AccessDeniedException":
3593
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3594
- case "InternalServerError":
3595
- case "com.amazonaws.rekognition#InternalServerError":
3596
- throw await de_InternalServerErrorRes(parsedOutput, context);
3597
- case "InvalidPaginationTokenException":
3598
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3599
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3600
- case "InvalidParameterException":
3601
- case "com.amazonaws.rekognition#InvalidParameterException":
3602
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3603
- case "ProvisionedThroughputExceededException":
3604
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3605
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3606
- case "ResourceNotFoundException":
3607
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3608
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3609
- case "ThrottlingException":
3610
- case "com.amazonaws.rekognition#ThrottlingException":
3611
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3612
- default:
3613
- const parsedBody = parsedOutput.body;
3614
- return throwDefaultError({
3615
- output,
3616
- parsedBody,
3617
- errorCode
3618
- });
3619
- }
3620
- }, "de_GetSegmentDetectionCommandError");
3621
- var de_GetTextDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
3622
- if (output.statusCode >= 300) {
3623
- return de_GetTextDetectionCommandError(output, context);
3624
- }
3625
- const data = await parseBody(output.body, context);
3626
- let contents = {};
3627
- contents = de_GetTextDetectionResponse(data, context);
3628
- const response = {
3629
- $metadata: deserializeMetadata(output),
3630
- ...contents
2056
+ var de_GetTextDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
2057
+ if (output.statusCode >= 300) {
2058
+ return de_CommandError(output, context);
2059
+ }
2060
+ const data = await parseBody(output.body, context);
2061
+ let contents = {};
2062
+ contents = de_GetTextDetectionResponse(data, context);
2063
+ const response = {
2064
+ $metadata: deserializeMetadata(output),
2065
+ ...contents
3631
2066
  };
3632
2067
  return response;
3633
2068
  }, "de_GetTextDetectionCommand");
3634
- var de_GetTextDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
3635
- const parsedOutput = {
3636
- ...output,
3637
- body: await parseErrorBody(output.body, context)
3638
- };
3639
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3640
- switch (errorCode) {
3641
- case "AccessDeniedException":
3642
- case "com.amazonaws.rekognition#AccessDeniedException":
3643
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3644
- case "InternalServerError":
3645
- case "com.amazonaws.rekognition#InternalServerError":
3646
- throw await de_InternalServerErrorRes(parsedOutput, context);
3647
- case "InvalidPaginationTokenException":
3648
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3649
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3650
- case "InvalidParameterException":
3651
- case "com.amazonaws.rekognition#InvalidParameterException":
3652
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3653
- case "ProvisionedThroughputExceededException":
3654
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3655
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3656
- case "ResourceNotFoundException":
3657
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3658
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3659
- case "ThrottlingException":
3660
- case "com.amazonaws.rekognition#ThrottlingException":
3661
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3662
- default:
3663
- const parsedBody = parsedOutput.body;
3664
- return throwDefaultError({
3665
- output,
3666
- parsedBody,
3667
- errorCode
3668
- });
3669
- }
3670
- }, "de_GetTextDetectionCommandError");
3671
2069
  var de_IndexFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
3672
2070
  if (output.statusCode >= 300) {
3673
- return de_IndexFacesCommandError(output, context);
2071
+ return de_CommandError(output, context);
3674
2072
  }
3675
2073
  const data = await parseBody(output.body, context);
3676
2074
  let contents = {};
@@ -3681,55 +2079,9 @@ var de_IndexFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
3681
2079
  };
3682
2080
  return response;
3683
2081
  }, "de_IndexFacesCommand");
3684
- var de_IndexFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3685
- const parsedOutput = {
3686
- ...output,
3687
- body: await parseErrorBody(output.body, context)
3688
- };
3689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3690
- switch (errorCode) {
3691
- case "AccessDeniedException":
3692
- case "com.amazonaws.rekognition#AccessDeniedException":
3693
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3694
- case "ImageTooLargeException":
3695
- case "com.amazonaws.rekognition#ImageTooLargeException":
3696
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
3697
- case "InternalServerError":
3698
- case "com.amazonaws.rekognition#InternalServerError":
3699
- throw await de_InternalServerErrorRes(parsedOutput, context);
3700
- case "InvalidImageFormatException":
3701
- case "com.amazonaws.rekognition#InvalidImageFormatException":
3702
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
3703
- case "InvalidParameterException":
3704
- case "com.amazonaws.rekognition#InvalidParameterException":
3705
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3706
- case "InvalidS3ObjectException":
3707
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3708
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3709
- case "ProvisionedThroughputExceededException":
3710
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3711
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3712
- case "ResourceNotFoundException":
3713
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3714
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3715
- case "ServiceQuotaExceededException":
3716
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
3717
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3718
- case "ThrottlingException":
3719
- case "com.amazonaws.rekognition#ThrottlingException":
3720
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3721
- default:
3722
- const parsedBody = parsedOutput.body;
3723
- return throwDefaultError({
3724
- output,
3725
- parsedBody,
3726
- errorCode
3727
- });
3728
- }
3729
- }, "de_IndexFacesCommandError");
3730
2082
  var de_ListCollectionsCommand = /* @__PURE__ */ __name(async (output, context) => {
3731
2083
  if (output.statusCode >= 300) {
3732
- return de_ListCollectionsCommandError(output, context);
2084
+ return de_CommandError(output, context);
3733
2085
  }
3734
2086
  const data = await parseBody(output.body, context);
3735
2087
  let contents = {};
@@ -3740,46 +2092,9 @@ var de_ListCollectionsCommand = /* @__PURE__ */ __name(async (output, context) =
3740
2092
  };
3741
2093
  return response;
3742
2094
  }, "de_ListCollectionsCommand");
3743
- var de_ListCollectionsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3744
- const parsedOutput = {
3745
- ...output,
3746
- body: await parseErrorBody(output.body, context)
3747
- };
3748
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3749
- switch (errorCode) {
3750
- case "AccessDeniedException":
3751
- case "com.amazonaws.rekognition#AccessDeniedException":
3752
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3753
- case "InternalServerError":
3754
- case "com.amazonaws.rekognition#InternalServerError":
3755
- throw await de_InternalServerErrorRes(parsedOutput, context);
3756
- case "InvalidPaginationTokenException":
3757
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3758
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3759
- case "InvalidParameterException":
3760
- case "com.amazonaws.rekognition#InvalidParameterException":
3761
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3762
- case "ProvisionedThroughputExceededException":
3763
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3764
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3765
- case "ResourceNotFoundException":
3766
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3767
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3768
- case "ThrottlingException":
3769
- case "com.amazonaws.rekognition#ThrottlingException":
3770
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3771
- default:
3772
- const parsedBody = parsedOutput.body;
3773
- return throwDefaultError({
3774
- output,
3775
- parsedBody,
3776
- errorCode
3777
- });
3778
- }
3779
- }, "de_ListCollectionsCommandError");
3780
2095
  var de_ListDatasetEntriesCommand = /* @__PURE__ */ __name(async (output, context) => {
3781
2096
  if (output.statusCode >= 300) {
3782
- return de_ListDatasetEntriesCommandError(output, context);
2097
+ return de_CommandError(output, context);
3783
2098
  }
3784
2099
  const data = await parseBody(output.body, context);
3785
2100
  let contents = {};
@@ -3790,52 +2105,9 @@ var de_ListDatasetEntriesCommand = /* @__PURE__ */ __name(async (output, context
3790
2105
  };
3791
2106
  return response;
3792
2107
  }, "de_ListDatasetEntriesCommand");
3793
- var de_ListDatasetEntriesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3794
- const parsedOutput = {
3795
- ...output,
3796
- body: await parseErrorBody(output.body, context)
3797
- };
3798
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3799
- switch (errorCode) {
3800
- case "AccessDeniedException":
3801
- case "com.amazonaws.rekognition#AccessDeniedException":
3802
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3803
- case "InternalServerError":
3804
- case "com.amazonaws.rekognition#InternalServerError":
3805
- throw await de_InternalServerErrorRes(parsedOutput, context);
3806
- case "InvalidPaginationTokenException":
3807
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3808
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3809
- case "InvalidParameterException":
3810
- case "com.amazonaws.rekognition#InvalidParameterException":
3811
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3812
- case "ProvisionedThroughputExceededException":
3813
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3814
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3815
- case "ResourceInUseException":
3816
- case "com.amazonaws.rekognition#ResourceInUseException":
3817
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3818
- case "ResourceNotFoundException":
3819
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3820
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3821
- case "ResourceNotReadyException":
3822
- case "com.amazonaws.rekognition#ResourceNotReadyException":
3823
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
3824
- case "ThrottlingException":
3825
- case "com.amazonaws.rekognition#ThrottlingException":
3826
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3827
- default:
3828
- const parsedBody = parsedOutput.body;
3829
- return throwDefaultError({
3830
- output,
3831
- parsedBody,
3832
- errorCode
3833
- });
3834
- }
3835
- }, "de_ListDatasetEntriesCommandError");
3836
2108
  var de_ListDatasetLabelsCommand = /* @__PURE__ */ __name(async (output, context) => {
3837
2109
  if (output.statusCode >= 300) {
3838
- return de_ListDatasetLabelsCommandError(output, context);
2110
+ return de_CommandError(output, context);
3839
2111
  }
3840
2112
  const data = await parseBody(output.body, context);
3841
2113
  let contents = {};
@@ -3846,52 +2118,9 @@ var de_ListDatasetLabelsCommand = /* @__PURE__ */ __name(async (output, context)
3846
2118
  };
3847
2119
  return response;
3848
2120
  }, "de_ListDatasetLabelsCommand");
3849
- var de_ListDatasetLabelsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3850
- const parsedOutput = {
3851
- ...output,
3852
- body: await parseErrorBody(output.body, context)
3853
- };
3854
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3855
- switch (errorCode) {
3856
- case "AccessDeniedException":
3857
- case "com.amazonaws.rekognition#AccessDeniedException":
3858
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3859
- case "InternalServerError":
3860
- case "com.amazonaws.rekognition#InternalServerError":
3861
- throw await de_InternalServerErrorRes(parsedOutput, context);
3862
- case "InvalidPaginationTokenException":
3863
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3864
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3865
- case "InvalidParameterException":
3866
- case "com.amazonaws.rekognition#InvalidParameterException":
3867
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3868
- case "ProvisionedThroughputExceededException":
3869
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3870
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3871
- case "ResourceInUseException":
3872
- case "com.amazonaws.rekognition#ResourceInUseException":
3873
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3874
- case "ResourceNotFoundException":
3875
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3876
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3877
- case "ResourceNotReadyException":
3878
- case "com.amazonaws.rekognition#ResourceNotReadyException":
3879
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
3880
- case "ThrottlingException":
3881
- case "com.amazonaws.rekognition#ThrottlingException":
3882
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3883
- default:
3884
- const parsedBody = parsedOutput.body;
3885
- return throwDefaultError({
3886
- output,
3887
- parsedBody,
3888
- errorCode
3889
- });
3890
- }
3891
- }, "de_ListDatasetLabelsCommandError");
3892
2121
  var de_ListFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
3893
2122
  if (output.statusCode >= 300) {
3894
- return de_ListFacesCommandError(output, context);
2123
+ return de_CommandError(output, context);
3895
2124
  }
3896
2125
  const data = await parseBody(output.body, context);
3897
2126
  let contents = {};
@@ -3902,93 +2131,22 @@ var de_ListFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
3902
2131
  };
3903
2132
  return response;
3904
2133
  }, "de_ListFacesCommand");
3905
- var de_ListFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
3906
- const parsedOutput = {
3907
- ...output,
3908
- body: await parseErrorBody(output.body, context)
3909
- };
3910
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3911
- switch (errorCode) {
3912
- case "AccessDeniedException":
3913
- case "com.amazonaws.rekognition#AccessDeniedException":
3914
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3915
- case "InternalServerError":
3916
- case "com.amazonaws.rekognition#InternalServerError":
3917
- throw await de_InternalServerErrorRes(parsedOutput, context);
3918
- case "InvalidPaginationTokenException":
3919
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3920
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3921
- case "InvalidParameterException":
3922
- case "com.amazonaws.rekognition#InvalidParameterException":
3923
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3924
- case "ProvisionedThroughputExceededException":
3925
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3926
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3927
- case "ResourceNotFoundException":
3928
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3929
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3930
- case "ThrottlingException":
3931
- case "com.amazonaws.rekognition#ThrottlingException":
3932
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3933
- default:
3934
- const parsedBody = parsedOutput.body;
3935
- return throwDefaultError({
3936
- output,
3937
- parsedBody,
3938
- errorCode
3939
- });
3940
- }
3941
- }, "de_ListFacesCommandError");
3942
- var de_ListMediaAnalysisJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
3943
- if (output.statusCode >= 300) {
3944
- return de_ListMediaAnalysisJobsCommandError(output, context);
3945
- }
3946
- const data = await parseBody(output.body, context);
3947
- let contents = {};
3948
- contents = de_ListMediaAnalysisJobsResponse(data, context);
3949
- const response = {
3950
- $metadata: deserializeMetadata(output),
3951
- ...contents
2134
+ var de_ListMediaAnalysisJobsCommand = /* @__PURE__ */ __name(async (output, context) => {
2135
+ if (output.statusCode >= 300) {
2136
+ return de_CommandError(output, context);
2137
+ }
2138
+ const data = await parseBody(output.body, context);
2139
+ let contents = {};
2140
+ contents = de_ListMediaAnalysisJobsResponse(data, context);
2141
+ const response = {
2142
+ $metadata: deserializeMetadata(output),
2143
+ ...contents
3952
2144
  };
3953
2145
  return response;
3954
2146
  }, "de_ListMediaAnalysisJobsCommand");
3955
- var de_ListMediaAnalysisJobsCommandError = /* @__PURE__ */ __name(async (output, context) => {
3956
- const parsedOutput = {
3957
- ...output,
3958
- body: await parseErrorBody(output.body, context)
3959
- };
3960
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3961
- switch (errorCode) {
3962
- case "AccessDeniedException":
3963
- case "com.amazonaws.rekognition#AccessDeniedException":
3964
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3965
- case "InternalServerError":
3966
- case "com.amazonaws.rekognition#InternalServerError":
3967
- throw await de_InternalServerErrorRes(parsedOutput, context);
3968
- case "InvalidPaginationTokenException":
3969
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3970
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3971
- case "InvalidParameterException":
3972
- case "com.amazonaws.rekognition#InvalidParameterException":
3973
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3974
- case "ProvisionedThroughputExceededException":
3975
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3976
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3977
- case "ThrottlingException":
3978
- case "com.amazonaws.rekognition#ThrottlingException":
3979
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3980
- default:
3981
- const parsedBody = parsedOutput.body;
3982
- return throwDefaultError({
3983
- output,
3984
- parsedBody,
3985
- errorCode
3986
- });
3987
- }
3988
- }, "de_ListMediaAnalysisJobsCommandError");
3989
2147
  var de_ListProjectPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => {
3990
2148
  if (output.statusCode >= 300) {
3991
- return de_ListProjectPoliciesCommandError(output, context);
2149
+ return de_CommandError(output, context);
3992
2150
  }
3993
2151
  const data = await parseBody(output.body, context);
3994
2152
  let contents = {};
@@ -3999,46 +2157,9 @@ var de_ListProjectPoliciesCommand = /* @__PURE__ */ __name(async (output, contex
3999
2157
  };
4000
2158
  return response;
4001
2159
  }, "de_ListProjectPoliciesCommand");
4002
- var de_ListProjectPoliciesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4003
- const parsedOutput = {
4004
- ...output,
4005
- body: await parseErrorBody(output.body, context)
4006
- };
4007
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4008
- switch (errorCode) {
4009
- case "AccessDeniedException":
4010
- case "com.amazonaws.rekognition#AccessDeniedException":
4011
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4012
- case "InternalServerError":
4013
- case "com.amazonaws.rekognition#InternalServerError":
4014
- throw await de_InternalServerErrorRes(parsedOutput, context);
4015
- case "InvalidPaginationTokenException":
4016
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
4017
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
4018
- case "InvalidParameterException":
4019
- case "com.amazonaws.rekognition#InvalidParameterException":
4020
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4021
- case "ProvisionedThroughputExceededException":
4022
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4023
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4024
- case "ResourceNotFoundException":
4025
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4026
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4027
- case "ThrottlingException":
4028
- case "com.amazonaws.rekognition#ThrottlingException":
4029
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4030
- default:
4031
- const parsedBody = parsedOutput.body;
4032
- return throwDefaultError({
4033
- output,
4034
- parsedBody,
4035
- errorCode
4036
- });
4037
- }
4038
- }, "de_ListProjectPoliciesCommandError");
4039
2160
  var de_ListStreamProcessorsCommand = /* @__PURE__ */ __name(async (output, context) => {
4040
2161
  if (output.statusCode >= 300) {
4041
- return de_ListStreamProcessorsCommandError(output, context);
2162
+ return de_CommandError(output, context);
4042
2163
  }
4043
2164
  const data = await parseBody(output.body, context);
4044
2165
  let contents = {};
@@ -4049,43 +2170,9 @@ var de_ListStreamProcessorsCommand = /* @__PURE__ */ __name(async (output, conte
4049
2170
  };
4050
2171
  return response;
4051
2172
  }, "de_ListStreamProcessorsCommand");
4052
- var de_ListStreamProcessorsCommandError = /* @__PURE__ */ __name(async (output, context) => {
4053
- const parsedOutput = {
4054
- ...output,
4055
- body: await parseErrorBody(output.body, context)
4056
- };
4057
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4058
- switch (errorCode) {
4059
- case "AccessDeniedException":
4060
- case "com.amazonaws.rekognition#AccessDeniedException":
4061
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4062
- case "InternalServerError":
4063
- case "com.amazonaws.rekognition#InternalServerError":
4064
- throw await de_InternalServerErrorRes(parsedOutput, context);
4065
- case "InvalidPaginationTokenException":
4066
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
4067
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
4068
- case "InvalidParameterException":
4069
- case "com.amazonaws.rekognition#InvalidParameterException":
4070
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4071
- case "ProvisionedThroughputExceededException":
4072
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4073
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4074
- case "ThrottlingException":
4075
- case "com.amazonaws.rekognition#ThrottlingException":
4076
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4077
- default:
4078
- const parsedBody = parsedOutput.body;
4079
- return throwDefaultError({
4080
- output,
4081
- parsedBody,
4082
- errorCode
4083
- });
4084
- }
4085
- }, "de_ListStreamProcessorsCommandError");
4086
2173
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
4087
2174
  if (output.statusCode >= 300) {
4088
- return de_ListTagsForResourceCommandError(output, context);
2175
+ return de_CommandError(output, context);
4089
2176
  }
4090
2177
  const data = await parseBody(output.body, context);
4091
2178
  let contents = {};
@@ -4096,43 +2183,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
4096
2183
  };
4097
2184
  return response;
4098
2185
  }, "de_ListTagsForResourceCommand");
4099
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
4100
- const parsedOutput = {
4101
- ...output,
4102
- body: await parseErrorBody(output.body, context)
4103
- };
4104
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4105
- switch (errorCode) {
4106
- case "AccessDeniedException":
4107
- case "com.amazonaws.rekognition#AccessDeniedException":
4108
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4109
- case "InternalServerError":
4110
- case "com.amazonaws.rekognition#InternalServerError":
4111
- throw await de_InternalServerErrorRes(parsedOutput, context);
4112
- case "InvalidParameterException":
4113
- case "com.amazonaws.rekognition#InvalidParameterException":
4114
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4115
- case "ProvisionedThroughputExceededException":
4116
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4117
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4118
- case "ResourceNotFoundException":
4119
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4120
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4121
- case "ThrottlingException":
4122
- case "com.amazonaws.rekognition#ThrottlingException":
4123
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4124
- default:
4125
- const parsedBody = parsedOutput.body;
4126
- return throwDefaultError({
4127
- output,
4128
- parsedBody,
4129
- errorCode
4130
- });
4131
- }
4132
- }, "de_ListTagsForResourceCommandError");
4133
2186
  var de_ListUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
4134
2187
  if (output.statusCode >= 300) {
4135
- return de_ListUsersCommandError(output, context);
2188
+ return de_CommandError(output, context);
4136
2189
  }
4137
2190
  const data = await parseBody(output.body, context);
4138
2191
  let contents = {};
@@ -4143,46 +2196,9 @@ var de_ListUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
4143
2196
  };
4144
2197
  return response;
4145
2198
  }, "de_ListUsersCommand");
4146
- var de_ListUsersCommandError = /* @__PURE__ */ __name(async (output, context) => {
4147
- const parsedOutput = {
4148
- ...output,
4149
- body: await parseErrorBody(output.body, context)
4150
- };
4151
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4152
- switch (errorCode) {
4153
- case "AccessDeniedException":
4154
- case "com.amazonaws.rekognition#AccessDeniedException":
4155
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4156
- case "InternalServerError":
4157
- case "com.amazonaws.rekognition#InternalServerError":
4158
- throw await de_InternalServerErrorRes(parsedOutput, context);
4159
- case "InvalidPaginationTokenException":
4160
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
4161
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
4162
- case "InvalidParameterException":
4163
- case "com.amazonaws.rekognition#InvalidParameterException":
4164
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4165
- case "ProvisionedThroughputExceededException":
4166
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4167
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4168
- case "ResourceNotFoundException":
4169
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4170
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4171
- case "ThrottlingException":
4172
- case "com.amazonaws.rekognition#ThrottlingException":
4173
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4174
- default:
4175
- const parsedBody = parsedOutput.body;
4176
- return throwDefaultError({
4177
- output,
4178
- parsedBody,
4179
- errorCode
4180
- });
4181
- }
4182
- }, "de_ListUsersCommandError");
4183
2199
  var de_PutProjectPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
4184
2200
  if (output.statusCode >= 300) {
4185
- return de_PutProjectPolicyCommandError(output, context);
2201
+ return de_CommandError(output, context);
4186
2202
  }
4187
2203
  const data = await parseBody(output.body, context);
4188
2204
  let contents = {};
@@ -4193,58 +2209,9 @@ var de_PutProjectPolicyCommand = /* @__PURE__ */ __name(async (output, context)
4193
2209
  };
4194
2210
  return response;
4195
2211
  }, "de_PutProjectPolicyCommand");
4196
- var de_PutProjectPolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
4197
- const parsedOutput = {
4198
- ...output,
4199
- body: await parseErrorBody(output.body, context)
4200
- };
4201
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4202
- switch (errorCode) {
4203
- case "AccessDeniedException":
4204
- case "com.amazonaws.rekognition#AccessDeniedException":
4205
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4206
- case "InternalServerError":
4207
- case "com.amazonaws.rekognition#InternalServerError":
4208
- throw await de_InternalServerErrorRes(parsedOutput, context);
4209
- case "InvalidParameterException":
4210
- case "com.amazonaws.rekognition#InvalidParameterException":
4211
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4212
- case "InvalidPolicyRevisionIdException":
4213
- case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException":
4214
- throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
4215
- case "LimitExceededException":
4216
- case "com.amazonaws.rekognition#LimitExceededException":
4217
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4218
- case "MalformedPolicyDocumentException":
4219
- case "com.amazonaws.rekognition#MalformedPolicyDocumentException":
4220
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
4221
- case "ProvisionedThroughputExceededException":
4222
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4223
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4224
- case "ResourceAlreadyExistsException":
4225
- case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
4226
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
4227
- case "ResourceNotFoundException":
4228
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4229
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4230
- case "ServiceQuotaExceededException":
4231
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
4232
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4233
- case "ThrottlingException":
4234
- case "com.amazonaws.rekognition#ThrottlingException":
4235
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4236
- default:
4237
- const parsedBody = parsedOutput.body;
4238
- return throwDefaultError({
4239
- output,
4240
- parsedBody,
4241
- errorCode
4242
- });
4243
- }
4244
- }, "de_PutProjectPolicyCommandError");
4245
2212
  var de_RecognizeCelebritiesCommand = /* @__PURE__ */ __name(async (output, context) => {
4246
2213
  if (output.statusCode >= 300) {
4247
- return de_RecognizeCelebritiesCommandError(output, context);
2214
+ return de_CommandError(output, context);
4248
2215
  }
4249
2216
  const data = await parseBody(output.body, context);
4250
2217
  let contents = {};
@@ -4255,96 +2222,22 @@ var de_RecognizeCelebritiesCommand = /* @__PURE__ */ __name(async (output, conte
4255
2222
  };
4256
2223
  return response;
4257
2224
  }, "de_RecognizeCelebritiesCommand");
4258
- var de_RecognizeCelebritiesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4259
- const parsedOutput = {
4260
- ...output,
4261
- body: await parseErrorBody(output.body, context)
4262
- };
4263
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4264
- switch (errorCode) {
4265
- case "AccessDeniedException":
4266
- case "com.amazonaws.rekognition#AccessDeniedException":
4267
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4268
- case "ImageTooLargeException":
4269
- case "com.amazonaws.rekognition#ImageTooLargeException":
4270
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
4271
- case "InternalServerError":
4272
- case "com.amazonaws.rekognition#InternalServerError":
4273
- throw await de_InternalServerErrorRes(parsedOutput, context);
4274
- case "InvalidImageFormatException":
4275
- case "com.amazonaws.rekognition#InvalidImageFormatException":
4276
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
4277
- case "InvalidParameterException":
4278
- case "com.amazonaws.rekognition#InvalidParameterException":
4279
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4280
- case "InvalidS3ObjectException":
4281
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4282
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4283
- case "ProvisionedThroughputExceededException":
4284
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4285
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4286
- case "ThrottlingException":
4287
- case "com.amazonaws.rekognition#ThrottlingException":
4288
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4289
- default:
4290
- const parsedBody = parsedOutput.body;
4291
- return throwDefaultError({
4292
- output,
4293
- parsedBody,
4294
- errorCode
4295
- });
4296
- }
4297
- }, "de_RecognizeCelebritiesCommandError");
4298
- var de_SearchFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
4299
- if (output.statusCode >= 300) {
4300
- return de_SearchFacesCommandError(output, context);
4301
- }
4302
- const data = await parseBody(output.body, context);
4303
- let contents = {};
4304
- contents = de_SearchFacesResponse(data, context);
4305
- const response = {
4306
- $metadata: deserializeMetadata(output),
4307
- ...contents
2225
+ var de_SearchFacesCommand = /* @__PURE__ */ __name(async (output, context) => {
2226
+ if (output.statusCode >= 300) {
2227
+ return de_CommandError(output, context);
2228
+ }
2229
+ const data = await parseBody(output.body, context);
2230
+ let contents = {};
2231
+ contents = de_SearchFacesResponse(data, context);
2232
+ const response = {
2233
+ $metadata: deserializeMetadata(output),
2234
+ ...contents
4308
2235
  };
4309
2236
  return response;
4310
2237
  }, "de_SearchFacesCommand");
4311
- var de_SearchFacesCommandError = /* @__PURE__ */ __name(async (output, context) => {
4312
- const parsedOutput = {
4313
- ...output,
4314
- body: await parseErrorBody(output.body, context)
4315
- };
4316
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4317
- switch (errorCode) {
4318
- case "AccessDeniedException":
4319
- case "com.amazonaws.rekognition#AccessDeniedException":
4320
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4321
- case "InternalServerError":
4322
- case "com.amazonaws.rekognition#InternalServerError":
4323
- throw await de_InternalServerErrorRes(parsedOutput, context);
4324
- case "InvalidParameterException":
4325
- case "com.amazonaws.rekognition#InvalidParameterException":
4326
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4327
- case "ProvisionedThroughputExceededException":
4328
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4329
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4330
- case "ResourceNotFoundException":
4331
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4332
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4333
- case "ThrottlingException":
4334
- case "com.amazonaws.rekognition#ThrottlingException":
4335
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4336
- default:
4337
- const parsedBody = parsedOutput.body;
4338
- return throwDefaultError({
4339
- output,
4340
- parsedBody,
4341
- errorCode
4342
- });
4343
- }
4344
- }, "de_SearchFacesCommandError");
4345
2238
  var de_SearchFacesByImageCommand = /* @__PURE__ */ __name(async (output, context) => {
4346
2239
  if (output.statusCode >= 300) {
4347
- return de_SearchFacesByImageCommandError(output, context);
2240
+ return de_CommandError(output, context);
4348
2241
  }
4349
2242
  const data = await parseBody(output.body, context);
4350
2243
  let contents = {};
@@ -4355,52 +2248,9 @@ var de_SearchFacesByImageCommand = /* @__PURE__ */ __name(async (output, context
4355
2248
  };
4356
2249
  return response;
4357
2250
  }, "de_SearchFacesByImageCommand");
4358
- var de_SearchFacesByImageCommandError = /* @__PURE__ */ __name(async (output, context) => {
4359
- const parsedOutput = {
4360
- ...output,
4361
- body: await parseErrorBody(output.body, context)
4362
- };
4363
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4364
- switch (errorCode) {
4365
- case "AccessDeniedException":
4366
- case "com.amazonaws.rekognition#AccessDeniedException":
4367
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4368
- case "ImageTooLargeException":
4369
- case "com.amazonaws.rekognition#ImageTooLargeException":
4370
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
4371
- case "InternalServerError":
4372
- case "com.amazonaws.rekognition#InternalServerError":
4373
- throw await de_InternalServerErrorRes(parsedOutput, context);
4374
- case "InvalidImageFormatException":
4375
- case "com.amazonaws.rekognition#InvalidImageFormatException":
4376
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
4377
- case "InvalidParameterException":
4378
- case "com.amazonaws.rekognition#InvalidParameterException":
4379
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4380
- case "InvalidS3ObjectException":
4381
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4382
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4383
- case "ProvisionedThroughputExceededException":
4384
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4385
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4386
- case "ResourceNotFoundException":
4387
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4388
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4389
- case "ThrottlingException":
4390
- case "com.amazonaws.rekognition#ThrottlingException":
4391
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4392
- default:
4393
- const parsedBody = parsedOutput.body;
4394
- return throwDefaultError({
4395
- output,
4396
- parsedBody,
4397
- errorCode
4398
- });
4399
- }
4400
- }, "de_SearchFacesByImageCommandError");
4401
2251
  var de_SearchUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
4402
2252
  if (output.statusCode >= 300) {
4403
- return de_SearchUsersCommandError(output, context);
2253
+ return de_CommandError(output, context);
4404
2254
  }
4405
2255
  const data = await parseBody(output.body, context);
4406
2256
  let contents = {};
@@ -4411,43 +2261,9 @@ var de_SearchUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
4411
2261
  };
4412
2262
  return response;
4413
2263
  }, "de_SearchUsersCommand");
4414
- var de_SearchUsersCommandError = /* @__PURE__ */ __name(async (output, context) => {
4415
- const parsedOutput = {
4416
- ...output,
4417
- body: await parseErrorBody(output.body, context)
4418
- };
4419
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4420
- switch (errorCode) {
4421
- case "AccessDeniedException":
4422
- case "com.amazonaws.rekognition#AccessDeniedException":
4423
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4424
- case "InternalServerError":
4425
- case "com.amazonaws.rekognition#InternalServerError":
4426
- throw await de_InternalServerErrorRes(parsedOutput, context);
4427
- case "InvalidParameterException":
4428
- case "com.amazonaws.rekognition#InvalidParameterException":
4429
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4430
- case "ProvisionedThroughputExceededException":
4431
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4432
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4433
- case "ResourceNotFoundException":
4434
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4435
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4436
- case "ThrottlingException":
4437
- case "com.amazonaws.rekognition#ThrottlingException":
4438
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4439
- default:
4440
- const parsedBody = parsedOutput.body;
4441
- return throwDefaultError({
4442
- output,
4443
- parsedBody,
4444
- errorCode
4445
- });
4446
- }
4447
- }, "de_SearchUsersCommandError");
4448
2264
  var de_SearchUsersByImageCommand = /* @__PURE__ */ __name(async (output, context) => {
4449
2265
  if (output.statusCode >= 300) {
4450
- return de_SearchUsersByImageCommandError(output, context);
2266
+ return de_CommandError(output, context);
4451
2267
  }
4452
2268
  const data = await parseBody(output.body, context);
4453
2269
  let contents = {};
@@ -4458,52 +2274,9 @@ var de_SearchUsersByImageCommand = /* @__PURE__ */ __name(async (output, context
4458
2274
  };
4459
2275
  return response;
4460
2276
  }, "de_SearchUsersByImageCommand");
4461
- var de_SearchUsersByImageCommandError = /* @__PURE__ */ __name(async (output, context) => {
4462
- const parsedOutput = {
4463
- ...output,
4464
- body: await parseErrorBody(output.body, context)
4465
- };
4466
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4467
- switch (errorCode) {
4468
- case "AccessDeniedException":
4469
- case "com.amazonaws.rekognition#AccessDeniedException":
4470
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4471
- case "ImageTooLargeException":
4472
- case "com.amazonaws.rekognition#ImageTooLargeException":
4473
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
4474
- case "InternalServerError":
4475
- case "com.amazonaws.rekognition#InternalServerError":
4476
- throw await de_InternalServerErrorRes(parsedOutput, context);
4477
- case "InvalidImageFormatException":
4478
- case "com.amazonaws.rekognition#InvalidImageFormatException":
4479
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
4480
- case "InvalidParameterException":
4481
- case "com.amazonaws.rekognition#InvalidParameterException":
4482
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4483
- case "InvalidS3ObjectException":
4484
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4485
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4486
- case "ProvisionedThroughputExceededException":
4487
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4488
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4489
- case "ResourceNotFoundException":
4490
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4491
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4492
- case "ThrottlingException":
4493
- case "com.amazonaws.rekognition#ThrottlingException":
4494
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4495
- default:
4496
- const parsedBody = parsedOutput.body;
4497
- return throwDefaultError({
4498
- output,
4499
- parsedBody,
4500
- errorCode
4501
- });
4502
- }
4503
- }, "de_SearchUsersByImageCommandError");
4504
2277
  var de_StartCelebrityRecognitionCommand = /* @__PURE__ */ __name(async (output, context) => {
4505
2278
  if (output.statusCode >= 300) {
4506
- return de_StartCelebrityRecognitionCommandError(output, context);
2279
+ return de_CommandError(output, context);
4507
2280
  }
4508
2281
  const data = await parseBody(output.body, context);
4509
2282
  let contents = {};
@@ -4514,52 +2287,9 @@ var de_StartCelebrityRecognitionCommand = /* @__PURE__ */ __name(async (output,
4514
2287
  };
4515
2288
  return response;
4516
2289
  }, "de_StartCelebrityRecognitionCommand");
4517
- var de_StartCelebrityRecognitionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4518
- const parsedOutput = {
4519
- ...output,
4520
- body: await parseErrorBody(output.body, context)
4521
- };
4522
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4523
- switch (errorCode) {
4524
- case "AccessDeniedException":
4525
- case "com.amazonaws.rekognition#AccessDeniedException":
4526
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4527
- case "IdempotentParameterMismatchException":
4528
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4529
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4530
- case "InternalServerError":
4531
- case "com.amazonaws.rekognition#InternalServerError":
4532
- throw await de_InternalServerErrorRes(parsedOutput, context);
4533
- case "InvalidParameterException":
4534
- case "com.amazonaws.rekognition#InvalidParameterException":
4535
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4536
- case "InvalidS3ObjectException":
4537
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4538
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4539
- case "LimitExceededException":
4540
- case "com.amazonaws.rekognition#LimitExceededException":
4541
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4542
- case "ProvisionedThroughputExceededException":
4543
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4544
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4545
- case "ThrottlingException":
4546
- case "com.amazonaws.rekognition#ThrottlingException":
4547
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4548
- case "VideoTooLargeException":
4549
- case "com.amazonaws.rekognition#VideoTooLargeException":
4550
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
4551
- default:
4552
- const parsedBody = parsedOutput.body;
4553
- return throwDefaultError({
4554
- output,
4555
- parsedBody,
4556
- errorCode
4557
- });
4558
- }
4559
- }, "de_StartCelebrityRecognitionCommandError");
4560
2290
  var de_StartContentModerationCommand = /* @__PURE__ */ __name(async (output, context) => {
4561
2291
  if (output.statusCode >= 300) {
4562
- return de_StartContentModerationCommandError(output, context);
2292
+ return de_CommandError(output, context);
4563
2293
  }
4564
2294
  const data = await parseBody(output.body, context);
4565
2295
  let contents = {};
@@ -4570,108 +2300,22 @@ var de_StartContentModerationCommand = /* @__PURE__ */ __name(async (output, con
4570
2300
  };
4571
2301
  return response;
4572
2302
  }, "de_StartContentModerationCommand");
4573
- var de_StartContentModerationCommandError = /* @__PURE__ */ __name(async (output, context) => {
4574
- const parsedOutput = {
4575
- ...output,
4576
- body: await parseErrorBody(output.body, context)
4577
- };
4578
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4579
- switch (errorCode) {
4580
- case "AccessDeniedException":
4581
- case "com.amazonaws.rekognition#AccessDeniedException":
4582
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4583
- case "IdempotentParameterMismatchException":
4584
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4585
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4586
- case "InternalServerError":
4587
- case "com.amazonaws.rekognition#InternalServerError":
4588
- throw await de_InternalServerErrorRes(parsedOutput, context);
4589
- case "InvalidParameterException":
4590
- case "com.amazonaws.rekognition#InvalidParameterException":
4591
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4592
- case "InvalidS3ObjectException":
4593
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4594
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4595
- case "LimitExceededException":
4596
- case "com.amazonaws.rekognition#LimitExceededException":
4597
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4598
- case "ProvisionedThroughputExceededException":
4599
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4600
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4601
- case "ThrottlingException":
4602
- case "com.amazonaws.rekognition#ThrottlingException":
4603
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4604
- case "VideoTooLargeException":
4605
- case "com.amazonaws.rekognition#VideoTooLargeException":
4606
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
4607
- default:
4608
- const parsedBody = parsedOutput.body;
4609
- return throwDefaultError({
4610
- output,
4611
- parsedBody,
4612
- errorCode
4613
- });
4614
- }
4615
- }, "de_StartContentModerationCommandError");
4616
- var de_StartFaceDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
4617
- if (output.statusCode >= 300) {
4618
- return de_StartFaceDetectionCommandError(output, context);
4619
- }
4620
- const data = await parseBody(output.body, context);
4621
- let contents = {};
4622
- contents = (0, import_smithy_client._json)(data);
4623
- const response = {
4624
- $metadata: deserializeMetadata(output),
4625
- ...contents
2303
+ var de_StartFaceDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
2304
+ if (output.statusCode >= 300) {
2305
+ return de_CommandError(output, context);
2306
+ }
2307
+ const data = await parseBody(output.body, context);
2308
+ let contents = {};
2309
+ contents = (0, import_smithy_client._json)(data);
2310
+ const response = {
2311
+ $metadata: deserializeMetadata(output),
2312
+ ...contents
4626
2313
  };
4627
2314
  return response;
4628
2315
  }, "de_StartFaceDetectionCommand");
4629
- var de_StartFaceDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4630
- const parsedOutput = {
4631
- ...output,
4632
- body: await parseErrorBody(output.body, context)
4633
- };
4634
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4635
- switch (errorCode) {
4636
- case "AccessDeniedException":
4637
- case "com.amazonaws.rekognition#AccessDeniedException":
4638
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4639
- case "IdempotentParameterMismatchException":
4640
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4641
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4642
- case "InternalServerError":
4643
- case "com.amazonaws.rekognition#InternalServerError":
4644
- throw await de_InternalServerErrorRes(parsedOutput, context);
4645
- case "InvalidParameterException":
4646
- case "com.amazonaws.rekognition#InvalidParameterException":
4647
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4648
- case "InvalidS3ObjectException":
4649
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4650
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4651
- case "LimitExceededException":
4652
- case "com.amazonaws.rekognition#LimitExceededException":
4653
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4654
- case "ProvisionedThroughputExceededException":
4655
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4656
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4657
- case "ThrottlingException":
4658
- case "com.amazonaws.rekognition#ThrottlingException":
4659
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4660
- case "VideoTooLargeException":
4661
- case "com.amazonaws.rekognition#VideoTooLargeException":
4662
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
4663
- default:
4664
- const parsedBody = parsedOutput.body;
4665
- return throwDefaultError({
4666
- output,
4667
- parsedBody,
4668
- errorCode
4669
- });
4670
- }
4671
- }, "de_StartFaceDetectionCommandError");
4672
2316
  var de_StartFaceSearchCommand = /* @__PURE__ */ __name(async (output, context) => {
4673
2317
  if (output.statusCode >= 300) {
4674
- return de_StartFaceSearchCommandError(output, context);
2318
+ return de_CommandError(output, context);
4675
2319
  }
4676
2320
  const data = await parseBody(output.body, context);
4677
2321
  let contents = {};
@@ -4682,55 +2326,9 @@ var de_StartFaceSearchCommand = /* @__PURE__ */ __name(async (output, context) =
4682
2326
  };
4683
2327
  return response;
4684
2328
  }, "de_StartFaceSearchCommand");
4685
- var de_StartFaceSearchCommandError = /* @__PURE__ */ __name(async (output, context) => {
4686
- const parsedOutput = {
4687
- ...output,
4688
- body: await parseErrorBody(output.body, context)
4689
- };
4690
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4691
- switch (errorCode) {
4692
- case "AccessDeniedException":
4693
- case "com.amazonaws.rekognition#AccessDeniedException":
4694
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4695
- case "IdempotentParameterMismatchException":
4696
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4697
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4698
- case "InternalServerError":
4699
- case "com.amazonaws.rekognition#InternalServerError":
4700
- throw await de_InternalServerErrorRes(parsedOutput, context);
4701
- case "InvalidParameterException":
4702
- case "com.amazonaws.rekognition#InvalidParameterException":
4703
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4704
- case "InvalidS3ObjectException":
4705
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4706
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4707
- case "LimitExceededException":
4708
- case "com.amazonaws.rekognition#LimitExceededException":
4709
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4710
- case "ProvisionedThroughputExceededException":
4711
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4712
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4713
- case "ResourceNotFoundException":
4714
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4715
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4716
- case "ThrottlingException":
4717
- case "com.amazonaws.rekognition#ThrottlingException":
4718
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4719
- case "VideoTooLargeException":
4720
- case "com.amazonaws.rekognition#VideoTooLargeException":
4721
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
4722
- default:
4723
- const parsedBody = parsedOutput.body;
4724
- return throwDefaultError({
4725
- output,
4726
- parsedBody,
4727
- errorCode
4728
- });
4729
- }
4730
- }, "de_StartFaceSearchCommandError");
4731
2329
  var de_StartLabelDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
4732
2330
  if (output.statusCode >= 300) {
4733
- return de_StartLabelDetectionCommandError(output, context);
2331
+ return de_CommandError(output, context);
4734
2332
  }
4735
2333
  const data = await parseBody(output.body, context);
4736
2334
  let contents = {};
@@ -4741,52 +2339,9 @@ var de_StartLabelDetectionCommand = /* @__PURE__ */ __name(async (output, contex
4741
2339
  };
4742
2340
  return response;
4743
2341
  }, "de_StartLabelDetectionCommand");
4744
- var de_StartLabelDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4745
- const parsedOutput = {
4746
- ...output,
4747
- body: await parseErrorBody(output.body, context)
4748
- };
4749
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4750
- switch (errorCode) {
4751
- case "AccessDeniedException":
4752
- case "com.amazonaws.rekognition#AccessDeniedException":
4753
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4754
- case "IdempotentParameterMismatchException":
4755
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4756
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4757
- case "InternalServerError":
4758
- case "com.amazonaws.rekognition#InternalServerError":
4759
- throw await de_InternalServerErrorRes(parsedOutput, context);
4760
- case "InvalidParameterException":
4761
- case "com.amazonaws.rekognition#InvalidParameterException":
4762
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4763
- case "InvalidS3ObjectException":
4764
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4765
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4766
- case "LimitExceededException":
4767
- case "com.amazonaws.rekognition#LimitExceededException":
4768
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4769
- case "ProvisionedThroughputExceededException":
4770
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4771
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4772
- case "ThrottlingException":
4773
- case "com.amazonaws.rekognition#ThrottlingException":
4774
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4775
- case "VideoTooLargeException":
4776
- case "com.amazonaws.rekognition#VideoTooLargeException":
4777
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
4778
- default:
4779
- const parsedBody = parsedOutput.body;
4780
- return throwDefaultError({
4781
- output,
4782
- parsedBody,
4783
- errorCode
4784
- });
4785
- }
4786
- }, "de_StartLabelDetectionCommandError");
4787
2342
  var de_StartMediaAnalysisJobCommand = /* @__PURE__ */ __name(async (output, context) => {
4788
2343
  if (output.statusCode >= 300) {
4789
- return de_StartMediaAnalysisJobCommandError(output, context);
2344
+ return de_CommandError(output, context);
4790
2345
  }
4791
2346
  const data = await parseBody(output.body, context);
4792
2347
  let contents = {};
@@ -4797,58 +2352,9 @@ var de_StartMediaAnalysisJobCommand = /* @__PURE__ */ __name(async (output, cont
4797
2352
  };
4798
2353
  return response;
4799
2354
  }, "de_StartMediaAnalysisJobCommand");
4800
- var de_StartMediaAnalysisJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
4801
- const parsedOutput = {
4802
- ...output,
4803
- body: await parseErrorBody(output.body, context)
4804
- };
4805
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4806
- switch (errorCode) {
4807
- case "AccessDeniedException":
4808
- case "com.amazonaws.rekognition#AccessDeniedException":
4809
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4810
- case "IdempotentParameterMismatchException":
4811
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4812
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4813
- case "InternalServerError":
4814
- case "com.amazonaws.rekognition#InternalServerError":
4815
- throw await de_InternalServerErrorRes(parsedOutput, context);
4816
- case "InvalidManifestException":
4817
- case "com.amazonaws.rekognition#InvalidManifestException":
4818
- throw await de_InvalidManifestExceptionRes(parsedOutput, context);
4819
- case "InvalidParameterException":
4820
- case "com.amazonaws.rekognition#InvalidParameterException":
4821
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4822
- case "InvalidS3ObjectException":
4823
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4824
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4825
- case "LimitExceededException":
4826
- case "com.amazonaws.rekognition#LimitExceededException":
4827
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4828
- case "ProvisionedThroughputExceededException":
4829
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4830
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4831
- case "ResourceNotFoundException":
4832
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4833
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4834
- case "ResourceNotReadyException":
4835
- case "com.amazonaws.rekognition#ResourceNotReadyException":
4836
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
4837
- case "ThrottlingException":
4838
- case "com.amazonaws.rekognition#ThrottlingException":
4839
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4840
- default:
4841
- const parsedBody = parsedOutput.body;
4842
- return throwDefaultError({
4843
- output,
4844
- parsedBody,
4845
- errorCode
4846
- });
4847
- }
4848
- }, "de_StartMediaAnalysisJobCommandError");
4849
2355
  var de_StartPersonTrackingCommand = /* @__PURE__ */ __name(async (output, context) => {
4850
2356
  if (output.statusCode >= 300) {
4851
- return de_StartPersonTrackingCommandError(output, context);
2357
+ return de_CommandError(output, context);
4852
2358
  }
4853
2359
  const data = await parseBody(output.body, context);
4854
2360
  let contents = {};
@@ -4859,52 +2365,9 @@ var de_StartPersonTrackingCommand = /* @__PURE__ */ __name(async (output, contex
4859
2365
  };
4860
2366
  return response;
4861
2367
  }, "de_StartPersonTrackingCommand");
4862
- var de_StartPersonTrackingCommandError = /* @__PURE__ */ __name(async (output, context) => {
4863
- const parsedOutput = {
4864
- ...output,
4865
- body: await parseErrorBody(output.body, context)
4866
- };
4867
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4868
- switch (errorCode) {
4869
- case "AccessDeniedException":
4870
- case "com.amazonaws.rekognition#AccessDeniedException":
4871
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4872
- case "IdempotentParameterMismatchException":
4873
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4874
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4875
- case "InternalServerError":
4876
- case "com.amazonaws.rekognition#InternalServerError":
4877
- throw await de_InternalServerErrorRes(parsedOutput, context);
4878
- case "InvalidParameterException":
4879
- case "com.amazonaws.rekognition#InvalidParameterException":
4880
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4881
- case "InvalidS3ObjectException":
4882
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4883
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4884
- case "LimitExceededException":
4885
- case "com.amazonaws.rekognition#LimitExceededException":
4886
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4887
- case "ProvisionedThroughputExceededException":
4888
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4889
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4890
- case "ThrottlingException":
4891
- case "com.amazonaws.rekognition#ThrottlingException":
4892
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4893
- case "VideoTooLargeException":
4894
- case "com.amazonaws.rekognition#VideoTooLargeException":
4895
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
4896
- default:
4897
- const parsedBody = parsedOutput.body;
4898
- return throwDefaultError({
4899
- output,
4900
- parsedBody,
4901
- errorCode
4902
- });
4903
- }
4904
- }, "de_StartPersonTrackingCommandError");
4905
2368
  var de_StartProjectVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
4906
2369
  if (output.statusCode >= 300) {
4907
- return de_StartProjectVersionCommandError(output, context);
2370
+ return de_CommandError(output, context);
4908
2371
  }
4909
2372
  const data = await parseBody(output.body, context);
4910
2373
  let contents = {};
@@ -4915,211 +2378,48 @@ var de_StartProjectVersionCommand = /* @__PURE__ */ __name(async (output, contex
4915
2378
  };
4916
2379
  return response;
4917
2380
  }, "de_StartProjectVersionCommand");
4918
- var de_StartProjectVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4919
- const parsedOutput = {
4920
- ...output,
4921
- body: await parseErrorBody(output.body, context)
4922
- };
4923
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4924
- switch (errorCode) {
4925
- case "AccessDeniedException":
4926
- case "com.amazonaws.rekognition#AccessDeniedException":
4927
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4928
- case "InternalServerError":
4929
- case "com.amazonaws.rekognition#InternalServerError":
4930
- throw await de_InternalServerErrorRes(parsedOutput, context);
4931
- case "InvalidParameterException":
4932
- case "com.amazonaws.rekognition#InvalidParameterException":
4933
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4934
- case "LimitExceededException":
4935
- case "com.amazonaws.rekognition#LimitExceededException":
4936
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4937
- case "ProvisionedThroughputExceededException":
4938
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4939
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4940
- case "ResourceInUseException":
4941
- case "com.amazonaws.rekognition#ResourceInUseException":
4942
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
4943
- case "ResourceNotFoundException":
4944
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4945
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4946
- case "ThrottlingException":
4947
- case "com.amazonaws.rekognition#ThrottlingException":
4948
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4949
- default:
4950
- const parsedBody = parsedOutput.body;
4951
- return throwDefaultError({
4952
- output,
4953
- parsedBody,
4954
- errorCode
4955
- });
4956
- }
4957
- }, "de_StartProjectVersionCommandError");
4958
2381
  var de_StartSegmentDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
4959
2382
  if (output.statusCode >= 300) {
4960
- return de_StartSegmentDetectionCommandError(output, context);
4961
- }
4962
- const data = await parseBody(output.body, context);
4963
- let contents = {};
4964
- contents = (0, import_smithy_client._json)(data);
4965
- const response = {
4966
- $metadata: deserializeMetadata(output),
4967
- ...contents
4968
- };
4969
- return response;
4970
- }, "de_StartSegmentDetectionCommand");
4971
- var de_StartSegmentDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
4972
- const parsedOutput = {
4973
- ...output,
4974
- body: await parseErrorBody(output.body, context)
4975
- };
4976
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4977
- switch (errorCode) {
4978
- case "AccessDeniedException":
4979
- case "com.amazonaws.rekognition#AccessDeniedException":
4980
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4981
- case "IdempotentParameterMismatchException":
4982
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4983
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4984
- case "InternalServerError":
4985
- case "com.amazonaws.rekognition#InternalServerError":
4986
- throw await de_InternalServerErrorRes(parsedOutput, context);
4987
- case "InvalidParameterException":
4988
- case "com.amazonaws.rekognition#InvalidParameterException":
4989
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4990
- case "InvalidS3ObjectException":
4991
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4992
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4993
- case "LimitExceededException":
4994
- case "com.amazonaws.rekognition#LimitExceededException":
4995
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4996
- case "ProvisionedThroughputExceededException":
4997
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4998
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4999
- case "ThrottlingException":
5000
- case "com.amazonaws.rekognition#ThrottlingException":
5001
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5002
- case "VideoTooLargeException":
5003
- case "com.amazonaws.rekognition#VideoTooLargeException":
5004
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
5005
- default:
5006
- const parsedBody = parsedOutput.body;
5007
- return throwDefaultError({
5008
- output,
5009
- parsedBody,
5010
- errorCode
5011
- });
5012
- }
5013
- }, "de_StartSegmentDetectionCommandError");
5014
- var de_StartStreamProcessorCommand = /* @__PURE__ */ __name(async (output, context) => {
5015
- if (output.statusCode >= 300) {
5016
- return de_StartStreamProcessorCommandError(output, context);
2383
+ return de_CommandError(output, context);
5017
2384
  }
5018
2385
  const data = await parseBody(output.body, context);
5019
2386
  let contents = {};
5020
2387
  contents = (0, import_smithy_client._json)(data);
5021
2388
  const response = {
5022
2389
  $metadata: deserializeMetadata(output),
5023
- ...contents
5024
- };
5025
- return response;
5026
- }, "de_StartStreamProcessorCommand");
5027
- var de_StartStreamProcessorCommandError = /* @__PURE__ */ __name(async (output, context) => {
5028
- const parsedOutput = {
5029
- ...output,
5030
- body: await parseErrorBody(output.body, context)
5031
- };
5032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5033
- switch (errorCode) {
5034
- case "AccessDeniedException":
5035
- case "com.amazonaws.rekognition#AccessDeniedException":
5036
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5037
- case "InternalServerError":
5038
- case "com.amazonaws.rekognition#InternalServerError":
5039
- throw await de_InternalServerErrorRes(parsedOutput, context);
5040
- case "InvalidParameterException":
5041
- case "com.amazonaws.rekognition#InvalidParameterException":
5042
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5043
- case "ProvisionedThroughputExceededException":
5044
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5045
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5046
- case "ResourceInUseException":
5047
- case "com.amazonaws.rekognition#ResourceInUseException":
5048
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
5049
- case "ResourceNotFoundException":
5050
- case "com.amazonaws.rekognition#ResourceNotFoundException":
5051
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5052
- case "ThrottlingException":
5053
- case "com.amazonaws.rekognition#ThrottlingException":
5054
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5055
- default:
5056
- const parsedBody = parsedOutput.body;
5057
- return throwDefaultError({
5058
- output,
5059
- parsedBody,
5060
- errorCode
5061
- });
5062
- }
5063
- }, "de_StartStreamProcessorCommandError");
5064
- var de_StartTextDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
5065
- if (output.statusCode >= 300) {
5066
- return de_StartTextDetectionCommandError(output, context);
5067
- }
5068
- const data = await parseBody(output.body, context);
5069
- let contents = {};
5070
- contents = (0, import_smithy_client._json)(data);
5071
- const response = {
5072
- $metadata: deserializeMetadata(output),
5073
- ...contents
5074
- };
5075
- return response;
5076
- }, "de_StartTextDetectionCommand");
5077
- var de_StartTextDetectionCommandError = /* @__PURE__ */ __name(async (output, context) => {
5078
- const parsedOutput = {
5079
- ...output,
5080
- body: await parseErrorBody(output.body, context)
5081
- };
5082
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5083
- switch (errorCode) {
5084
- case "AccessDeniedException":
5085
- case "com.amazonaws.rekognition#AccessDeniedException":
5086
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5087
- case "IdempotentParameterMismatchException":
5088
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
5089
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
5090
- case "InternalServerError":
5091
- case "com.amazonaws.rekognition#InternalServerError":
5092
- throw await de_InternalServerErrorRes(parsedOutput, context);
5093
- case "InvalidParameterException":
5094
- case "com.amazonaws.rekognition#InvalidParameterException":
5095
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5096
- case "InvalidS3ObjectException":
5097
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
5098
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
5099
- case "LimitExceededException":
5100
- case "com.amazonaws.rekognition#LimitExceededException":
5101
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5102
- case "ProvisionedThroughputExceededException":
5103
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5104
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5105
- case "ThrottlingException":
5106
- case "com.amazonaws.rekognition#ThrottlingException":
5107
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5108
- case "VideoTooLargeException":
5109
- case "com.amazonaws.rekognition#VideoTooLargeException":
5110
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
5111
- default:
5112
- const parsedBody = parsedOutput.body;
5113
- return throwDefaultError({
5114
- output,
5115
- parsedBody,
5116
- errorCode
5117
- });
2390
+ ...contents
2391
+ };
2392
+ return response;
2393
+ }, "de_StartSegmentDetectionCommand");
2394
+ var de_StartStreamProcessorCommand = /* @__PURE__ */ __name(async (output, context) => {
2395
+ if (output.statusCode >= 300) {
2396
+ return de_CommandError(output, context);
2397
+ }
2398
+ const data = await parseBody(output.body, context);
2399
+ let contents = {};
2400
+ contents = (0, import_smithy_client._json)(data);
2401
+ const response = {
2402
+ $metadata: deserializeMetadata(output),
2403
+ ...contents
2404
+ };
2405
+ return response;
2406
+ }, "de_StartStreamProcessorCommand");
2407
+ var de_StartTextDetectionCommand = /* @__PURE__ */ __name(async (output, context) => {
2408
+ if (output.statusCode >= 300) {
2409
+ return de_CommandError(output, context);
5118
2410
  }
5119
- }, "de_StartTextDetectionCommandError");
2411
+ const data = await parseBody(output.body, context);
2412
+ let contents = {};
2413
+ contents = (0, import_smithy_client._json)(data);
2414
+ const response = {
2415
+ $metadata: deserializeMetadata(output),
2416
+ ...contents
2417
+ };
2418
+ return response;
2419
+ }, "de_StartTextDetectionCommand");
5120
2420
  var de_StopProjectVersionCommand = /* @__PURE__ */ __name(async (output, context) => {
5121
2421
  if (output.statusCode >= 300) {
5122
- return de_StopProjectVersionCommandError(output, context);
2422
+ return de_CommandError(output, context);
5123
2423
  }
5124
2424
  const data = await parseBody(output.body, context);
5125
2425
  let contents = {};
@@ -5130,46 +2430,9 @@ var de_StopProjectVersionCommand = /* @__PURE__ */ __name(async (output, context
5130
2430
  };
5131
2431
  return response;
5132
2432
  }, "de_StopProjectVersionCommand");
5133
- var de_StopProjectVersionCommandError = /* @__PURE__ */ __name(async (output, context) => {
5134
- const parsedOutput = {
5135
- ...output,
5136
- body: await parseErrorBody(output.body, context)
5137
- };
5138
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5139
- switch (errorCode) {
5140
- case "AccessDeniedException":
5141
- case "com.amazonaws.rekognition#AccessDeniedException":
5142
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5143
- case "InternalServerError":
5144
- case "com.amazonaws.rekognition#InternalServerError":
5145
- throw await de_InternalServerErrorRes(parsedOutput, context);
5146
- case "InvalidParameterException":
5147
- case "com.amazonaws.rekognition#InvalidParameterException":
5148
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5149
- case "ProvisionedThroughputExceededException":
5150
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5151
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5152
- case "ResourceInUseException":
5153
- case "com.amazonaws.rekognition#ResourceInUseException":
5154
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
5155
- case "ResourceNotFoundException":
5156
- case "com.amazonaws.rekognition#ResourceNotFoundException":
5157
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5158
- case "ThrottlingException":
5159
- case "com.amazonaws.rekognition#ThrottlingException":
5160
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5161
- default:
5162
- const parsedBody = parsedOutput.body;
5163
- return throwDefaultError({
5164
- output,
5165
- parsedBody,
5166
- errorCode
5167
- });
5168
- }
5169
- }, "de_StopProjectVersionCommandError");
5170
2433
  var de_StopStreamProcessorCommand = /* @__PURE__ */ __name(async (output, context) => {
5171
2434
  if (output.statusCode >= 300) {
5172
- return de_StopStreamProcessorCommandError(output, context);
2435
+ return de_CommandError(output, context);
5173
2436
  }
5174
2437
  const data = await parseBody(output.body, context);
5175
2438
  let contents = {};
@@ -5180,46 +2443,9 @@ var de_StopStreamProcessorCommand = /* @__PURE__ */ __name(async (output, contex
5180
2443
  };
5181
2444
  return response;
5182
2445
  }, "de_StopStreamProcessorCommand");
5183
- var de_StopStreamProcessorCommandError = /* @__PURE__ */ __name(async (output, context) => {
5184
- const parsedOutput = {
5185
- ...output,
5186
- body: await parseErrorBody(output.body, context)
5187
- };
5188
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5189
- switch (errorCode) {
5190
- case "AccessDeniedException":
5191
- case "com.amazonaws.rekognition#AccessDeniedException":
5192
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5193
- case "InternalServerError":
5194
- case "com.amazonaws.rekognition#InternalServerError":
5195
- throw await de_InternalServerErrorRes(parsedOutput, context);
5196
- case "InvalidParameterException":
5197
- case "com.amazonaws.rekognition#InvalidParameterException":
5198
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5199
- case "ProvisionedThroughputExceededException":
5200
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5201
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5202
- case "ResourceInUseException":
5203
- case "com.amazonaws.rekognition#ResourceInUseException":
5204
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
5205
- case "ResourceNotFoundException":
5206
- case "com.amazonaws.rekognition#ResourceNotFoundException":
5207
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5208
- case "ThrottlingException":
5209
- case "com.amazonaws.rekognition#ThrottlingException":
5210
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5211
- default:
5212
- const parsedBody = parsedOutput.body;
5213
- return throwDefaultError({
5214
- output,
5215
- parsedBody,
5216
- errorCode
5217
- });
5218
- }
5219
- }, "de_StopStreamProcessorCommandError");
5220
2446
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
5221
2447
  if (output.statusCode >= 300) {
5222
- return de_TagResourceCommandError(output, context);
2448
+ return de_CommandError(output, context);
5223
2449
  }
5224
2450
  const data = await parseBody(output.body, context);
5225
2451
  let contents = {};
@@ -5230,46 +2456,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
5230
2456
  };
5231
2457
  return response;
5232
2458
  }, "de_TagResourceCommand");
5233
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
5234
- const parsedOutput = {
5235
- ...output,
5236
- body: await parseErrorBody(output.body, context)
5237
- };
5238
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5239
- switch (errorCode) {
5240
- case "AccessDeniedException":
5241
- case "com.amazonaws.rekognition#AccessDeniedException":
5242
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5243
- case "InternalServerError":
5244
- case "com.amazonaws.rekognition#InternalServerError":
5245
- throw await de_InternalServerErrorRes(parsedOutput, context);
5246
- case "InvalidParameterException":
5247
- case "com.amazonaws.rekognition#InvalidParameterException":
5248
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5249
- case "ProvisionedThroughputExceededException":
5250
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5251
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5252
- case "ResourceNotFoundException":
5253
- case "com.amazonaws.rekognition#ResourceNotFoundException":
5254
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5255
- case "ServiceQuotaExceededException":
5256
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
5257
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5258
- case "ThrottlingException":
5259
- case "com.amazonaws.rekognition#ThrottlingException":
5260
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5261
- default:
5262
- const parsedBody = parsedOutput.body;
5263
- return throwDefaultError({
5264
- output,
5265
- parsedBody,
5266
- errorCode
5267
- });
5268
- }
5269
- }, "de_TagResourceCommandError");
5270
2459
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
5271
2460
  if (output.statusCode >= 300) {
5272
- return de_UntagResourceCommandError(output, context);
2461
+ return de_CommandError(output, context);
5273
2462
  }
5274
2463
  const data = await parseBody(output.body, context);
5275
2464
  let contents = {};
@@ -5280,43 +2469,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
5280
2469
  };
5281
2470
  return response;
5282
2471
  }, "de_UntagResourceCommand");
5283
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
5284
- const parsedOutput = {
5285
- ...output,
5286
- body: await parseErrorBody(output.body, context)
5287
- };
5288
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5289
- switch (errorCode) {
5290
- case "AccessDeniedException":
5291
- case "com.amazonaws.rekognition#AccessDeniedException":
5292
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5293
- case "InternalServerError":
5294
- case "com.amazonaws.rekognition#InternalServerError":
5295
- throw await de_InternalServerErrorRes(parsedOutput, context);
5296
- case "InvalidParameterException":
5297
- case "com.amazonaws.rekognition#InvalidParameterException":
5298
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5299
- case "ProvisionedThroughputExceededException":
5300
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5301
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5302
- case "ResourceNotFoundException":
5303
- case "com.amazonaws.rekognition#ResourceNotFoundException":
5304
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5305
- case "ThrottlingException":
5306
- case "com.amazonaws.rekognition#ThrottlingException":
5307
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5308
- default:
5309
- const parsedBody = parsedOutput.body;
5310
- return throwDefaultError({
5311
- output,
5312
- parsedBody,
5313
- errorCode
5314
- });
5315
- }
5316
- }, "de_UntagResourceCommandError");
5317
2472
  var de_UpdateDatasetEntriesCommand = /* @__PURE__ */ __name(async (output, context) => {
5318
2473
  if (output.statusCode >= 300) {
5319
- return de_UpdateDatasetEntriesCommandError(output, context);
2474
+ return de_CommandError(output, context);
5320
2475
  }
5321
2476
  const data = await parseBody(output.body, context);
5322
2477
  let contents = {};
@@ -5327,49 +2482,9 @@ var de_UpdateDatasetEntriesCommand = /* @__PURE__ */ __name(async (output, conte
5327
2482
  };
5328
2483
  return response;
5329
2484
  }, "de_UpdateDatasetEntriesCommand");
5330
- var de_UpdateDatasetEntriesCommandError = /* @__PURE__ */ __name(async (output, context) => {
5331
- const parsedOutput = {
5332
- ...output,
5333
- body: await parseErrorBody(output.body, context)
5334
- };
5335
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5336
- switch (errorCode) {
5337
- case "AccessDeniedException":
5338
- case "com.amazonaws.rekognition#AccessDeniedException":
5339
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
5340
- case "InternalServerError":
5341
- case "com.amazonaws.rekognition#InternalServerError":
5342
- throw await de_InternalServerErrorRes(parsedOutput, context);
5343
- case "InvalidParameterException":
5344
- case "com.amazonaws.rekognition#InvalidParameterException":
5345
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
5346
- case "LimitExceededException":
5347
- case "com.amazonaws.rekognition#LimitExceededException":
5348
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
5349
- case "ProvisionedThroughputExceededException":
5350
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5351
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5352
- case "ResourceInUseException":
5353
- case "com.amazonaws.rekognition#ResourceInUseException":
5354
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
5355
- case "ResourceNotFoundException":
5356
- case "com.amazonaws.rekognition#ResourceNotFoundException":
5357
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
5358
- case "ThrottlingException":
5359
- case "com.amazonaws.rekognition#ThrottlingException":
5360
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
5361
- default:
5362
- const parsedBody = parsedOutput.body;
5363
- return throwDefaultError({
5364
- output,
5365
- parsedBody,
5366
- errorCode
5367
- });
5368
- }
5369
- }, "de_UpdateDatasetEntriesCommandError");
5370
2485
  var de_UpdateStreamProcessorCommand = /* @__PURE__ */ __name(async (output, context) => {
5371
2486
  if (output.statusCode >= 300) {
5372
- return de_UpdateStreamProcessorCommandError(output, context);
2487
+ return de_CommandError(output, context);
5373
2488
  }
5374
2489
  const data = await parseBody(output.body, context);
5375
2490
  let contents = {};
@@ -5380,7 +2495,7 @@ var de_UpdateStreamProcessorCommand = /* @__PURE__ */ __name(async (output, cont
5380
2495
  };
5381
2496
  return response;
5382
2497
  }, "de_UpdateStreamProcessorCommand");
5383
- var de_UpdateStreamProcessorCommandError = /* @__PURE__ */ __name(async (output, context) => {
2498
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
5384
2499
  const parsedOutput = {
5385
2500
  ...output,
5386
2501
  body: await parseErrorBody(output.body, context)
@@ -5390,6 +2505,12 @@ var de_UpdateStreamProcessorCommandError = /* @__PURE__ */ __name(async (output,
5390
2505
  case "AccessDeniedException":
5391
2506
  case "com.amazonaws.rekognition#AccessDeniedException":
5392
2507
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2508
+ case "ConflictException":
2509
+ case "com.amazonaws.rekognition#ConflictException":
2510
+ throw await de_ConflictExceptionRes(parsedOutput, context);
2511
+ case "IdempotentParameterMismatchException":
2512
+ case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
2513
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
5393
2514
  case "InternalServerError":
5394
2515
  case "com.amazonaws.rekognition#InternalServerError":
5395
2516
  throw await de_InternalServerErrorRes(parsedOutput, context);
@@ -5399,15 +2520,57 @@ var de_UpdateStreamProcessorCommandError = /* @__PURE__ */ __name(async (output,
5399
2520
  case "ProvisionedThroughputExceededException":
5400
2521
  case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
5401
2522
  throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
5402
- case "ResourceInUseException":
5403
- case "com.amazonaws.rekognition#ResourceInUseException":
5404
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
5405
2523
  case "ResourceNotFoundException":
5406
2524
  case "com.amazonaws.rekognition#ResourceNotFoundException":
5407
2525
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2526
+ case "ServiceQuotaExceededException":
2527
+ case "com.amazonaws.rekognition#ServiceQuotaExceededException":
2528
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
5408
2529
  case "ThrottlingException":
5409
2530
  case "com.amazonaws.rekognition#ThrottlingException":
5410
2531
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
2532
+ case "ImageTooLargeException":
2533
+ case "com.amazonaws.rekognition#ImageTooLargeException":
2534
+ throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
2535
+ case "InvalidImageFormatException":
2536
+ case "com.amazonaws.rekognition#InvalidImageFormatException":
2537
+ throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
2538
+ case "InvalidS3ObjectException":
2539
+ case "com.amazonaws.rekognition#InvalidS3ObjectException":
2540
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
2541
+ case "LimitExceededException":
2542
+ case "com.amazonaws.rekognition#LimitExceededException":
2543
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
2544
+ case "ResourceInUseException":
2545
+ case "com.amazonaws.rekognition#ResourceInUseException":
2546
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2547
+ case "ResourceAlreadyExistsException":
2548
+ case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
2549
+ throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
2550
+ case "InvalidPolicyRevisionIdException":
2551
+ case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException":
2552
+ throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
2553
+ case "InvalidPaginationTokenException":
2554
+ case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2555
+ throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2556
+ case "ResourceNotReadyException":
2557
+ case "com.amazonaws.rekognition#ResourceNotReadyException":
2558
+ throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
2559
+ case "HumanLoopQuotaExceededException":
2560
+ case "com.amazonaws.rekognition#HumanLoopQuotaExceededException":
2561
+ throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
2562
+ case "SessionNotFoundException":
2563
+ case "com.amazonaws.rekognition#SessionNotFoundException":
2564
+ throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
2565
+ case "MalformedPolicyDocumentException":
2566
+ case "com.amazonaws.rekognition#MalformedPolicyDocumentException":
2567
+ throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
2568
+ case "VideoTooLargeException":
2569
+ case "com.amazonaws.rekognition#VideoTooLargeException":
2570
+ throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
2571
+ case "InvalidManifestException":
2572
+ case "com.amazonaws.rekognition#InvalidManifestException":
2573
+ throw await de_InvalidManifestExceptionRes(parsedOutput, context);
5411
2574
  default:
5412
2575
  const parsedBody = parsedOutput.body;
5413
2576
  return throwDefaultError({
@@ -5416,7 +2579,7 @@ var de_UpdateStreamProcessorCommandError = /* @__PURE__ */ __name(async (output,
5416
2579
  errorCode
5417
2580
  });
5418
2581
  }
5419
- }, "de_UpdateStreamProcessorCommandError");
2582
+ }, "de_CommandError");
5420
2583
  var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
5421
2584
  const body = parsedOutput.body;
5422
2585
  const deserialized = (0, import_smithy_client._json)(body);