@aws-sdk/client-workdocs 3.50.0 → 3.53.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/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/WorkDocsServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +357 -3
- package/dist-cjs/protocols/Aws_restJson1.js +597 -2109
- package/dist-es/index.js +1 -0
- package/dist-es/models/WorkDocsServiceException.js +12 -0
- package/dist-es/models/models_0.js +330 -1
- package/dist-es/protocols/Aws_restJson1.js +1127 -2299
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/WorkDocsServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +177 -76
- package/dist-types/ts3.4/WorkDocs.d.ts +210 -0
- package/dist-types/ts3.4/WorkDocsClient.d.ts +114 -0
- package/dist-types/ts3.4/commands/AbortDocumentVersionUploadCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ActivateUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/AddResourcePermissionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateCommentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateCustomMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateFolderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateLabelsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateNotificationSubscriptionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeactivateUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteCommentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteCustomMetadataCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteDocumentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteFolderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteFolderContentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteLabelsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteNotificationSubscriptionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeActivitiesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeCommentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeDocumentVersionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeFolderContentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeGroupsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeNotificationSubscriptionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeResourcePermissionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeRootFoldersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeUsersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetCurrentUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentPathCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentVersionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetFolderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetFolderPathCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetResourcesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/InitiateDocumentVersionUploadCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RemoveAllResourcePermissionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RemoveResourcePermissionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateDocumentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateDocumentVersionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateFolderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateUserCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +41 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/WorkDocsServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1622 -0
- package/dist-types/ts3.4/pagination/DescribeDocumentVersionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/DescribeFolderContentsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/DescribeUsersPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +125 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
|
@@ -4,6 +4,8 @@ exports.deserializeAws_restJson1CreateUserCommand = exports.deserializeAws_restJ
|
|
|
4
4
|
exports.deserializeAws_restJson1UpdateUserCommand = exports.deserializeAws_restJson1UpdateFolderCommand = exports.deserializeAws_restJson1UpdateDocumentVersionCommand = exports.deserializeAws_restJson1UpdateDocumentCommand = exports.deserializeAws_restJson1RemoveResourcePermissionCommand = exports.deserializeAws_restJson1RemoveAllResourcePermissionsCommand = exports.deserializeAws_restJson1InitiateDocumentVersionUploadCommand = exports.deserializeAws_restJson1GetResourcesCommand = exports.deserializeAws_restJson1GetFolderPathCommand = exports.deserializeAws_restJson1GetFolderCommand = exports.deserializeAws_restJson1GetDocumentVersionCommand = exports.deserializeAws_restJson1GetDocumentPathCommand = exports.deserializeAws_restJson1GetDocumentCommand = exports.deserializeAws_restJson1GetCurrentUserCommand = exports.deserializeAws_restJson1DescribeUsersCommand = exports.deserializeAws_restJson1DescribeRootFoldersCommand = exports.deserializeAws_restJson1DescribeResourcePermissionsCommand = exports.deserializeAws_restJson1DescribeNotificationSubscriptionsCommand = exports.deserializeAws_restJson1DescribeGroupsCommand = exports.deserializeAws_restJson1DescribeFolderContentsCommand = exports.deserializeAws_restJson1DescribeDocumentVersionsCommand = exports.deserializeAws_restJson1DescribeCommentsCommand = exports.deserializeAws_restJson1DescribeActivitiesCommand = exports.deserializeAws_restJson1DeleteUserCommand = exports.deserializeAws_restJson1DeleteNotificationSubscriptionCommand = exports.deserializeAws_restJson1DeleteLabelsCommand = exports.deserializeAws_restJson1DeleteFolderContentsCommand = exports.deserializeAws_restJson1DeleteFolderCommand = exports.deserializeAws_restJson1DeleteDocumentCommand = exports.deserializeAws_restJson1DeleteCustomMetadataCommand = exports.deserializeAws_restJson1DeleteCommentCommand = exports.deserializeAws_restJson1DeactivateUserCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const WorkDocsServiceException_1 = require("../models/WorkDocsServiceException");
|
|
7
9
|
const serializeAws_restJson1AbortDocumentVersionUploadCommand = async (input, context) => {
|
|
8
10
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
9
11
|
const headers = {
|
|
@@ -1409,67 +1411,31 @@ const deserializeAws_restJson1AbortDocumentVersionUploadCommandError = async (ou
|
|
|
1409
1411
|
switch (errorCode) {
|
|
1410
1412
|
case "EntityNotExistsException":
|
|
1411
1413
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
1412
|
-
|
|
1413
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
1414
|
-
name: errorCode,
|
|
1415
|
-
$metadata: deserializeMetadata(output),
|
|
1416
|
-
};
|
|
1417
|
-
break;
|
|
1414
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
1418
1415
|
case "FailedDependencyException":
|
|
1419
1416
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
1420
|
-
|
|
1421
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
1422
|
-
name: errorCode,
|
|
1423
|
-
$metadata: deserializeMetadata(output),
|
|
1424
|
-
};
|
|
1425
|
-
break;
|
|
1417
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
1426
1418
|
case "ProhibitedStateException":
|
|
1427
1419
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
1428
|
-
|
|
1429
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
1430
|
-
name: errorCode,
|
|
1431
|
-
$metadata: deserializeMetadata(output),
|
|
1432
|
-
};
|
|
1433
|
-
break;
|
|
1420
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
1434
1421
|
case "ServiceUnavailableException":
|
|
1435
1422
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
1436
|
-
|
|
1437
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1438
|
-
name: errorCode,
|
|
1439
|
-
$metadata: deserializeMetadata(output),
|
|
1440
|
-
};
|
|
1441
|
-
break;
|
|
1423
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1442
1424
|
case "UnauthorizedOperationException":
|
|
1443
1425
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
1444
|
-
|
|
1445
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
1446
|
-
name: errorCode,
|
|
1447
|
-
$metadata: deserializeMetadata(output),
|
|
1448
|
-
};
|
|
1449
|
-
break;
|
|
1426
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
1450
1427
|
case "UnauthorizedResourceAccessException":
|
|
1451
1428
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
1452
|
-
|
|
1453
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
1454
|
-
name: errorCode,
|
|
1455
|
-
$metadata: deserializeMetadata(output),
|
|
1456
|
-
};
|
|
1457
|
-
break;
|
|
1429
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
1458
1430
|
default:
|
|
1459
1431
|
const parsedBody = parsedOutput.body;
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
...parsedBody,
|
|
1463
|
-
name: `${errorCode}`,
|
|
1464
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1432
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1433
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1465
1434
|
$fault: "client",
|
|
1466
1435
|
$metadata: deserializeMetadata(output),
|
|
1467
|
-
};
|
|
1436
|
+
});
|
|
1437
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1468
1438
|
}
|
|
1469
|
-
const message = response.message || response.Message || errorCode;
|
|
1470
|
-
response.message = message;
|
|
1471
|
-
delete response.Message;
|
|
1472
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1473
1439
|
};
|
|
1474
1440
|
const deserializeAws_restJson1ActivateUserCommand = async (output, context) => {
|
|
1475
1441
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1497,59 +1463,28 @@ const deserializeAws_restJson1ActivateUserCommandError = async (output, context)
|
|
|
1497
1463
|
switch (errorCode) {
|
|
1498
1464
|
case "EntityNotExistsException":
|
|
1499
1465
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
1500
|
-
|
|
1501
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
1502
|
-
name: errorCode,
|
|
1503
|
-
$metadata: deserializeMetadata(output),
|
|
1504
|
-
};
|
|
1505
|
-
break;
|
|
1466
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
1506
1467
|
case "FailedDependencyException":
|
|
1507
1468
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
1508
|
-
|
|
1509
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
1510
|
-
name: errorCode,
|
|
1511
|
-
$metadata: deserializeMetadata(output),
|
|
1512
|
-
};
|
|
1513
|
-
break;
|
|
1469
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
1514
1470
|
case "ServiceUnavailableException":
|
|
1515
1471
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
1516
|
-
|
|
1517
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1518
|
-
name: errorCode,
|
|
1519
|
-
$metadata: deserializeMetadata(output),
|
|
1520
|
-
};
|
|
1521
|
-
break;
|
|
1472
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1522
1473
|
case "UnauthorizedOperationException":
|
|
1523
1474
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
1524
|
-
|
|
1525
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
1526
|
-
name: errorCode,
|
|
1527
|
-
$metadata: deserializeMetadata(output),
|
|
1528
|
-
};
|
|
1529
|
-
break;
|
|
1475
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
1530
1476
|
case "UnauthorizedResourceAccessException":
|
|
1531
1477
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
1532
|
-
|
|
1533
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
1534
|
-
name: errorCode,
|
|
1535
|
-
$metadata: deserializeMetadata(output),
|
|
1536
|
-
};
|
|
1537
|
-
break;
|
|
1478
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
1538
1479
|
default:
|
|
1539
1480
|
const parsedBody = parsedOutput.body;
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
...parsedBody,
|
|
1543
|
-
name: `${errorCode}`,
|
|
1544
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1481
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1482
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1545
1483
|
$fault: "client",
|
|
1546
1484
|
$metadata: deserializeMetadata(output),
|
|
1547
|
-
};
|
|
1485
|
+
});
|
|
1486
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1548
1487
|
}
|
|
1549
|
-
const message = response.message || response.Message || errorCode;
|
|
1550
|
-
response.message = message;
|
|
1551
|
-
delete response.Message;
|
|
1552
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1553
1488
|
};
|
|
1554
1489
|
const deserializeAws_restJson1AddResourcePermissionsCommand = async (output, context) => {
|
|
1555
1490
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
@@ -1577,51 +1512,25 @@ const deserializeAws_restJson1AddResourcePermissionsCommandError = async (output
|
|
|
1577
1512
|
switch (errorCode) {
|
|
1578
1513
|
case "FailedDependencyException":
|
|
1579
1514
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
1580
|
-
|
|
1581
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
1582
|
-
name: errorCode,
|
|
1583
|
-
$metadata: deserializeMetadata(output),
|
|
1584
|
-
};
|
|
1585
|
-
break;
|
|
1515
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
1586
1516
|
case "ServiceUnavailableException":
|
|
1587
1517
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
1588
|
-
|
|
1589
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1590
|
-
name: errorCode,
|
|
1591
|
-
$metadata: deserializeMetadata(output),
|
|
1592
|
-
};
|
|
1593
|
-
break;
|
|
1518
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1594
1519
|
case "UnauthorizedOperationException":
|
|
1595
1520
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
1596
|
-
|
|
1597
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
1598
|
-
name: errorCode,
|
|
1599
|
-
$metadata: deserializeMetadata(output),
|
|
1600
|
-
};
|
|
1601
|
-
break;
|
|
1521
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
1602
1522
|
case "UnauthorizedResourceAccessException":
|
|
1603
1523
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
1604
|
-
|
|
1605
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
1606
|
-
name: errorCode,
|
|
1607
|
-
$metadata: deserializeMetadata(output),
|
|
1608
|
-
};
|
|
1609
|
-
break;
|
|
1524
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
1610
1525
|
default:
|
|
1611
1526
|
const parsedBody = parsedOutput.body;
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
...parsedBody,
|
|
1615
|
-
name: `${errorCode}`,
|
|
1616
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1527
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1528
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1617
1529
|
$fault: "client",
|
|
1618
1530
|
$metadata: deserializeMetadata(output),
|
|
1619
|
-
};
|
|
1531
|
+
});
|
|
1532
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1620
1533
|
}
|
|
1621
|
-
const message = response.message || response.Message || errorCode;
|
|
1622
|
-
response.message = message;
|
|
1623
|
-
delete response.Message;
|
|
1624
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1625
1534
|
};
|
|
1626
1535
|
const deserializeAws_restJson1CreateCommentCommand = async (output, context) => {
|
|
1627
1536
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
@@ -1649,83 +1558,37 @@ const deserializeAws_restJson1CreateCommentCommandError = async (output, context
|
|
|
1649
1558
|
switch (errorCode) {
|
|
1650
1559
|
case "DocumentLockedForCommentsException":
|
|
1651
1560
|
case "com.amazonaws.workdocs#DocumentLockedForCommentsException":
|
|
1652
|
-
|
|
1653
|
-
...(await deserializeAws_restJson1DocumentLockedForCommentsExceptionResponse(parsedOutput, context)),
|
|
1654
|
-
name: errorCode,
|
|
1655
|
-
$metadata: deserializeMetadata(output),
|
|
1656
|
-
};
|
|
1657
|
-
break;
|
|
1561
|
+
throw await deserializeAws_restJson1DocumentLockedForCommentsExceptionResponse(parsedOutput, context);
|
|
1658
1562
|
case "EntityNotExistsException":
|
|
1659
1563
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
1660
|
-
|
|
1661
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
1662
|
-
name: errorCode,
|
|
1663
|
-
$metadata: deserializeMetadata(output),
|
|
1664
|
-
};
|
|
1665
|
-
break;
|
|
1564
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
1666
1565
|
case "FailedDependencyException":
|
|
1667
1566
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
1668
|
-
|
|
1669
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
1670
|
-
name: errorCode,
|
|
1671
|
-
$metadata: deserializeMetadata(output),
|
|
1672
|
-
};
|
|
1673
|
-
break;
|
|
1567
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
1674
1568
|
case "InvalidCommentOperationException":
|
|
1675
1569
|
case "com.amazonaws.workdocs#InvalidCommentOperationException":
|
|
1676
|
-
|
|
1677
|
-
...(await deserializeAws_restJson1InvalidCommentOperationExceptionResponse(parsedOutput, context)),
|
|
1678
|
-
name: errorCode,
|
|
1679
|
-
$metadata: deserializeMetadata(output),
|
|
1680
|
-
};
|
|
1681
|
-
break;
|
|
1570
|
+
throw await deserializeAws_restJson1InvalidCommentOperationExceptionResponse(parsedOutput, context);
|
|
1682
1571
|
case "ProhibitedStateException":
|
|
1683
1572
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
1684
|
-
|
|
1685
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
1686
|
-
name: errorCode,
|
|
1687
|
-
$metadata: deserializeMetadata(output),
|
|
1688
|
-
};
|
|
1689
|
-
break;
|
|
1573
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
1690
1574
|
case "ServiceUnavailableException":
|
|
1691
1575
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
1692
|
-
|
|
1693
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1694
|
-
name: errorCode,
|
|
1695
|
-
$metadata: deserializeMetadata(output),
|
|
1696
|
-
};
|
|
1697
|
-
break;
|
|
1576
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1698
1577
|
case "UnauthorizedOperationException":
|
|
1699
1578
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
1700
|
-
|
|
1701
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
1702
|
-
name: errorCode,
|
|
1703
|
-
$metadata: deserializeMetadata(output),
|
|
1704
|
-
};
|
|
1705
|
-
break;
|
|
1579
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
1706
1580
|
case "UnauthorizedResourceAccessException":
|
|
1707
1581
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
1708
|
-
|
|
1709
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
1710
|
-
name: errorCode,
|
|
1711
|
-
$metadata: deserializeMetadata(output),
|
|
1712
|
-
};
|
|
1713
|
-
break;
|
|
1582
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
1714
1583
|
default:
|
|
1715
1584
|
const parsedBody = parsedOutput.body;
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
...parsedBody,
|
|
1719
|
-
name: `${errorCode}`,
|
|
1720
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1585
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1586
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1721
1587
|
$fault: "client",
|
|
1722
1588
|
$metadata: deserializeMetadata(output),
|
|
1723
|
-
};
|
|
1589
|
+
});
|
|
1590
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1724
1591
|
}
|
|
1725
|
-
const message = response.message || response.Message || errorCode;
|
|
1726
|
-
response.message = message;
|
|
1727
|
-
delete response.Message;
|
|
1728
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1729
1592
|
};
|
|
1730
1593
|
const deserializeAws_restJson1CreateCustomMetadataCommand = async (output, context) => {
|
|
1731
1594
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1749,75 +1612,34 @@ const deserializeAws_restJson1CreateCustomMetadataCommandError = async (output,
|
|
|
1749
1612
|
switch (errorCode) {
|
|
1750
1613
|
case "CustomMetadataLimitExceededException":
|
|
1751
1614
|
case "com.amazonaws.workdocs#CustomMetadataLimitExceededException":
|
|
1752
|
-
|
|
1753
|
-
...(await deserializeAws_restJson1CustomMetadataLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1754
|
-
name: errorCode,
|
|
1755
|
-
$metadata: deserializeMetadata(output),
|
|
1756
|
-
};
|
|
1757
|
-
break;
|
|
1615
|
+
throw await deserializeAws_restJson1CustomMetadataLimitExceededExceptionResponse(parsedOutput, context);
|
|
1758
1616
|
case "EntityNotExistsException":
|
|
1759
1617
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
1760
|
-
|
|
1761
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
1762
|
-
name: errorCode,
|
|
1763
|
-
$metadata: deserializeMetadata(output),
|
|
1764
|
-
};
|
|
1765
|
-
break;
|
|
1618
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
1766
1619
|
case "FailedDependencyException":
|
|
1767
1620
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
1768
|
-
|
|
1769
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
1770
|
-
name: errorCode,
|
|
1771
|
-
$metadata: deserializeMetadata(output),
|
|
1772
|
-
};
|
|
1773
|
-
break;
|
|
1621
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
1774
1622
|
case "ProhibitedStateException":
|
|
1775
1623
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
1776
|
-
|
|
1777
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
1778
|
-
name: errorCode,
|
|
1779
|
-
$metadata: deserializeMetadata(output),
|
|
1780
|
-
};
|
|
1781
|
-
break;
|
|
1624
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
1782
1625
|
case "ServiceUnavailableException":
|
|
1783
1626
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
1784
|
-
|
|
1785
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1786
|
-
name: errorCode,
|
|
1787
|
-
$metadata: deserializeMetadata(output),
|
|
1788
|
-
};
|
|
1789
|
-
break;
|
|
1627
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1790
1628
|
case "UnauthorizedOperationException":
|
|
1791
1629
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
1792
|
-
|
|
1793
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
1794
|
-
name: errorCode,
|
|
1795
|
-
$metadata: deserializeMetadata(output),
|
|
1796
|
-
};
|
|
1797
|
-
break;
|
|
1630
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
1798
1631
|
case "UnauthorizedResourceAccessException":
|
|
1799
1632
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
1800
|
-
|
|
1801
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
1802
|
-
name: errorCode,
|
|
1803
|
-
$metadata: deserializeMetadata(output),
|
|
1804
|
-
};
|
|
1805
|
-
break;
|
|
1633
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
1806
1634
|
default:
|
|
1807
1635
|
const parsedBody = parsedOutput.body;
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
...parsedBody,
|
|
1811
|
-
name: `${errorCode}`,
|
|
1812
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1636
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1637
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1813
1638
|
$fault: "client",
|
|
1814
1639
|
$metadata: deserializeMetadata(output),
|
|
1815
|
-
};
|
|
1640
|
+
});
|
|
1641
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1816
1642
|
}
|
|
1817
|
-
const message = response.message || response.Message || errorCode;
|
|
1818
|
-
response.message = message;
|
|
1819
|
-
delete response.Message;
|
|
1820
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1821
1643
|
};
|
|
1822
1644
|
const deserializeAws_restJson1CreateFolderCommand = async (output, context) => {
|
|
1823
1645
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
@@ -1845,91 +1667,40 @@ const deserializeAws_restJson1CreateFolderCommandError = async (output, context)
|
|
|
1845
1667
|
switch (errorCode) {
|
|
1846
1668
|
case "ConflictingOperationException":
|
|
1847
1669
|
case "com.amazonaws.workdocs#ConflictingOperationException":
|
|
1848
|
-
|
|
1849
|
-
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
1850
|
-
name: errorCode,
|
|
1851
|
-
$metadata: deserializeMetadata(output),
|
|
1852
|
-
};
|
|
1853
|
-
break;
|
|
1670
|
+
throw await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context);
|
|
1854
1671
|
case "EntityAlreadyExistsException":
|
|
1855
1672
|
case "com.amazonaws.workdocs#EntityAlreadyExistsException":
|
|
1856
|
-
|
|
1857
|
-
...(await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
1858
|
-
name: errorCode,
|
|
1859
|
-
$metadata: deserializeMetadata(output),
|
|
1860
|
-
};
|
|
1861
|
-
break;
|
|
1673
|
+
throw await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
1862
1674
|
case "EntityNotExistsException":
|
|
1863
1675
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
1864
|
-
|
|
1865
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
1866
|
-
name: errorCode,
|
|
1867
|
-
$metadata: deserializeMetadata(output),
|
|
1868
|
-
};
|
|
1869
|
-
break;
|
|
1676
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
1870
1677
|
case "FailedDependencyException":
|
|
1871
1678
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
1872
|
-
|
|
1873
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
1874
|
-
name: errorCode,
|
|
1875
|
-
$metadata: deserializeMetadata(output),
|
|
1876
|
-
};
|
|
1877
|
-
break;
|
|
1679
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
1878
1680
|
case "LimitExceededException":
|
|
1879
1681
|
case "com.amazonaws.workdocs#LimitExceededException":
|
|
1880
|
-
|
|
1881
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
1882
|
-
name: errorCode,
|
|
1883
|
-
$metadata: deserializeMetadata(output),
|
|
1884
|
-
};
|
|
1885
|
-
break;
|
|
1682
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1886
1683
|
case "ProhibitedStateException":
|
|
1887
1684
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
1888
|
-
|
|
1889
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
1890
|
-
name: errorCode,
|
|
1891
|
-
$metadata: deserializeMetadata(output),
|
|
1892
|
-
};
|
|
1893
|
-
break;
|
|
1685
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
1894
1686
|
case "ServiceUnavailableException":
|
|
1895
1687
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
1896
|
-
|
|
1897
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1898
|
-
name: errorCode,
|
|
1899
|
-
$metadata: deserializeMetadata(output),
|
|
1900
|
-
};
|
|
1901
|
-
break;
|
|
1688
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1902
1689
|
case "UnauthorizedOperationException":
|
|
1903
1690
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
1904
|
-
|
|
1905
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
1906
|
-
name: errorCode,
|
|
1907
|
-
$metadata: deserializeMetadata(output),
|
|
1908
|
-
};
|
|
1909
|
-
break;
|
|
1691
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
1910
1692
|
case "UnauthorizedResourceAccessException":
|
|
1911
1693
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
1912
|
-
|
|
1913
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
1914
|
-
name: errorCode,
|
|
1915
|
-
$metadata: deserializeMetadata(output),
|
|
1916
|
-
};
|
|
1917
|
-
break;
|
|
1694
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
1918
1695
|
default:
|
|
1919
1696
|
const parsedBody = parsedOutput.body;
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
...parsedBody,
|
|
1923
|
-
name: `${errorCode}`,
|
|
1924
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1697
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1698
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1925
1699
|
$fault: "client",
|
|
1926
1700
|
$metadata: deserializeMetadata(output),
|
|
1927
|
-
};
|
|
1701
|
+
});
|
|
1702
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1928
1703
|
}
|
|
1929
|
-
const message = response.message || response.Message || errorCode;
|
|
1930
|
-
response.message = message;
|
|
1931
|
-
delete response.Message;
|
|
1932
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1933
1704
|
};
|
|
1934
1705
|
const deserializeAws_restJson1CreateLabelsCommand = async (output, context) => {
|
|
1935
1706
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1953,67 +1724,31 @@ const deserializeAws_restJson1CreateLabelsCommandError = async (output, context)
|
|
|
1953
1724
|
switch (errorCode) {
|
|
1954
1725
|
case "EntityNotExistsException":
|
|
1955
1726
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
1956
|
-
|
|
1957
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
1958
|
-
name: errorCode,
|
|
1959
|
-
$metadata: deserializeMetadata(output),
|
|
1960
|
-
};
|
|
1961
|
-
break;
|
|
1727
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
1962
1728
|
case "FailedDependencyException":
|
|
1963
1729
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
1964
|
-
|
|
1965
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
1966
|
-
name: errorCode,
|
|
1967
|
-
$metadata: deserializeMetadata(output),
|
|
1968
|
-
};
|
|
1969
|
-
break;
|
|
1730
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
1970
1731
|
case "ServiceUnavailableException":
|
|
1971
1732
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
1972
|
-
|
|
1973
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1974
|
-
name: errorCode,
|
|
1975
|
-
$metadata: deserializeMetadata(output),
|
|
1976
|
-
};
|
|
1977
|
-
break;
|
|
1733
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1978
1734
|
case "TooManyLabelsException":
|
|
1979
1735
|
case "com.amazonaws.workdocs#TooManyLabelsException":
|
|
1980
|
-
|
|
1981
|
-
...(await deserializeAws_restJson1TooManyLabelsExceptionResponse(parsedOutput, context)),
|
|
1982
|
-
name: errorCode,
|
|
1983
|
-
$metadata: deserializeMetadata(output),
|
|
1984
|
-
};
|
|
1985
|
-
break;
|
|
1736
|
+
throw await deserializeAws_restJson1TooManyLabelsExceptionResponse(parsedOutput, context);
|
|
1986
1737
|
case "UnauthorizedOperationException":
|
|
1987
1738
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
1988
|
-
|
|
1989
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
1990
|
-
name: errorCode,
|
|
1991
|
-
$metadata: deserializeMetadata(output),
|
|
1992
|
-
};
|
|
1993
|
-
break;
|
|
1739
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
1994
1740
|
case "UnauthorizedResourceAccessException":
|
|
1995
1741
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
1996
|
-
|
|
1997
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
1998
|
-
name: errorCode,
|
|
1999
|
-
$metadata: deserializeMetadata(output),
|
|
2000
|
-
};
|
|
2001
|
-
break;
|
|
1742
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2002
1743
|
default:
|
|
2003
1744
|
const parsedBody = parsedOutput.body;
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
...parsedBody,
|
|
2007
|
-
name: `${errorCode}`,
|
|
2008
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1745
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1746
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2009
1747
|
$fault: "client",
|
|
2010
1748
|
$metadata: deserializeMetadata(output),
|
|
2011
|
-
};
|
|
1749
|
+
});
|
|
1750
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2012
1751
|
}
|
|
2013
|
-
const message = response.message || response.Message || errorCode;
|
|
2014
|
-
response.message = message;
|
|
2015
|
-
delete response.Message;
|
|
2016
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2017
1752
|
};
|
|
2018
1753
|
const deserializeAws_restJson1CreateNotificationSubscriptionCommand = async (output, context) => {
|
|
2019
1754
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2041,43 +1776,22 @@ const deserializeAws_restJson1CreateNotificationSubscriptionCommandError = async
|
|
|
2041
1776
|
switch (errorCode) {
|
|
2042
1777
|
case "ServiceUnavailableException":
|
|
2043
1778
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2044
|
-
|
|
2045
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2046
|
-
name: errorCode,
|
|
2047
|
-
$metadata: deserializeMetadata(output),
|
|
2048
|
-
};
|
|
2049
|
-
break;
|
|
1779
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2050
1780
|
case "TooManySubscriptionsException":
|
|
2051
1781
|
case "com.amazonaws.workdocs#TooManySubscriptionsException":
|
|
2052
|
-
|
|
2053
|
-
...(await deserializeAws_restJson1TooManySubscriptionsExceptionResponse(parsedOutput, context)),
|
|
2054
|
-
name: errorCode,
|
|
2055
|
-
$metadata: deserializeMetadata(output),
|
|
2056
|
-
};
|
|
2057
|
-
break;
|
|
1782
|
+
throw await deserializeAws_restJson1TooManySubscriptionsExceptionResponse(parsedOutput, context);
|
|
2058
1783
|
case "UnauthorizedResourceAccessException":
|
|
2059
1784
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2060
|
-
|
|
2061
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2062
|
-
name: errorCode,
|
|
2063
|
-
$metadata: deserializeMetadata(output),
|
|
2064
|
-
};
|
|
2065
|
-
break;
|
|
1785
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2066
1786
|
default:
|
|
2067
1787
|
const parsedBody = parsedOutput.body;
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
...parsedBody,
|
|
2071
|
-
name: `${errorCode}`,
|
|
2072
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1788
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1789
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2073
1790
|
$fault: "client",
|
|
2074
1791
|
$metadata: deserializeMetadata(output),
|
|
2075
|
-
};
|
|
1792
|
+
});
|
|
1793
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2076
1794
|
}
|
|
2077
|
-
const message = response.message || response.Message || errorCode;
|
|
2078
|
-
response.message = message;
|
|
2079
|
-
delete response.Message;
|
|
2080
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2081
1795
|
};
|
|
2082
1796
|
const deserializeAws_restJson1CreateUserCommand = async (output, context) => {
|
|
2083
1797
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
@@ -2105,59 +1819,28 @@ const deserializeAws_restJson1CreateUserCommandError = async (output, context) =
|
|
|
2105
1819
|
switch (errorCode) {
|
|
2106
1820
|
case "EntityAlreadyExistsException":
|
|
2107
1821
|
case "com.amazonaws.workdocs#EntityAlreadyExistsException":
|
|
2108
|
-
|
|
2109
|
-
...(await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
2110
|
-
name: errorCode,
|
|
2111
|
-
$metadata: deserializeMetadata(output),
|
|
2112
|
-
};
|
|
2113
|
-
break;
|
|
1822
|
+
throw await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
2114
1823
|
case "FailedDependencyException":
|
|
2115
1824
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2116
|
-
|
|
2117
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2118
|
-
name: errorCode,
|
|
2119
|
-
$metadata: deserializeMetadata(output),
|
|
2120
|
-
};
|
|
2121
|
-
break;
|
|
1825
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2122
1826
|
case "ServiceUnavailableException":
|
|
2123
1827
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2124
|
-
|
|
2125
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2126
|
-
name: errorCode,
|
|
2127
|
-
$metadata: deserializeMetadata(output),
|
|
2128
|
-
};
|
|
2129
|
-
break;
|
|
1828
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2130
1829
|
case "UnauthorizedOperationException":
|
|
2131
1830
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2132
|
-
|
|
2133
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2134
|
-
name: errorCode,
|
|
2135
|
-
$metadata: deserializeMetadata(output),
|
|
2136
|
-
};
|
|
2137
|
-
break;
|
|
1831
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2138
1832
|
case "UnauthorizedResourceAccessException":
|
|
2139
1833
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2140
|
-
|
|
2141
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2142
|
-
name: errorCode,
|
|
2143
|
-
$metadata: deserializeMetadata(output),
|
|
2144
|
-
};
|
|
2145
|
-
break;
|
|
1834
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2146
1835
|
default:
|
|
2147
1836
|
const parsedBody = parsedOutput.body;
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
...parsedBody,
|
|
2151
|
-
name: `${errorCode}`,
|
|
2152
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1837
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1838
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2153
1839
|
$fault: "client",
|
|
2154
1840
|
$metadata: deserializeMetadata(output),
|
|
2155
|
-
};
|
|
1841
|
+
});
|
|
1842
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2156
1843
|
}
|
|
2157
|
-
const message = response.message || response.Message || errorCode;
|
|
2158
|
-
response.message = message;
|
|
2159
|
-
delete response.Message;
|
|
2160
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2161
1844
|
};
|
|
2162
1845
|
const deserializeAws_restJson1DeactivateUserCommand = async (output, context) => {
|
|
2163
1846
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -2181,59 +1864,28 @@ const deserializeAws_restJson1DeactivateUserCommandError = async (output, contex
|
|
|
2181
1864
|
switch (errorCode) {
|
|
2182
1865
|
case "EntityNotExistsException":
|
|
2183
1866
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2184
|
-
|
|
2185
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2186
|
-
name: errorCode,
|
|
2187
|
-
$metadata: deserializeMetadata(output),
|
|
2188
|
-
};
|
|
2189
|
-
break;
|
|
1867
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2190
1868
|
case "FailedDependencyException":
|
|
2191
1869
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2192
|
-
|
|
2193
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2194
|
-
name: errorCode,
|
|
2195
|
-
$metadata: deserializeMetadata(output),
|
|
2196
|
-
};
|
|
2197
|
-
break;
|
|
1870
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2198
1871
|
case "ServiceUnavailableException":
|
|
2199
1872
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2200
|
-
|
|
2201
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2202
|
-
name: errorCode,
|
|
2203
|
-
$metadata: deserializeMetadata(output),
|
|
2204
|
-
};
|
|
2205
|
-
break;
|
|
1873
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2206
1874
|
case "UnauthorizedOperationException":
|
|
2207
1875
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2208
|
-
|
|
2209
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2210
|
-
name: errorCode,
|
|
2211
|
-
$metadata: deserializeMetadata(output),
|
|
2212
|
-
};
|
|
2213
|
-
break;
|
|
1876
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2214
1877
|
case "UnauthorizedResourceAccessException":
|
|
2215
1878
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2216
|
-
|
|
2217
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2218
|
-
name: errorCode,
|
|
2219
|
-
$metadata: deserializeMetadata(output),
|
|
2220
|
-
};
|
|
2221
|
-
break;
|
|
1879
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2222
1880
|
default:
|
|
2223
1881
|
const parsedBody = parsedOutput.body;
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
...parsedBody,
|
|
2227
|
-
name: `${errorCode}`,
|
|
2228
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1882
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1883
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2229
1884
|
$fault: "client",
|
|
2230
1885
|
$metadata: deserializeMetadata(output),
|
|
2231
|
-
};
|
|
1886
|
+
});
|
|
1887
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2232
1888
|
}
|
|
2233
|
-
const message = response.message || response.Message || errorCode;
|
|
2234
|
-
response.message = message;
|
|
2235
|
-
delete response.Message;
|
|
2236
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2237
1889
|
};
|
|
2238
1890
|
const deserializeAws_restJson1DeleteCommentCommand = async (output, context) => {
|
|
2239
1891
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -2257,75 +1909,34 @@ const deserializeAws_restJson1DeleteCommentCommandError = async (output, context
|
|
|
2257
1909
|
switch (errorCode) {
|
|
2258
1910
|
case "DocumentLockedForCommentsException":
|
|
2259
1911
|
case "com.amazonaws.workdocs#DocumentLockedForCommentsException":
|
|
2260
|
-
|
|
2261
|
-
...(await deserializeAws_restJson1DocumentLockedForCommentsExceptionResponse(parsedOutput, context)),
|
|
2262
|
-
name: errorCode,
|
|
2263
|
-
$metadata: deserializeMetadata(output),
|
|
2264
|
-
};
|
|
2265
|
-
break;
|
|
1912
|
+
throw await deserializeAws_restJson1DocumentLockedForCommentsExceptionResponse(parsedOutput, context);
|
|
2266
1913
|
case "EntityNotExistsException":
|
|
2267
1914
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2268
|
-
|
|
2269
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2270
|
-
name: errorCode,
|
|
2271
|
-
$metadata: deserializeMetadata(output),
|
|
2272
|
-
};
|
|
2273
|
-
break;
|
|
1915
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2274
1916
|
case "FailedDependencyException":
|
|
2275
1917
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2276
|
-
|
|
2277
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2278
|
-
name: errorCode,
|
|
2279
|
-
$metadata: deserializeMetadata(output),
|
|
2280
|
-
};
|
|
2281
|
-
break;
|
|
1918
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2282
1919
|
case "ProhibitedStateException":
|
|
2283
1920
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
2284
|
-
|
|
2285
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
2286
|
-
name: errorCode,
|
|
2287
|
-
$metadata: deserializeMetadata(output),
|
|
2288
|
-
};
|
|
2289
|
-
break;
|
|
1921
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
2290
1922
|
case "ServiceUnavailableException":
|
|
2291
1923
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2292
|
-
|
|
2293
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2294
|
-
name: errorCode,
|
|
2295
|
-
$metadata: deserializeMetadata(output),
|
|
2296
|
-
};
|
|
2297
|
-
break;
|
|
1924
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2298
1925
|
case "UnauthorizedOperationException":
|
|
2299
1926
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2300
|
-
|
|
2301
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2302
|
-
name: errorCode,
|
|
2303
|
-
$metadata: deserializeMetadata(output),
|
|
2304
|
-
};
|
|
2305
|
-
break;
|
|
1927
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2306
1928
|
case "UnauthorizedResourceAccessException":
|
|
2307
1929
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2308
|
-
|
|
2309
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2310
|
-
name: errorCode,
|
|
2311
|
-
$metadata: deserializeMetadata(output),
|
|
2312
|
-
};
|
|
2313
|
-
break;
|
|
1930
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2314
1931
|
default:
|
|
2315
1932
|
const parsedBody = parsedOutput.body;
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
...parsedBody,
|
|
2319
|
-
name: `${errorCode}`,
|
|
2320
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1933
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1934
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2321
1935
|
$fault: "client",
|
|
2322
1936
|
$metadata: deserializeMetadata(output),
|
|
2323
|
-
};
|
|
1937
|
+
});
|
|
1938
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2324
1939
|
}
|
|
2325
|
-
const message = response.message || response.Message || errorCode;
|
|
2326
|
-
response.message = message;
|
|
2327
|
-
delete response.Message;
|
|
2328
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2329
1940
|
};
|
|
2330
1941
|
const deserializeAws_restJson1DeleteCustomMetadataCommand = async (output, context) => {
|
|
2331
1942
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2349,67 +1960,31 @@ const deserializeAws_restJson1DeleteCustomMetadataCommandError = async (output,
|
|
|
2349
1960
|
switch (errorCode) {
|
|
2350
1961
|
case "EntityNotExistsException":
|
|
2351
1962
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2352
|
-
|
|
2353
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2354
|
-
name: errorCode,
|
|
2355
|
-
$metadata: deserializeMetadata(output),
|
|
2356
|
-
};
|
|
2357
|
-
break;
|
|
1963
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2358
1964
|
case "FailedDependencyException":
|
|
2359
1965
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2360
|
-
|
|
2361
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2362
|
-
name: errorCode,
|
|
2363
|
-
$metadata: deserializeMetadata(output),
|
|
2364
|
-
};
|
|
2365
|
-
break;
|
|
1966
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2366
1967
|
case "ProhibitedStateException":
|
|
2367
1968
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
2368
|
-
|
|
2369
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
2370
|
-
name: errorCode,
|
|
2371
|
-
$metadata: deserializeMetadata(output),
|
|
2372
|
-
};
|
|
2373
|
-
break;
|
|
1969
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
2374
1970
|
case "ServiceUnavailableException":
|
|
2375
1971
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2376
|
-
|
|
2377
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2378
|
-
name: errorCode,
|
|
2379
|
-
$metadata: deserializeMetadata(output),
|
|
2380
|
-
};
|
|
2381
|
-
break;
|
|
1972
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2382
1973
|
case "UnauthorizedOperationException":
|
|
2383
1974
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2384
|
-
|
|
2385
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2386
|
-
name: errorCode,
|
|
2387
|
-
$metadata: deserializeMetadata(output),
|
|
2388
|
-
};
|
|
2389
|
-
break;
|
|
1975
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2390
1976
|
case "UnauthorizedResourceAccessException":
|
|
2391
1977
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2392
|
-
|
|
2393
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2394
|
-
name: errorCode,
|
|
2395
|
-
$metadata: deserializeMetadata(output),
|
|
2396
|
-
};
|
|
2397
|
-
break;
|
|
1978
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2398
1979
|
default:
|
|
2399
1980
|
const parsedBody = parsedOutput.body;
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
...parsedBody,
|
|
2403
|
-
name: `${errorCode}`,
|
|
2404
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1981
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
1982
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2405
1983
|
$fault: "client",
|
|
2406
1984
|
$metadata: deserializeMetadata(output),
|
|
2407
|
-
};
|
|
1985
|
+
});
|
|
1986
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2408
1987
|
}
|
|
2409
|
-
const message = response.message || response.Message || errorCode;
|
|
2410
|
-
response.message = message;
|
|
2411
|
-
delete response.Message;
|
|
2412
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2413
1988
|
};
|
|
2414
1989
|
const deserializeAws_restJson1DeleteDocumentCommand = async (output, context) => {
|
|
2415
1990
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -2433,83 +2008,37 @@ const deserializeAws_restJson1DeleteDocumentCommandError = async (output, contex
|
|
|
2433
2008
|
switch (errorCode) {
|
|
2434
2009
|
case "ConcurrentModificationException":
|
|
2435
2010
|
case "com.amazonaws.workdocs#ConcurrentModificationException":
|
|
2436
|
-
|
|
2437
|
-
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
2438
|
-
name: errorCode,
|
|
2439
|
-
$metadata: deserializeMetadata(output),
|
|
2440
|
-
};
|
|
2441
|
-
break;
|
|
2011
|
+
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
2442
2012
|
case "ConflictingOperationException":
|
|
2443
2013
|
case "com.amazonaws.workdocs#ConflictingOperationException":
|
|
2444
|
-
|
|
2445
|
-
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
2446
|
-
name: errorCode,
|
|
2447
|
-
$metadata: deserializeMetadata(output),
|
|
2448
|
-
};
|
|
2449
|
-
break;
|
|
2014
|
+
throw await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context);
|
|
2450
2015
|
case "EntityNotExistsException":
|
|
2451
2016
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2452
|
-
|
|
2453
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2454
|
-
name: errorCode,
|
|
2455
|
-
$metadata: deserializeMetadata(output),
|
|
2456
|
-
};
|
|
2457
|
-
break;
|
|
2017
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2458
2018
|
case "FailedDependencyException":
|
|
2459
2019
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2460
|
-
|
|
2461
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2462
|
-
name: errorCode,
|
|
2463
|
-
$metadata: deserializeMetadata(output),
|
|
2464
|
-
};
|
|
2465
|
-
break;
|
|
2020
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2466
2021
|
case "ProhibitedStateException":
|
|
2467
2022
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
2468
|
-
|
|
2469
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
2470
|
-
name: errorCode,
|
|
2471
|
-
$metadata: deserializeMetadata(output),
|
|
2472
|
-
};
|
|
2473
|
-
break;
|
|
2023
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
2474
2024
|
case "ServiceUnavailableException":
|
|
2475
2025
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2476
|
-
|
|
2477
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2478
|
-
name: errorCode,
|
|
2479
|
-
$metadata: deserializeMetadata(output),
|
|
2480
|
-
};
|
|
2481
|
-
break;
|
|
2026
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2482
2027
|
case "UnauthorizedOperationException":
|
|
2483
2028
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2484
|
-
|
|
2485
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2486
|
-
name: errorCode,
|
|
2487
|
-
$metadata: deserializeMetadata(output),
|
|
2488
|
-
};
|
|
2489
|
-
break;
|
|
2029
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2490
2030
|
case "UnauthorizedResourceAccessException":
|
|
2491
2031
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2492
|
-
|
|
2493
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2494
|
-
name: errorCode,
|
|
2495
|
-
$metadata: deserializeMetadata(output),
|
|
2496
|
-
};
|
|
2497
|
-
break;
|
|
2032
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2498
2033
|
default:
|
|
2499
2034
|
const parsedBody = parsedOutput.body;
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
...parsedBody,
|
|
2503
|
-
name: `${errorCode}`,
|
|
2504
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2035
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2036
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2505
2037
|
$fault: "client",
|
|
2506
2038
|
$metadata: deserializeMetadata(output),
|
|
2507
|
-
};
|
|
2039
|
+
});
|
|
2040
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2508
2041
|
}
|
|
2509
|
-
const message = response.message || response.Message || errorCode;
|
|
2510
|
-
response.message = message;
|
|
2511
|
-
delete response.Message;
|
|
2512
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2513
2042
|
};
|
|
2514
2043
|
const deserializeAws_restJson1DeleteFolderCommand = async (output, context) => {
|
|
2515
2044
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -2533,83 +2062,37 @@ const deserializeAws_restJson1DeleteFolderCommandError = async (output, context)
|
|
|
2533
2062
|
switch (errorCode) {
|
|
2534
2063
|
case "ConcurrentModificationException":
|
|
2535
2064
|
case "com.amazonaws.workdocs#ConcurrentModificationException":
|
|
2536
|
-
|
|
2537
|
-
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
2538
|
-
name: errorCode,
|
|
2539
|
-
$metadata: deserializeMetadata(output),
|
|
2540
|
-
};
|
|
2541
|
-
break;
|
|
2065
|
+
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
2542
2066
|
case "ConflictingOperationException":
|
|
2543
2067
|
case "com.amazonaws.workdocs#ConflictingOperationException":
|
|
2544
|
-
|
|
2545
|
-
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
2546
|
-
name: errorCode,
|
|
2547
|
-
$metadata: deserializeMetadata(output),
|
|
2548
|
-
};
|
|
2549
|
-
break;
|
|
2068
|
+
throw await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context);
|
|
2550
2069
|
case "EntityNotExistsException":
|
|
2551
2070
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2552
|
-
|
|
2553
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2554
|
-
name: errorCode,
|
|
2555
|
-
$metadata: deserializeMetadata(output),
|
|
2556
|
-
};
|
|
2557
|
-
break;
|
|
2071
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2558
2072
|
case "FailedDependencyException":
|
|
2559
2073
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2560
|
-
|
|
2561
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2562
|
-
name: errorCode,
|
|
2563
|
-
$metadata: deserializeMetadata(output),
|
|
2564
|
-
};
|
|
2565
|
-
break;
|
|
2074
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2566
2075
|
case "ProhibitedStateException":
|
|
2567
2076
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
2568
|
-
|
|
2569
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
2570
|
-
name: errorCode,
|
|
2571
|
-
$metadata: deserializeMetadata(output),
|
|
2572
|
-
};
|
|
2573
|
-
break;
|
|
2077
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
2574
2078
|
case "ServiceUnavailableException":
|
|
2575
2079
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2576
|
-
|
|
2577
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2578
|
-
name: errorCode,
|
|
2579
|
-
$metadata: deserializeMetadata(output),
|
|
2580
|
-
};
|
|
2581
|
-
break;
|
|
2080
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2582
2081
|
case "UnauthorizedOperationException":
|
|
2583
2082
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2584
|
-
|
|
2585
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2586
|
-
name: errorCode,
|
|
2587
|
-
$metadata: deserializeMetadata(output),
|
|
2588
|
-
};
|
|
2589
|
-
break;
|
|
2083
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2590
2084
|
case "UnauthorizedResourceAccessException":
|
|
2591
2085
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2592
|
-
|
|
2593
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2594
|
-
name: errorCode,
|
|
2595
|
-
$metadata: deserializeMetadata(output),
|
|
2596
|
-
};
|
|
2597
|
-
break;
|
|
2086
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2598
2087
|
default:
|
|
2599
2088
|
const parsedBody = parsedOutput.body;
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
...parsedBody,
|
|
2603
|
-
name: `${errorCode}`,
|
|
2604
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2089
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2090
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2605
2091
|
$fault: "client",
|
|
2606
2092
|
$metadata: deserializeMetadata(output),
|
|
2607
|
-
};
|
|
2093
|
+
});
|
|
2094
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2608
2095
|
}
|
|
2609
|
-
const message = response.message || response.Message || errorCode;
|
|
2610
|
-
response.message = message;
|
|
2611
|
-
delete response.Message;
|
|
2612
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2613
2096
|
};
|
|
2614
2097
|
const deserializeAws_restJson1DeleteFolderContentsCommand = async (output, context) => {
|
|
2615
2098
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -2633,75 +2116,34 @@ const deserializeAws_restJson1DeleteFolderContentsCommandError = async (output,
|
|
|
2633
2116
|
switch (errorCode) {
|
|
2634
2117
|
case "ConflictingOperationException":
|
|
2635
2118
|
case "com.amazonaws.workdocs#ConflictingOperationException":
|
|
2636
|
-
|
|
2637
|
-
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
2638
|
-
name: errorCode,
|
|
2639
|
-
$metadata: deserializeMetadata(output),
|
|
2640
|
-
};
|
|
2641
|
-
break;
|
|
2119
|
+
throw await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context);
|
|
2642
2120
|
case "EntityNotExistsException":
|
|
2643
2121
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2644
|
-
|
|
2645
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2646
|
-
name: errorCode,
|
|
2647
|
-
$metadata: deserializeMetadata(output),
|
|
2648
|
-
};
|
|
2649
|
-
break;
|
|
2122
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2650
2123
|
case "FailedDependencyException":
|
|
2651
2124
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2652
|
-
|
|
2653
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2654
|
-
name: errorCode,
|
|
2655
|
-
$metadata: deserializeMetadata(output),
|
|
2656
|
-
};
|
|
2657
|
-
break;
|
|
2125
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2658
2126
|
case "ProhibitedStateException":
|
|
2659
2127
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
2660
|
-
|
|
2661
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
2662
|
-
name: errorCode,
|
|
2663
|
-
$metadata: deserializeMetadata(output),
|
|
2664
|
-
};
|
|
2665
|
-
break;
|
|
2128
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
2666
2129
|
case "ServiceUnavailableException":
|
|
2667
2130
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2668
|
-
|
|
2669
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2670
|
-
name: errorCode,
|
|
2671
|
-
$metadata: deserializeMetadata(output),
|
|
2672
|
-
};
|
|
2673
|
-
break;
|
|
2131
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2674
2132
|
case "UnauthorizedOperationException":
|
|
2675
2133
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2676
|
-
|
|
2677
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2678
|
-
name: errorCode,
|
|
2679
|
-
$metadata: deserializeMetadata(output),
|
|
2680
|
-
};
|
|
2681
|
-
break;
|
|
2134
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2682
2135
|
case "UnauthorizedResourceAccessException":
|
|
2683
2136
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2684
|
-
|
|
2685
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2686
|
-
name: errorCode,
|
|
2687
|
-
$metadata: deserializeMetadata(output),
|
|
2688
|
-
};
|
|
2689
|
-
break;
|
|
2137
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2690
2138
|
default:
|
|
2691
2139
|
const parsedBody = parsedOutput.body;
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
...parsedBody,
|
|
2695
|
-
name: `${errorCode}`,
|
|
2696
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2140
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2141
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2697
2142
|
$fault: "client",
|
|
2698
2143
|
$metadata: deserializeMetadata(output),
|
|
2699
|
-
};
|
|
2144
|
+
});
|
|
2145
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2700
2146
|
}
|
|
2701
|
-
const message = response.message || response.Message || errorCode;
|
|
2702
|
-
response.message = message;
|
|
2703
|
-
delete response.Message;
|
|
2704
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2705
2147
|
};
|
|
2706
2148
|
const deserializeAws_restJson1DeleteLabelsCommand = async (output, context) => {
|
|
2707
2149
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2725,59 +2167,28 @@ const deserializeAws_restJson1DeleteLabelsCommandError = async (output, context)
|
|
|
2725
2167
|
switch (errorCode) {
|
|
2726
2168
|
case "EntityNotExistsException":
|
|
2727
2169
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2728
|
-
|
|
2729
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2730
|
-
name: errorCode,
|
|
2731
|
-
$metadata: deserializeMetadata(output),
|
|
2732
|
-
};
|
|
2733
|
-
break;
|
|
2170
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2734
2171
|
case "FailedDependencyException":
|
|
2735
2172
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2736
|
-
|
|
2737
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2738
|
-
name: errorCode,
|
|
2739
|
-
$metadata: deserializeMetadata(output),
|
|
2740
|
-
};
|
|
2741
|
-
break;
|
|
2173
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2742
2174
|
case "ServiceUnavailableException":
|
|
2743
2175
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2744
|
-
|
|
2745
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2746
|
-
name: errorCode,
|
|
2747
|
-
$metadata: deserializeMetadata(output),
|
|
2748
|
-
};
|
|
2749
|
-
break;
|
|
2176
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2750
2177
|
case "UnauthorizedOperationException":
|
|
2751
2178
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2752
|
-
|
|
2753
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2754
|
-
name: errorCode,
|
|
2755
|
-
$metadata: deserializeMetadata(output),
|
|
2756
|
-
};
|
|
2757
|
-
break;
|
|
2179
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2758
2180
|
case "UnauthorizedResourceAccessException":
|
|
2759
2181
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2760
|
-
|
|
2761
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2762
|
-
name: errorCode,
|
|
2763
|
-
$metadata: deserializeMetadata(output),
|
|
2764
|
-
};
|
|
2765
|
-
break;
|
|
2182
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2766
2183
|
default:
|
|
2767
2184
|
const parsedBody = parsedOutput.body;
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
...parsedBody,
|
|
2771
|
-
name: `${errorCode}`,
|
|
2772
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2185
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2186
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2773
2187
|
$fault: "client",
|
|
2774
2188
|
$metadata: deserializeMetadata(output),
|
|
2775
|
-
};
|
|
2189
|
+
});
|
|
2190
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2776
2191
|
}
|
|
2777
|
-
const message = response.message || response.Message || errorCode;
|
|
2778
|
-
response.message = message;
|
|
2779
|
-
delete response.Message;
|
|
2780
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2781
2192
|
};
|
|
2782
2193
|
const deserializeAws_restJson1DeleteNotificationSubscriptionCommand = async (output, context) => {
|
|
2783
2194
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2801,51 +2212,25 @@ const deserializeAws_restJson1DeleteNotificationSubscriptionCommandError = async
|
|
|
2801
2212
|
switch (errorCode) {
|
|
2802
2213
|
case "EntityNotExistsException":
|
|
2803
2214
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2804
|
-
|
|
2805
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2806
|
-
name: errorCode,
|
|
2807
|
-
$metadata: deserializeMetadata(output),
|
|
2808
|
-
};
|
|
2809
|
-
break;
|
|
2215
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2810
2216
|
case "ProhibitedStateException":
|
|
2811
2217
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
2812
|
-
|
|
2813
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
2814
|
-
name: errorCode,
|
|
2815
|
-
$metadata: deserializeMetadata(output),
|
|
2816
|
-
};
|
|
2817
|
-
break;
|
|
2218
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
2818
2219
|
case "ServiceUnavailableException":
|
|
2819
2220
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2820
|
-
|
|
2821
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2822
|
-
name: errorCode,
|
|
2823
|
-
$metadata: deserializeMetadata(output),
|
|
2824
|
-
};
|
|
2825
|
-
break;
|
|
2221
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2826
2222
|
case "UnauthorizedResourceAccessException":
|
|
2827
2223
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2828
|
-
|
|
2829
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2830
|
-
name: errorCode,
|
|
2831
|
-
$metadata: deserializeMetadata(output),
|
|
2832
|
-
};
|
|
2833
|
-
break;
|
|
2224
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2834
2225
|
default:
|
|
2835
2226
|
const parsedBody = parsedOutput.body;
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
...parsedBody,
|
|
2839
|
-
name: `${errorCode}`,
|
|
2840
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2227
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2228
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2841
2229
|
$fault: "client",
|
|
2842
2230
|
$metadata: deserializeMetadata(output),
|
|
2843
|
-
};
|
|
2231
|
+
});
|
|
2232
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2844
2233
|
}
|
|
2845
|
-
const message = response.message || response.Message || errorCode;
|
|
2846
|
-
response.message = message;
|
|
2847
|
-
delete response.Message;
|
|
2848
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2849
2234
|
};
|
|
2850
2235
|
const deserializeAws_restJson1DeleteUserCommand = async (output, context) => {
|
|
2851
2236
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -2869,59 +2254,28 @@ const deserializeAws_restJson1DeleteUserCommandError = async (output, context) =
|
|
|
2869
2254
|
switch (errorCode) {
|
|
2870
2255
|
case "EntityNotExistsException":
|
|
2871
2256
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
2872
|
-
|
|
2873
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
2874
|
-
name: errorCode,
|
|
2875
|
-
$metadata: deserializeMetadata(output),
|
|
2876
|
-
};
|
|
2877
|
-
break;
|
|
2257
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
2878
2258
|
case "FailedDependencyException":
|
|
2879
2259
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2880
|
-
|
|
2881
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2882
|
-
name: errorCode,
|
|
2883
|
-
$metadata: deserializeMetadata(output),
|
|
2884
|
-
};
|
|
2885
|
-
break;
|
|
2260
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2886
2261
|
case "ServiceUnavailableException":
|
|
2887
2262
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2888
|
-
|
|
2889
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2890
|
-
name: errorCode,
|
|
2891
|
-
$metadata: deserializeMetadata(output),
|
|
2892
|
-
};
|
|
2893
|
-
break;
|
|
2263
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2894
2264
|
case "UnauthorizedOperationException":
|
|
2895
2265
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2896
|
-
|
|
2897
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2898
|
-
name: errorCode,
|
|
2899
|
-
$metadata: deserializeMetadata(output),
|
|
2900
|
-
};
|
|
2901
|
-
break;
|
|
2266
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2902
2267
|
case "UnauthorizedResourceAccessException":
|
|
2903
2268
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2904
|
-
|
|
2905
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2906
|
-
name: errorCode,
|
|
2907
|
-
$metadata: deserializeMetadata(output),
|
|
2908
|
-
};
|
|
2909
|
-
break;
|
|
2269
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2910
2270
|
default:
|
|
2911
2271
|
const parsedBody = parsedOutput.body;
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
...parsedBody,
|
|
2915
|
-
name: `${errorCode}`,
|
|
2916
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2272
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2273
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2917
2274
|
$fault: "client",
|
|
2918
2275
|
$metadata: deserializeMetadata(output),
|
|
2919
|
-
};
|
|
2276
|
+
});
|
|
2277
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2920
2278
|
}
|
|
2921
|
-
const message = response.message || response.Message || errorCode;
|
|
2922
|
-
response.message = message;
|
|
2923
|
-
delete response.Message;
|
|
2924
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2925
2279
|
};
|
|
2926
2280
|
const deserializeAws_restJson1DescribeActivitiesCommand = async (output, context) => {
|
|
2927
2281
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2953,59 +2307,28 @@ const deserializeAws_restJson1DescribeActivitiesCommandError = async (output, co
|
|
|
2953
2307
|
switch (errorCode) {
|
|
2954
2308
|
case "FailedDependencyException":
|
|
2955
2309
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
2956
|
-
|
|
2957
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
2958
|
-
name: errorCode,
|
|
2959
|
-
$metadata: deserializeMetadata(output),
|
|
2960
|
-
};
|
|
2961
|
-
break;
|
|
2310
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
2962
2311
|
case "InvalidArgumentException":
|
|
2963
2312
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
2964
|
-
|
|
2965
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
2966
|
-
name: errorCode,
|
|
2967
|
-
$metadata: deserializeMetadata(output),
|
|
2968
|
-
};
|
|
2969
|
-
break;
|
|
2313
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
2970
2314
|
case "ServiceUnavailableException":
|
|
2971
2315
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
2972
|
-
|
|
2973
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
2974
|
-
name: errorCode,
|
|
2975
|
-
$metadata: deserializeMetadata(output),
|
|
2976
|
-
};
|
|
2977
|
-
break;
|
|
2316
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2978
2317
|
case "UnauthorizedOperationException":
|
|
2979
2318
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
2980
|
-
|
|
2981
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
2982
|
-
name: errorCode,
|
|
2983
|
-
$metadata: deserializeMetadata(output),
|
|
2984
|
-
};
|
|
2985
|
-
break;
|
|
2319
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
2986
2320
|
case "UnauthorizedResourceAccessException":
|
|
2987
2321
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
2988
|
-
|
|
2989
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
2990
|
-
name: errorCode,
|
|
2991
|
-
$metadata: deserializeMetadata(output),
|
|
2992
|
-
};
|
|
2993
|
-
break;
|
|
2322
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
2994
2323
|
default:
|
|
2995
2324
|
const parsedBody = parsedOutput.body;
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
...parsedBody,
|
|
2999
|
-
name: `${errorCode}`,
|
|
3000
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2325
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2326
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3001
2327
|
$fault: "client",
|
|
3002
2328
|
$metadata: deserializeMetadata(output),
|
|
3003
|
-
};
|
|
2329
|
+
});
|
|
2330
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3004
2331
|
}
|
|
3005
|
-
const message = response.message || response.Message || errorCode;
|
|
3006
|
-
response.message = message;
|
|
3007
|
-
delete response.Message;
|
|
3008
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3009
2332
|
};
|
|
3010
2333
|
const deserializeAws_restJson1DescribeCommentsCommand = async (output, context) => {
|
|
3011
2334
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3037,67 +2360,31 @@ const deserializeAws_restJson1DescribeCommentsCommandError = async (output, cont
|
|
|
3037
2360
|
switch (errorCode) {
|
|
3038
2361
|
case "EntityNotExistsException":
|
|
3039
2362
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3040
|
-
|
|
3041
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3042
|
-
name: errorCode,
|
|
3043
|
-
$metadata: deserializeMetadata(output),
|
|
3044
|
-
};
|
|
3045
|
-
break;
|
|
2363
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3046
2364
|
case "FailedDependencyException":
|
|
3047
2365
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3048
|
-
|
|
3049
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3050
|
-
name: errorCode,
|
|
3051
|
-
$metadata: deserializeMetadata(output),
|
|
3052
|
-
};
|
|
3053
|
-
break;
|
|
2366
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3054
2367
|
case "ProhibitedStateException":
|
|
3055
2368
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
3056
|
-
|
|
3057
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
3058
|
-
name: errorCode,
|
|
3059
|
-
$metadata: deserializeMetadata(output),
|
|
3060
|
-
};
|
|
3061
|
-
break;
|
|
2369
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
3062
2370
|
case "ServiceUnavailableException":
|
|
3063
2371
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3064
|
-
|
|
3065
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3066
|
-
name: errorCode,
|
|
3067
|
-
$metadata: deserializeMetadata(output),
|
|
3068
|
-
};
|
|
3069
|
-
break;
|
|
2372
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3070
2373
|
case "UnauthorizedOperationException":
|
|
3071
2374
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3072
|
-
|
|
3073
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3074
|
-
name: errorCode,
|
|
3075
|
-
$metadata: deserializeMetadata(output),
|
|
3076
|
-
};
|
|
3077
|
-
break;
|
|
2375
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3078
2376
|
case "UnauthorizedResourceAccessException":
|
|
3079
2377
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3080
|
-
|
|
3081
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3082
|
-
name: errorCode,
|
|
3083
|
-
$metadata: deserializeMetadata(output),
|
|
3084
|
-
};
|
|
3085
|
-
break;
|
|
2378
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3086
2379
|
default:
|
|
3087
2380
|
const parsedBody = parsedOutput.body;
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
...parsedBody,
|
|
3091
|
-
name: `${errorCode}`,
|
|
3092
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2381
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2382
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3093
2383
|
$fault: "client",
|
|
3094
2384
|
$metadata: deserializeMetadata(output),
|
|
3095
|
-
};
|
|
2385
|
+
});
|
|
2386
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3096
2387
|
}
|
|
3097
|
-
const message = response.message || response.Message || errorCode;
|
|
3098
|
-
response.message = message;
|
|
3099
|
-
delete response.Message;
|
|
3100
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3101
2388
|
};
|
|
3102
2389
|
const deserializeAws_restJson1DescribeDocumentVersionsCommand = async (output, context) => {
|
|
3103
2390
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3129,75 +2416,34 @@ const deserializeAws_restJson1DescribeDocumentVersionsCommandError = async (outp
|
|
|
3129
2416
|
switch (errorCode) {
|
|
3130
2417
|
case "EntityNotExistsException":
|
|
3131
2418
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3132
|
-
|
|
3133
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3134
|
-
name: errorCode,
|
|
3135
|
-
$metadata: deserializeMetadata(output),
|
|
3136
|
-
};
|
|
3137
|
-
break;
|
|
2419
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3138
2420
|
case "FailedDependencyException":
|
|
3139
2421
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3140
|
-
|
|
3141
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3142
|
-
name: errorCode,
|
|
3143
|
-
$metadata: deserializeMetadata(output),
|
|
3144
|
-
};
|
|
3145
|
-
break;
|
|
2422
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3146
2423
|
case "InvalidArgumentException":
|
|
3147
2424
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
3148
|
-
|
|
3149
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
3150
|
-
name: errorCode,
|
|
3151
|
-
$metadata: deserializeMetadata(output),
|
|
3152
|
-
};
|
|
3153
|
-
break;
|
|
2425
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
3154
2426
|
case "ProhibitedStateException":
|
|
3155
2427
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
3156
|
-
|
|
3157
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
3158
|
-
name: errorCode,
|
|
3159
|
-
$metadata: deserializeMetadata(output),
|
|
3160
|
-
};
|
|
3161
|
-
break;
|
|
2428
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
3162
2429
|
case "ServiceUnavailableException":
|
|
3163
2430
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3164
|
-
|
|
3165
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3166
|
-
name: errorCode,
|
|
3167
|
-
$metadata: deserializeMetadata(output),
|
|
3168
|
-
};
|
|
3169
|
-
break;
|
|
2431
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3170
2432
|
case "UnauthorizedOperationException":
|
|
3171
2433
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3172
|
-
|
|
3173
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3174
|
-
name: errorCode,
|
|
3175
|
-
$metadata: deserializeMetadata(output),
|
|
3176
|
-
};
|
|
3177
|
-
break;
|
|
2434
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3178
2435
|
case "UnauthorizedResourceAccessException":
|
|
3179
2436
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3180
|
-
|
|
3181
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3182
|
-
name: errorCode,
|
|
3183
|
-
$metadata: deserializeMetadata(output),
|
|
3184
|
-
};
|
|
3185
|
-
break;
|
|
2437
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3186
2438
|
default:
|
|
3187
2439
|
const parsedBody = parsedOutput.body;
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
...parsedBody,
|
|
3191
|
-
name: `${errorCode}`,
|
|
3192
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2440
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2441
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3193
2442
|
$fault: "client",
|
|
3194
2443
|
$metadata: deserializeMetadata(output),
|
|
3195
|
-
};
|
|
2444
|
+
});
|
|
2445
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3196
2446
|
}
|
|
3197
|
-
const message = response.message || response.Message || errorCode;
|
|
3198
|
-
response.message = message;
|
|
3199
|
-
delete response.Message;
|
|
3200
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3201
2447
|
};
|
|
3202
2448
|
const deserializeAws_restJson1DescribeFolderContentsCommand = async (output, context) => {
|
|
3203
2449
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3233,67 +2479,31 @@ const deserializeAws_restJson1DescribeFolderContentsCommandError = async (output
|
|
|
3233
2479
|
switch (errorCode) {
|
|
3234
2480
|
case "EntityNotExistsException":
|
|
3235
2481
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3236
|
-
|
|
3237
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3238
|
-
name: errorCode,
|
|
3239
|
-
$metadata: deserializeMetadata(output),
|
|
3240
|
-
};
|
|
3241
|
-
break;
|
|
2482
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3242
2483
|
case "FailedDependencyException":
|
|
3243
2484
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3244
|
-
|
|
3245
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3246
|
-
name: errorCode,
|
|
3247
|
-
$metadata: deserializeMetadata(output),
|
|
3248
|
-
};
|
|
3249
|
-
break;
|
|
2485
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3250
2486
|
case "InvalidArgumentException":
|
|
3251
2487
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
3252
|
-
|
|
3253
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
3254
|
-
name: errorCode,
|
|
3255
|
-
$metadata: deserializeMetadata(output),
|
|
3256
|
-
};
|
|
3257
|
-
break;
|
|
2488
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
3258
2489
|
case "ProhibitedStateException":
|
|
3259
2490
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
3260
|
-
|
|
3261
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
3262
|
-
name: errorCode,
|
|
3263
|
-
$metadata: deserializeMetadata(output),
|
|
3264
|
-
};
|
|
3265
|
-
break;
|
|
2491
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
3266
2492
|
case "ServiceUnavailableException":
|
|
3267
2493
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3268
|
-
|
|
3269
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3270
|
-
name: errorCode,
|
|
3271
|
-
$metadata: deserializeMetadata(output),
|
|
3272
|
-
};
|
|
3273
|
-
break;
|
|
2494
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3274
2495
|
case "UnauthorizedResourceAccessException":
|
|
3275
2496
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3276
|
-
|
|
3277
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3278
|
-
name: errorCode,
|
|
3279
|
-
$metadata: deserializeMetadata(output),
|
|
3280
|
-
};
|
|
3281
|
-
break;
|
|
2497
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3282
2498
|
default:
|
|
3283
2499
|
const parsedBody = parsedOutput.body;
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
...parsedBody,
|
|
3287
|
-
name: `${errorCode}`,
|
|
3288
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2500
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2501
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3289
2502
|
$fault: "client",
|
|
3290
2503
|
$metadata: deserializeMetadata(output),
|
|
3291
|
-
};
|
|
2504
|
+
});
|
|
2505
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3292
2506
|
}
|
|
3293
|
-
const message = response.message || response.Message || errorCode;
|
|
3294
|
-
response.message = message;
|
|
3295
|
-
delete response.Message;
|
|
3296
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3297
2507
|
};
|
|
3298
2508
|
const deserializeAws_restJson1DescribeGroupsCommand = async (output, context) => {
|
|
3299
2509
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3325,51 +2535,25 @@ const deserializeAws_restJson1DescribeGroupsCommandError = async (output, contex
|
|
|
3325
2535
|
switch (errorCode) {
|
|
3326
2536
|
case "FailedDependencyException":
|
|
3327
2537
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3328
|
-
|
|
3329
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3330
|
-
name: errorCode,
|
|
3331
|
-
$metadata: deserializeMetadata(output),
|
|
3332
|
-
};
|
|
3333
|
-
break;
|
|
2538
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3334
2539
|
case "ServiceUnavailableException":
|
|
3335
2540
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3336
|
-
|
|
3337
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3338
|
-
name: errorCode,
|
|
3339
|
-
$metadata: deserializeMetadata(output),
|
|
3340
|
-
};
|
|
3341
|
-
break;
|
|
2541
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3342
2542
|
case "UnauthorizedOperationException":
|
|
3343
2543
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3344
|
-
|
|
3345
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3346
|
-
name: errorCode,
|
|
3347
|
-
$metadata: deserializeMetadata(output),
|
|
3348
|
-
};
|
|
3349
|
-
break;
|
|
2544
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3350
2545
|
case "UnauthorizedResourceAccessException":
|
|
3351
2546
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3352
|
-
|
|
3353
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3354
|
-
name: errorCode,
|
|
3355
|
-
$metadata: deserializeMetadata(output),
|
|
3356
|
-
};
|
|
3357
|
-
break;
|
|
2547
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3358
2548
|
default:
|
|
3359
2549
|
const parsedBody = parsedOutput.body;
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
...parsedBody,
|
|
3363
|
-
name: `${errorCode}`,
|
|
3364
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2550
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2551
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3365
2552
|
$fault: "client",
|
|
3366
2553
|
$metadata: deserializeMetadata(output),
|
|
3367
|
-
};
|
|
2554
|
+
});
|
|
2555
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3368
2556
|
}
|
|
3369
|
-
const message = response.message || response.Message || errorCode;
|
|
3370
|
-
response.message = message;
|
|
3371
|
-
delete response.Message;
|
|
3372
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3373
2557
|
};
|
|
3374
2558
|
const deserializeAws_restJson1DescribeNotificationSubscriptionsCommand = async (output, context) => {
|
|
3375
2559
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3401,43 +2585,22 @@ const deserializeAws_restJson1DescribeNotificationSubscriptionsCommandError = as
|
|
|
3401
2585
|
switch (errorCode) {
|
|
3402
2586
|
case "EntityNotExistsException":
|
|
3403
2587
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3404
|
-
|
|
3405
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3406
|
-
name: errorCode,
|
|
3407
|
-
$metadata: deserializeMetadata(output),
|
|
3408
|
-
};
|
|
3409
|
-
break;
|
|
2588
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3410
2589
|
case "ServiceUnavailableException":
|
|
3411
2590
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3412
|
-
|
|
3413
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3414
|
-
name: errorCode,
|
|
3415
|
-
$metadata: deserializeMetadata(output),
|
|
3416
|
-
};
|
|
3417
|
-
break;
|
|
2591
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3418
2592
|
case "UnauthorizedResourceAccessException":
|
|
3419
2593
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3420
|
-
|
|
3421
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3422
|
-
name: errorCode,
|
|
3423
|
-
$metadata: deserializeMetadata(output),
|
|
3424
|
-
};
|
|
3425
|
-
break;
|
|
2594
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3426
2595
|
default:
|
|
3427
2596
|
const parsedBody = parsedOutput.body;
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
...parsedBody,
|
|
3431
|
-
name: `${errorCode}`,
|
|
3432
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2597
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2598
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3433
2599
|
$fault: "client",
|
|
3434
2600
|
$metadata: deserializeMetadata(output),
|
|
3435
|
-
};
|
|
2601
|
+
});
|
|
2602
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3436
2603
|
}
|
|
3437
|
-
const message = response.message || response.Message || errorCode;
|
|
3438
|
-
response.message = message;
|
|
3439
|
-
delete response.Message;
|
|
3440
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3441
2604
|
};
|
|
3442
2605
|
const deserializeAws_restJson1DescribeResourcePermissionsCommand = async (output, context) => {
|
|
3443
2606
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3469,51 +2632,25 @@ const deserializeAws_restJson1DescribeResourcePermissionsCommandError = async (o
|
|
|
3469
2632
|
switch (errorCode) {
|
|
3470
2633
|
case "FailedDependencyException":
|
|
3471
2634
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3472
|
-
|
|
3473
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3474
|
-
name: errorCode,
|
|
3475
|
-
$metadata: deserializeMetadata(output),
|
|
3476
|
-
};
|
|
3477
|
-
break;
|
|
2635
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3478
2636
|
case "ServiceUnavailableException":
|
|
3479
2637
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3480
|
-
|
|
3481
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3482
|
-
name: errorCode,
|
|
3483
|
-
$metadata: deserializeMetadata(output),
|
|
3484
|
-
};
|
|
3485
|
-
break;
|
|
2638
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3486
2639
|
case "UnauthorizedOperationException":
|
|
3487
2640
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3488
|
-
|
|
3489
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3490
|
-
name: errorCode,
|
|
3491
|
-
$metadata: deserializeMetadata(output),
|
|
3492
|
-
};
|
|
3493
|
-
break;
|
|
2641
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3494
2642
|
case "UnauthorizedResourceAccessException":
|
|
3495
2643
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3496
|
-
|
|
3497
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3498
|
-
name: errorCode,
|
|
3499
|
-
$metadata: deserializeMetadata(output),
|
|
3500
|
-
};
|
|
3501
|
-
break;
|
|
2644
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3502
2645
|
default:
|
|
3503
2646
|
const parsedBody = parsedOutput.body;
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
...parsedBody,
|
|
3507
|
-
name: `${errorCode}`,
|
|
3508
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2647
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2648
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3509
2649
|
$fault: "client",
|
|
3510
2650
|
$metadata: deserializeMetadata(output),
|
|
3511
|
-
};
|
|
2651
|
+
});
|
|
2652
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3512
2653
|
}
|
|
3513
|
-
const message = response.message || response.Message || errorCode;
|
|
3514
|
-
response.message = message;
|
|
3515
|
-
delete response.Message;
|
|
3516
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3517
2654
|
};
|
|
3518
2655
|
const deserializeAws_restJson1DescribeRootFoldersCommand = async (output, context) => {
|
|
3519
2656
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3545,59 +2682,28 @@ const deserializeAws_restJson1DescribeRootFoldersCommandError = async (output, c
|
|
|
3545
2682
|
switch (errorCode) {
|
|
3546
2683
|
case "FailedDependencyException":
|
|
3547
2684
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3548
|
-
|
|
3549
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3550
|
-
name: errorCode,
|
|
3551
|
-
$metadata: deserializeMetadata(output),
|
|
3552
|
-
};
|
|
3553
|
-
break;
|
|
2685
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3554
2686
|
case "InvalidArgumentException":
|
|
3555
2687
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
3556
|
-
|
|
3557
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
3558
|
-
name: errorCode,
|
|
3559
|
-
$metadata: deserializeMetadata(output),
|
|
3560
|
-
};
|
|
3561
|
-
break;
|
|
2688
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
3562
2689
|
case "ServiceUnavailableException":
|
|
3563
2690
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3564
|
-
|
|
3565
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3566
|
-
name: errorCode,
|
|
3567
|
-
$metadata: deserializeMetadata(output),
|
|
3568
|
-
};
|
|
3569
|
-
break;
|
|
2691
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3570
2692
|
case "UnauthorizedOperationException":
|
|
3571
2693
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3572
|
-
|
|
3573
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3574
|
-
name: errorCode,
|
|
3575
|
-
$metadata: deserializeMetadata(output),
|
|
3576
|
-
};
|
|
3577
|
-
break;
|
|
2694
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3578
2695
|
case "UnauthorizedResourceAccessException":
|
|
3579
2696
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3580
|
-
|
|
3581
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3582
|
-
name: errorCode,
|
|
3583
|
-
$metadata: deserializeMetadata(output),
|
|
3584
|
-
};
|
|
3585
|
-
break;
|
|
2697
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3586
2698
|
default:
|
|
3587
2699
|
const parsedBody = parsedOutput.body;
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
...parsedBody,
|
|
3591
|
-
name: `${errorCode}`,
|
|
3592
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2700
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2701
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3593
2702
|
$fault: "client",
|
|
3594
2703
|
$metadata: deserializeMetadata(output),
|
|
3595
|
-
};
|
|
2704
|
+
});
|
|
2705
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3596
2706
|
}
|
|
3597
|
-
const message = response.message || response.Message || errorCode;
|
|
3598
|
-
response.message = message;
|
|
3599
|
-
delete response.Message;
|
|
3600
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3601
2707
|
};
|
|
3602
2708
|
const deserializeAws_restJson1DescribeUsersCommand = async (output, context) => {
|
|
3603
2709
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3633,75 +2739,34 @@ const deserializeAws_restJson1DescribeUsersCommandError = async (output, context
|
|
|
3633
2739
|
switch (errorCode) {
|
|
3634
2740
|
case "EntityNotExistsException":
|
|
3635
2741
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3636
|
-
|
|
3637
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3638
|
-
name: errorCode,
|
|
3639
|
-
$metadata: deserializeMetadata(output),
|
|
3640
|
-
};
|
|
3641
|
-
break;
|
|
2742
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3642
2743
|
case "FailedDependencyException":
|
|
3643
2744
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3644
|
-
|
|
3645
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3646
|
-
name: errorCode,
|
|
3647
|
-
$metadata: deserializeMetadata(output),
|
|
3648
|
-
};
|
|
3649
|
-
break;
|
|
2745
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3650
2746
|
case "InvalidArgumentException":
|
|
3651
2747
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
3652
|
-
|
|
3653
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
3654
|
-
name: errorCode,
|
|
3655
|
-
$metadata: deserializeMetadata(output),
|
|
3656
|
-
};
|
|
3657
|
-
break;
|
|
2748
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
3658
2749
|
case "RequestedEntityTooLargeException":
|
|
3659
2750
|
case "com.amazonaws.workdocs#RequestedEntityTooLargeException":
|
|
3660
|
-
|
|
3661
|
-
...(await deserializeAws_restJson1RequestedEntityTooLargeExceptionResponse(parsedOutput, context)),
|
|
3662
|
-
name: errorCode,
|
|
3663
|
-
$metadata: deserializeMetadata(output),
|
|
3664
|
-
};
|
|
3665
|
-
break;
|
|
2751
|
+
throw await deserializeAws_restJson1RequestedEntityTooLargeExceptionResponse(parsedOutput, context);
|
|
3666
2752
|
case "ServiceUnavailableException":
|
|
3667
2753
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3668
|
-
|
|
3669
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3670
|
-
name: errorCode,
|
|
3671
|
-
$metadata: deserializeMetadata(output),
|
|
3672
|
-
};
|
|
3673
|
-
break;
|
|
2754
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3674
2755
|
case "UnauthorizedOperationException":
|
|
3675
2756
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3676
|
-
|
|
3677
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3678
|
-
name: errorCode,
|
|
3679
|
-
$metadata: deserializeMetadata(output),
|
|
3680
|
-
};
|
|
3681
|
-
break;
|
|
2757
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3682
2758
|
case "UnauthorizedResourceAccessException":
|
|
3683
2759
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3684
|
-
|
|
3685
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3686
|
-
name: errorCode,
|
|
3687
|
-
$metadata: deserializeMetadata(output),
|
|
3688
|
-
};
|
|
3689
|
-
break;
|
|
2760
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3690
2761
|
default:
|
|
3691
2762
|
const parsedBody = parsedOutput.body;
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
...parsedBody,
|
|
3695
|
-
name: `${errorCode}`,
|
|
3696
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2763
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2764
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3697
2765
|
$fault: "client",
|
|
3698
2766
|
$metadata: deserializeMetadata(output),
|
|
3699
|
-
};
|
|
2767
|
+
});
|
|
2768
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3700
2769
|
}
|
|
3701
|
-
const message = response.message || response.Message || errorCode;
|
|
3702
|
-
response.message = message;
|
|
3703
|
-
delete response.Message;
|
|
3704
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3705
2770
|
};
|
|
3706
2771
|
const deserializeAws_restJson1GetCurrentUserCommand = async (output, context) => {
|
|
3707
2772
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3729,59 +2794,28 @@ const deserializeAws_restJson1GetCurrentUserCommandError = async (output, contex
|
|
|
3729
2794
|
switch (errorCode) {
|
|
3730
2795
|
case "EntityNotExistsException":
|
|
3731
2796
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3732
|
-
|
|
3733
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3734
|
-
name: errorCode,
|
|
3735
|
-
$metadata: deserializeMetadata(output),
|
|
3736
|
-
};
|
|
3737
|
-
break;
|
|
2797
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3738
2798
|
case "FailedDependencyException":
|
|
3739
2799
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3740
|
-
|
|
3741
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3742
|
-
name: errorCode,
|
|
3743
|
-
$metadata: deserializeMetadata(output),
|
|
3744
|
-
};
|
|
3745
|
-
break;
|
|
2800
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3746
2801
|
case "ServiceUnavailableException":
|
|
3747
2802
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3748
|
-
|
|
3749
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3750
|
-
name: errorCode,
|
|
3751
|
-
$metadata: deserializeMetadata(output),
|
|
3752
|
-
};
|
|
3753
|
-
break;
|
|
2803
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3754
2804
|
case "UnauthorizedOperationException":
|
|
3755
2805
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3756
|
-
|
|
3757
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3758
|
-
name: errorCode,
|
|
3759
|
-
$metadata: deserializeMetadata(output),
|
|
3760
|
-
};
|
|
3761
|
-
break;
|
|
2806
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3762
2807
|
case "UnauthorizedResourceAccessException":
|
|
3763
2808
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3764
|
-
|
|
3765
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3766
|
-
name: errorCode,
|
|
3767
|
-
$metadata: deserializeMetadata(output),
|
|
3768
|
-
};
|
|
3769
|
-
break;
|
|
2809
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3770
2810
|
default:
|
|
3771
2811
|
const parsedBody = parsedOutput.body;
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
...parsedBody,
|
|
3775
|
-
name: `${errorCode}`,
|
|
3776
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2812
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2813
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3777
2814
|
$fault: "client",
|
|
3778
2815
|
$metadata: deserializeMetadata(output),
|
|
3779
|
-
};
|
|
2816
|
+
});
|
|
2817
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3780
2818
|
}
|
|
3781
|
-
const message = response.message || response.Message || errorCode;
|
|
3782
|
-
response.message = message;
|
|
3783
|
-
delete response.Message;
|
|
3784
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3785
2819
|
};
|
|
3786
2820
|
const deserializeAws_restJson1GetDocumentCommand = async (output, context) => {
|
|
3787
2821
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3813,75 +2847,34 @@ const deserializeAws_restJson1GetDocumentCommandError = async (output, context)
|
|
|
3813
2847
|
switch (errorCode) {
|
|
3814
2848
|
case "EntityNotExistsException":
|
|
3815
2849
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3816
|
-
|
|
3817
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3818
|
-
name: errorCode,
|
|
3819
|
-
$metadata: deserializeMetadata(output),
|
|
3820
|
-
};
|
|
3821
|
-
break;
|
|
2850
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3822
2851
|
case "FailedDependencyException":
|
|
3823
2852
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3824
|
-
|
|
3825
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3826
|
-
name: errorCode,
|
|
3827
|
-
$metadata: deserializeMetadata(output),
|
|
3828
|
-
};
|
|
3829
|
-
break;
|
|
2853
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3830
2854
|
case "InvalidArgumentException":
|
|
3831
2855
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
3832
|
-
|
|
3833
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
3834
|
-
name: errorCode,
|
|
3835
|
-
$metadata: deserializeMetadata(output),
|
|
3836
|
-
};
|
|
3837
|
-
break;
|
|
2856
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
3838
2857
|
case "InvalidPasswordException":
|
|
3839
2858
|
case "com.amazonaws.workdocs#InvalidPasswordException":
|
|
3840
|
-
|
|
3841
|
-
...(await deserializeAws_restJson1InvalidPasswordExceptionResponse(parsedOutput, context)),
|
|
3842
|
-
name: errorCode,
|
|
3843
|
-
$metadata: deserializeMetadata(output),
|
|
3844
|
-
};
|
|
3845
|
-
break;
|
|
2859
|
+
throw await deserializeAws_restJson1InvalidPasswordExceptionResponse(parsedOutput, context);
|
|
3846
2860
|
case "ServiceUnavailableException":
|
|
3847
2861
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3848
|
-
|
|
3849
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3850
|
-
name: errorCode,
|
|
3851
|
-
$metadata: deserializeMetadata(output),
|
|
3852
|
-
};
|
|
3853
|
-
break;
|
|
2862
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3854
2863
|
case "UnauthorizedOperationException":
|
|
3855
2864
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3856
|
-
|
|
3857
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3858
|
-
name: errorCode,
|
|
3859
|
-
$metadata: deserializeMetadata(output),
|
|
3860
|
-
};
|
|
3861
|
-
break;
|
|
2865
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3862
2866
|
case "UnauthorizedResourceAccessException":
|
|
3863
2867
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3864
|
-
|
|
3865
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3866
|
-
name: errorCode,
|
|
3867
|
-
$metadata: deserializeMetadata(output),
|
|
3868
|
-
};
|
|
3869
|
-
break;
|
|
2868
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3870
2869
|
default:
|
|
3871
2870
|
const parsedBody = parsedOutput.body;
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
...parsedBody,
|
|
3875
|
-
name: `${errorCode}`,
|
|
3876
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2871
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2872
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3877
2873
|
$fault: "client",
|
|
3878
2874
|
$metadata: deserializeMetadata(output),
|
|
3879
|
-
};
|
|
2875
|
+
});
|
|
2876
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3880
2877
|
}
|
|
3881
|
-
const message = response.message || response.Message || errorCode;
|
|
3882
|
-
response.message = message;
|
|
3883
|
-
delete response.Message;
|
|
3884
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3885
2878
|
};
|
|
3886
2879
|
const deserializeAws_restJson1GetDocumentPathCommand = async (output, context) => {
|
|
3887
2880
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3909,59 +2902,28 @@ const deserializeAws_restJson1GetDocumentPathCommandError = async (output, conte
|
|
|
3909
2902
|
switch (errorCode) {
|
|
3910
2903
|
case "EntityNotExistsException":
|
|
3911
2904
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3912
|
-
|
|
3913
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3914
|
-
name: errorCode,
|
|
3915
|
-
$metadata: deserializeMetadata(output),
|
|
3916
|
-
};
|
|
3917
|
-
break;
|
|
2905
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
3918
2906
|
case "FailedDependencyException":
|
|
3919
2907
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
3920
|
-
|
|
3921
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
3922
|
-
name: errorCode,
|
|
3923
|
-
$metadata: deserializeMetadata(output),
|
|
3924
|
-
};
|
|
3925
|
-
break;
|
|
2908
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
3926
2909
|
case "ServiceUnavailableException":
|
|
3927
2910
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
3928
|
-
|
|
3929
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
3930
|
-
name: errorCode,
|
|
3931
|
-
$metadata: deserializeMetadata(output),
|
|
3932
|
-
};
|
|
3933
|
-
break;
|
|
2911
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3934
2912
|
case "UnauthorizedOperationException":
|
|
3935
2913
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
3936
|
-
|
|
3937
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
3938
|
-
name: errorCode,
|
|
3939
|
-
$metadata: deserializeMetadata(output),
|
|
3940
|
-
};
|
|
3941
|
-
break;
|
|
2914
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
3942
2915
|
case "UnauthorizedResourceAccessException":
|
|
3943
2916
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
3944
|
-
|
|
3945
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
3946
|
-
name: errorCode,
|
|
3947
|
-
$metadata: deserializeMetadata(output),
|
|
3948
|
-
};
|
|
3949
|
-
break;
|
|
2917
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
3950
2918
|
default:
|
|
3951
2919
|
const parsedBody = parsedOutput.body;
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
...parsedBody,
|
|
3955
|
-
name: `${errorCode}`,
|
|
3956
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2920
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2921
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3957
2922
|
$fault: "client",
|
|
3958
2923
|
$metadata: deserializeMetadata(output),
|
|
3959
|
-
};
|
|
2924
|
+
});
|
|
2925
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3960
2926
|
}
|
|
3961
|
-
const message = response.message || response.Message || errorCode;
|
|
3962
|
-
response.message = message;
|
|
3963
|
-
delete response.Message;
|
|
3964
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3965
2927
|
};
|
|
3966
2928
|
const deserializeAws_restJson1GetDocumentVersionCommand = async (output, context) => {
|
|
3967
2929
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3993,75 +2955,34 @@ const deserializeAws_restJson1GetDocumentVersionCommandError = async (output, co
|
|
|
3993
2955
|
switch (errorCode) {
|
|
3994
2956
|
case "EntityNotExistsException":
|
|
3995
2957
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
3996
|
-
|
|
3997
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
3998
|
-
name: errorCode,
|
|
3999
|
-
$metadata: deserializeMetadata(output),
|
|
4000
|
-
};
|
|
4001
|
-
break;
|
|
2958
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4002
2959
|
case "FailedDependencyException":
|
|
4003
2960
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4004
|
-
|
|
4005
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4006
|
-
name: errorCode,
|
|
4007
|
-
$metadata: deserializeMetadata(output),
|
|
4008
|
-
};
|
|
4009
|
-
break;
|
|
2961
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4010
2962
|
case "InvalidPasswordException":
|
|
4011
2963
|
case "com.amazonaws.workdocs#InvalidPasswordException":
|
|
4012
|
-
|
|
4013
|
-
...(await deserializeAws_restJson1InvalidPasswordExceptionResponse(parsedOutput, context)),
|
|
4014
|
-
name: errorCode,
|
|
4015
|
-
$metadata: deserializeMetadata(output),
|
|
4016
|
-
};
|
|
4017
|
-
break;
|
|
2964
|
+
throw await deserializeAws_restJson1InvalidPasswordExceptionResponse(parsedOutput, context);
|
|
4018
2965
|
case "ProhibitedStateException":
|
|
4019
2966
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
4020
|
-
|
|
4021
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
4022
|
-
name: errorCode,
|
|
4023
|
-
$metadata: deserializeMetadata(output),
|
|
4024
|
-
};
|
|
4025
|
-
break;
|
|
2967
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
4026
2968
|
case "ServiceUnavailableException":
|
|
4027
2969
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4028
|
-
|
|
4029
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4030
|
-
name: errorCode,
|
|
4031
|
-
$metadata: deserializeMetadata(output),
|
|
4032
|
-
};
|
|
4033
|
-
break;
|
|
2970
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4034
2971
|
case "UnauthorizedOperationException":
|
|
4035
2972
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4036
|
-
|
|
4037
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4038
|
-
name: errorCode,
|
|
4039
|
-
$metadata: deserializeMetadata(output),
|
|
4040
|
-
};
|
|
4041
|
-
break;
|
|
2973
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4042
2974
|
case "UnauthorizedResourceAccessException":
|
|
4043
2975
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4044
|
-
|
|
4045
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4046
|
-
name: errorCode,
|
|
4047
|
-
$metadata: deserializeMetadata(output),
|
|
4048
|
-
};
|
|
4049
|
-
break;
|
|
2976
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4050
2977
|
default:
|
|
4051
2978
|
const parsedBody = parsedOutput.body;
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
...parsedBody,
|
|
4055
|
-
name: `${errorCode}`,
|
|
4056
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2979
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
2980
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4057
2981
|
$fault: "client",
|
|
4058
2982
|
$metadata: deserializeMetadata(output),
|
|
4059
|
-
};
|
|
2983
|
+
});
|
|
2984
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4060
2985
|
}
|
|
4061
|
-
const message = response.message || response.Message || errorCode;
|
|
4062
|
-
response.message = message;
|
|
4063
|
-
delete response.Message;
|
|
4064
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4065
2986
|
};
|
|
4066
2987
|
const deserializeAws_restJson1GetFolderCommand = async (output, context) => {
|
|
4067
2988
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4093,75 +3014,34 @@ const deserializeAws_restJson1GetFolderCommandError = async (output, context) =>
|
|
|
4093
3014
|
switch (errorCode) {
|
|
4094
3015
|
case "EntityNotExistsException":
|
|
4095
3016
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
4096
|
-
|
|
4097
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
4098
|
-
name: errorCode,
|
|
4099
|
-
$metadata: deserializeMetadata(output),
|
|
4100
|
-
};
|
|
4101
|
-
break;
|
|
3017
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4102
3018
|
case "FailedDependencyException":
|
|
4103
3019
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4104
|
-
|
|
4105
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4106
|
-
name: errorCode,
|
|
4107
|
-
$metadata: deserializeMetadata(output),
|
|
4108
|
-
};
|
|
4109
|
-
break;
|
|
3020
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4110
3021
|
case "InvalidArgumentException":
|
|
4111
3022
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
4112
|
-
|
|
4113
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
4114
|
-
name: errorCode,
|
|
4115
|
-
$metadata: deserializeMetadata(output),
|
|
4116
|
-
};
|
|
4117
|
-
break;
|
|
3023
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
4118
3024
|
case "ProhibitedStateException":
|
|
4119
3025
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
4120
|
-
|
|
4121
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
4122
|
-
name: errorCode,
|
|
4123
|
-
$metadata: deserializeMetadata(output),
|
|
4124
|
-
};
|
|
4125
|
-
break;
|
|
3026
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
4126
3027
|
case "ServiceUnavailableException":
|
|
4127
3028
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4128
|
-
|
|
4129
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4130
|
-
name: errorCode,
|
|
4131
|
-
$metadata: deserializeMetadata(output),
|
|
4132
|
-
};
|
|
4133
|
-
break;
|
|
3029
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4134
3030
|
case "UnauthorizedOperationException":
|
|
4135
3031
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4136
|
-
|
|
4137
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4138
|
-
name: errorCode,
|
|
4139
|
-
$metadata: deserializeMetadata(output),
|
|
4140
|
-
};
|
|
4141
|
-
break;
|
|
3032
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4142
3033
|
case "UnauthorizedResourceAccessException":
|
|
4143
3034
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4144
|
-
|
|
4145
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4146
|
-
name: errorCode,
|
|
4147
|
-
$metadata: deserializeMetadata(output),
|
|
4148
|
-
};
|
|
4149
|
-
break;
|
|
3035
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4150
3036
|
default:
|
|
4151
3037
|
const parsedBody = parsedOutput.body;
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
...parsedBody,
|
|
4155
|
-
name: `${errorCode}`,
|
|
4156
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3038
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3039
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4157
3040
|
$fault: "client",
|
|
4158
3041
|
$metadata: deserializeMetadata(output),
|
|
4159
|
-
};
|
|
3042
|
+
});
|
|
3043
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4160
3044
|
}
|
|
4161
|
-
const message = response.message || response.Message || errorCode;
|
|
4162
|
-
response.message = message;
|
|
4163
|
-
delete response.Message;
|
|
4164
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4165
3045
|
};
|
|
4166
3046
|
const deserializeAws_restJson1GetFolderPathCommand = async (output, context) => {
|
|
4167
3047
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4189,59 +3069,28 @@ const deserializeAws_restJson1GetFolderPathCommandError = async (output, context
|
|
|
4189
3069
|
switch (errorCode) {
|
|
4190
3070
|
case "EntityNotExistsException":
|
|
4191
3071
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
4192
|
-
|
|
4193
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
4194
|
-
name: errorCode,
|
|
4195
|
-
$metadata: deserializeMetadata(output),
|
|
4196
|
-
};
|
|
4197
|
-
break;
|
|
3072
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4198
3073
|
case "FailedDependencyException":
|
|
4199
3074
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4200
|
-
|
|
4201
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4202
|
-
name: errorCode,
|
|
4203
|
-
$metadata: deserializeMetadata(output),
|
|
4204
|
-
};
|
|
4205
|
-
break;
|
|
3075
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4206
3076
|
case "ServiceUnavailableException":
|
|
4207
3077
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4208
|
-
|
|
4209
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4210
|
-
name: errorCode,
|
|
4211
|
-
$metadata: deserializeMetadata(output),
|
|
4212
|
-
};
|
|
4213
|
-
break;
|
|
3078
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4214
3079
|
case "UnauthorizedOperationException":
|
|
4215
3080
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4216
|
-
|
|
4217
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4218
|
-
name: errorCode,
|
|
4219
|
-
$metadata: deserializeMetadata(output),
|
|
4220
|
-
};
|
|
4221
|
-
break;
|
|
3081
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4222
3082
|
case "UnauthorizedResourceAccessException":
|
|
4223
3083
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4224
|
-
|
|
4225
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4226
|
-
name: errorCode,
|
|
4227
|
-
$metadata: deserializeMetadata(output),
|
|
4228
|
-
};
|
|
4229
|
-
break;
|
|
3084
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4230
3085
|
default:
|
|
4231
3086
|
const parsedBody = parsedOutput.body;
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
...parsedBody,
|
|
4235
|
-
name: `${errorCode}`,
|
|
4236
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3087
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3088
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4237
3089
|
$fault: "client",
|
|
4238
3090
|
$metadata: deserializeMetadata(output),
|
|
4239
|
-
};
|
|
3091
|
+
});
|
|
3092
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4240
3093
|
}
|
|
4241
|
-
const message = response.message || response.Message || errorCode;
|
|
4242
|
-
response.message = message;
|
|
4243
|
-
delete response.Message;
|
|
4244
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4245
3094
|
};
|
|
4246
3095
|
const deserializeAws_restJson1GetResourcesCommand = async (output, context) => {
|
|
4247
3096
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4277,59 +3126,28 @@ const deserializeAws_restJson1GetResourcesCommandError = async (output, context)
|
|
|
4277
3126
|
switch (errorCode) {
|
|
4278
3127
|
case "FailedDependencyException":
|
|
4279
3128
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4280
|
-
|
|
4281
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4282
|
-
name: errorCode,
|
|
4283
|
-
$metadata: deserializeMetadata(output),
|
|
4284
|
-
};
|
|
4285
|
-
break;
|
|
3129
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4286
3130
|
case "InvalidArgumentException":
|
|
4287
3131
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
4288
|
-
|
|
4289
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
4290
|
-
name: errorCode,
|
|
4291
|
-
$metadata: deserializeMetadata(output),
|
|
4292
|
-
};
|
|
4293
|
-
break;
|
|
3132
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
4294
3133
|
case "ServiceUnavailableException":
|
|
4295
3134
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4296
|
-
|
|
4297
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4298
|
-
name: errorCode,
|
|
4299
|
-
$metadata: deserializeMetadata(output),
|
|
4300
|
-
};
|
|
4301
|
-
break;
|
|
3135
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4302
3136
|
case "UnauthorizedOperationException":
|
|
4303
3137
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4304
|
-
|
|
4305
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4306
|
-
name: errorCode,
|
|
4307
|
-
$metadata: deserializeMetadata(output),
|
|
4308
|
-
};
|
|
4309
|
-
break;
|
|
3138
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4310
3139
|
case "UnauthorizedResourceAccessException":
|
|
4311
3140
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4312
|
-
|
|
4313
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4314
|
-
name: errorCode,
|
|
4315
|
-
$metadata: deserializeMetadata(output),
|
|
4316
|
-
};
|
|
4317
|
-
break;
|
|
3141
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4318
3142
|
default:
|
|
4319
3143
|
const parsedBody = parsedOutput.body;
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
...parsedBody,
|
|
4323
|
-
name: `${errorCode}`,
|
|
4324
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3144
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3145
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4325
3146
|
$fault: "client",
|
|
4326
3147
|
$metadata: deserializeMetadata(output),
|
|
4327
|
-
};
|
|
3148
|
+
});
|
|
3149
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4328
3150
|
}
|
|
4329
|
-
const message = response.message || response.Message || errorCode;
|
|
4330
|
-
response.message = message;
|
|
4331
|
-
delete response.Message;
|
|
4332
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4333
3151
|
};
|
|
4334
3152
|
const deserializeAws_restJson1InitiateDocumentVersionUploadCommand = async (output, context) => {
|
|
4335
3153
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
@@ -4361,107 +3179,46 @@ const deserializeAws_restJson1InitiateDocumentVersionUploadCommandError = async
|
|
|
4361
3179
|
switch (errorCode) {
|
|
4362
3180
|
case "DraftUploadOutOfSyncException":
|
|
4363
3181
|
case "com.amazonaws.workdocs#DraftUploadOutOfSyncException":
|
|
4364
|
-
|
|
4365
|
-
...(await deserializeAws_restJson1DraftUploadOutOfSyncExceptionResponse(parsedOutput, context)),
|
|
4366
|
-
name: errorCode,
|
|
4367
|
-
$metadata: deserializeMetadata(output),
|
|
4368
|
-
};
|
|
4369
|
-
break;
|
|
3182
|
+
throw await deserializeAws_restJson1DraftUploadOutOfSyncExceptionResponse(parsedOutput, context);
|
|
4370
3183
|
case "EntityAlreadyExistsException":
|
|
4371
3184
|
case "com.amazonaws.workdocs#EntityAlreadyExistsException":
|
|
4372
|
-
|
|
4373
|
-
...(await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
4374
|
-
name: errorCode,
|
|
4375
|
-
$metadata: deserializeMetadata(output),
|
|
4376
|
-
};
|
|
4377
|
-
break;
|
|
3185
|
+
throw await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
4378
3186
|
case "EntityNotExistsException":
|
|
4379
3187
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
4380
|
-
|
|
4381
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
4382
|
-
name: errorCode,
|
|
4383
|
-
$metadata: deserializeMetadata(output),
|
|
4384
|
-
};
|
|
4385
|
-
break;
|
|
3188
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4386
3189
|
case "FailedDependencyException":
|
|
4387
3190
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4388
|
-
|
|
4389
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4390
|
-
name: errorCode,
|
|
4391
|
-
$metadata: deserializeMetadata(output),
|
|
4392
|
-
};
|
|
4393
|
-
break;
|
|
3191
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4394
3192
|
case "ProhibitedStateException":
|
|
4395
3193
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
4396
|
-
|
|
4397
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
4398
|
-
name: errorCode,
|
|
4399
|
-
$metadata: deserializeMetadata(output),
|
|
4400
|
-
};
|
|
4401
|
-
break;
|
|
3194
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
4402
3195
|
case "ResourceAlreadyCheckedOutException":
|
|
4403
3196
|
case "com.amazonaws.workdocs#ResourceAlreadyCheckedOutException":
|
|
4404
|
-
|
|
4405
|
-
...(await deserializeAws_restJson1ResourceAlreadyCheckedOutExceptionResponse(parsedOutput, context)),
|
|
4406
|
-
name: errorCode,
|
|
4407
|
-
$metadata: deserializeMetadata(output),
|
|
4408
|
-
};
|
|
4409
|
-
break;
|
|
3197
|
+
throw await deserializeAws_restJson1ResourceAlreadyCheckedOutExceptionResponse(parsedOutput, context);
|
|
4410
3198
|
case "ServiceUnavailableException":
|
|
4411
3199
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4412
|
-
|
|
4413
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4414
|
-
name: errorCode,
|
|
4415
|
-
$metadata: deserializeMetadata(output),
|
|
4416
|
-
};
|
|
4417
|
-
break;
|
|
3200
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4418
3201
|
case "StorageLimitExceededException":
|
|
4419
3202
|
case "com.amazonaws.workdocs#StorageLimitExceededException":
|
|
4420
|
-
|
|
4421
|
-
...(await deserializeAws_restJson1StorageLimitExceededExceptionResponse(parsedOutput, context)),
|
|
4422
|
-
name: errorCode,
|
|
4423
|
-
$metadata: deserializeMetadata(output),
|
|
4424
|
-
};
|
|
4425
|
-
break;
|
|
3203
|
+
throw await deserializeAws_restJson1StorageLimitExceededExceptionResponse(parsedOutput, context);
|
|
4426
3204
|
case "StorageLimitWillExceedException":
|
|
4427
3205
|
case "com.amazonaws.workdocs#StorageLimitWillExceedException":
|
|
4428
|
-
|
|
4429
|
-
...(await deserializeAws_restJson1StorageLimitWillExceedExceptionResponse(parsedOutput, context)),
|
|
4430
|
-
name: errorCode,
|
|
4431
|
-
$metadata: deserializeMetadata(output),
|
|
4432
|
-
};
|
|
4433
|
-
break;
|
|
3206
|
+
throw await deserializeAws_restJson1StorageLimitWillExceedExceptionResponse(parsedOutput, context);
|
|
4434
3207
|
case "UnauthorizedOperationException":
|
|
4435
3208
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4436
|
-
|
|
4437
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4438
|
-
name: errorCode,
|
|
4439
|
-
$metadata: deserializeMetadata(output),
|
|
4440
|
-
};
|
|
4441
|
-
break;
|
|
3209
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4442
3210
|
case "UnauthorizedResourceAccessException":
|
|
4443
3211
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4444
|
-
|
|
4445
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4446
|
-
name: errorCode,
|
|
4447
|
-
$metadata: deserializeMetadata(output),
|
|
4448
|
-
};
|
|
4449
|
-
break;
|
|
3212
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4450
3213
|
default:
|
|
4451
3214
|
const parsedBody = parsedOutput.body;
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
...parsedBody,
|
|
4455
|
-
name: `${errorCode}`,
|
|
4456
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3215
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3216
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4457
3217
|
$fault: "client",
|
|
4458
3218
|
$metadata: deserializeMetadata(output),
|
|
4459
|
-
};
|
|
3219
|
+
});
|
|
3220
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4460
3221
|
}
|
|
4461
|
-
const message = response.message || response.Message || errorCode;
|
|
4462
|
-
response.message = message;
|
|
4463
|
-
delete response.Message;
|
|
4464
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4465
3222
|
};
|
|
4466
3223
|
const deserializeAws_restJson1RemoveAllResourcePermissionsCommand = async (output, context) => {
|
|
4467
3224
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -4485,51 +3242,25 @@ const deserializeAws_restJson1RemoveAllResourcePermissionsCommandError = async (
|
|
|
4485
3242
|
switch (errorCode) {
|
|
4486
3243
|
case "FailedDependencyException":
|
|
4487
3244
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4488
|
-
|
|
4489
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4490
|
-
name: errorCode,
|
|
4491
|
-
$metadata: deserializeMetadata(output),
|
|
4492
|
-
};
|
|
4493
|
-
break;
|
|
3245
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4494
3246
|
case "ServiceUnavailableException":
|
|
4495
3247
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4496
|
-
|
|
4497
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4498
|
-
name: errorCode,
|
|
4499
|
-
$metadata: deserializeMetadata(output),
|
|
4500
|
-
};
|
|
4501
|
-
break;
|
|
3248
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4502
3249
|
case "UnauthorizedOperationException":
|
|
4503
3250
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4504
|
-
|
|
4505
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4506
|
-
name: errorCode,
|
|
4507
|
-
$metadata: deserializeMetadata(output),
|
|
4508
|
-
};
|
|
4509
|
-
break;
|
|
3251
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4510
3252
|
case "UnauthorizedResourceAccessException":
|
|
4511
3253
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4512
|
-
|
|
4513
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4514
|
-
name: errorCode,
|
|
4515
|
-
$metadata: deserializeMetadata(output),
|
|
4516
|
-
};
|
|
4517
|
-
break;
|
|
3254
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4518
3255
|
default:
|
|
4519
3256
|
const parsedBody = parsedOutput.body;
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
...parsedBody,
|
|
4523
|
-
name: `${errorCode}`,
|
|
4524
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3257
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3258
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4525
3259
|
$fault: "client",
|
|
4526
3260
|
$metadata: deserializeMetadata(output),
|
|
4527
|
-
};
|
|
3261
|
+
});
|
|
3262
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4528
3263
|
}
|
|
4529
|
-
const message = response.message || response.Message || errorCode;
|
|
4530
|
-
response.message = message;
|
|
4531
|
-
delete response.Message;
|
|
4532
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4533
3264
|
};
|
|
4534
3265
|
const deserializeAws_restJson1RemoveResourcePermissionCommand = async (output, context) => {
|
|
4535
3266
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -4553,51 +3284,25 @@ const deserializeAws_restJson1RemoveResourcePermissionCommandError = async (outp
|
|
|
4553
3284
|
switch (errorCode) {
|
|
4554
3285
|
case "FailedDependencyException":
|
|
4555
3286
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4556
|
-
|
|
4557
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4558
|
-
name: errorCode,
|
|
4559
|
-
$metadata: deserializeMetadata(output),
|
|
4560
|
-
};
|
|
4561
|
-
break;
|
|
3287
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4562
3288
|
case "ServiceUnavailableException":
|
|
4563
3289
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4564
|
-
|
|
4565
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4566
|
-
name: errorCode,
|
|
4567
|
-
$metadata: deserializeMetadata(output),
|
|
4568
|
-
};
|
|
4569
|
-
break;
|
|
3290
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4570
3291
|
case "UnauthorizedOperationException":
|
|
4571
3292
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4572
|
-
|
|
4573
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4574
|
-
name: errorCode,
|
|
4575
|
-
$metadata: deserializeMetadata(output),
|
|
4576
|
-
};
|
|
4577
|
-
break;
|
|
3293
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4578
3294
|
case "UnauthorizedResourceAccessException":
|
|
4579
3295
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4580
|
-
|
|
4581
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4582
|
-
name: errorCode,
|
|
4583
|
-
$metadata: deserializeMetadata(output),
|
|
4584
|
-
};
|
|
4585
|
-
break;
|
|
3296
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4586
3297
|
default:
|
|
4587
3298
|
const parsedBody = parsedOutput.body;
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
...parsedBody,
|
|
4591
|
-
name: `${errorCode}`,
|
|
4592
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3299
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3300
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4593
3301
|
$fault: "client",
|
|
4594
3302
|
$metadata: deserializeMetadata(output),
|
|
4595
|
-
};
|
|
3303
|
+
});
|
|
3304
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4596
3305
|
}
|
|
4597
|
-
const message = response.message || response.Message || errorCode;
|
|
4598
|
-
response.message = message;
|
|
4599
|
-
delete response.Message;
|
|
4600
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4601
3306
|
};
|
|
4602
3307
|
const deserializeAws_restJson1UpdateDocumentCommand = async (output, context) => {
|
|
4603
3308
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4621,99 +3326,43 @@ const deserializeAws_restJson1UpdateDocumentCommandError = async (output, contex
|
|
|
4621
3326
|
switch (errorCode) {
|
|
4622
3327
|
case "ConcurrentModificationException":
|
|
4623
3328
|
case "com.amazonaws.workdocs#ConcurrentModificationException":
|
|
4624
|
-
|
|
4625
|
-
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
4626
|
-
name: errorCode,
|
|
4627
|
-
$metadata: deserializeMetadata(output),
|
|
4628
|
-
};
|
|
4629
|
-
break;
|
|
3329
|
+
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
4630
3330
|
case "ConflictingOperationException":
|
|
4631
3331
|
case "com.amazonaws.workdocs#ConflictingOperationException":
|
|
4632
|
-
|
|
4633
|
-
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
4634
|
-
name: errorCode,
|
|
4635
|
-
$metadata: deserializeMetadata(output),
|
|
4636
|
-
};
|
|
4637
|
-
break;
|
|
3332
|
+
throw await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context);
|
|
4638
3333
|
case "EntityAlreadyExistsException":
|
|
4639
3334
|
case "com.amazonaws.workdocs#EntityAlreadyExistsException":
|
|
4640
|
-
|
|
4641
|
-
...(await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
4642
|
-
name: errorCode,
|
|
4643
|
-
$metadata: deserializeMetadata(output),
|
|
4644
|
-
};
|
|
4645
|
-
break;
|
|
3335
|
+
throw await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
4646
3336
|
case "EntityNotExistsException":
|
|
4647
3337
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
4648
|
-
|
|
4649
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
4650
|
-
name: errorCode,
|
|
4651
|
-
$metadata: deserializeMetadata(output),
|
|
4652
|
-
};
|
|
4653
|
-
break;
|
|
3338
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4654
3339
|
case "FailedDependencyException":
|
|
4655
3340
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4656
|
-
|
|
4657
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4658
|
-
name: errorCode,
|
|
4659
|
-
$metadata: deserializeMetadata(output),
|
|
4660
|
-
};
|
|
4661
|
-
break;
|
|
3341
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4662
3342
|
case "LimitExceededException":
|
|
4663
3343
|
case "com.amazonaws.workdocs#LimitExceededException":
|
|
4664
|
-
|
|
4665
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
4666
|
-
name: errorCode,
|
|
4667
|
-
$metadata: deserializeMetadata(output),
|
|
4668
|
-
};
|
|
4669
|
-
break;
|
|
3344
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
4670
3345
|
case "ProhibitedStateException":
|
|
4671
3346
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
4672
|
-
|
|
4673
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
4674
|
-
name: errorCode,
|
|
4675
|
-
$metadata: deserializeMetadata(output),
|
|
4676
|
-
};
|
|
4677
|
-
break;
|
|
3347
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
4678
3348
|
case "ServiceUnavailableException":
|
|
4679
3349
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4680
|
-
|
|
4681
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4682
|
-
name: errorCode,
|
|
4683
|
-
$metadata: deserializeMetadata(output),
|
|
4684
|
-
};
|
|
4685
|
-
break;
|
|
3350
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4686
3351
|
case "UnauthorizedOperationException":
|
|
4687
3352
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4688
|
-
|
|
4689
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4690
|
-
name: errorCode,
|
|
4691
|
-
$metadata: deserializeMetadata(output),
|
|
4692
|
-
};
|
|
4693
|
-
break;
|
|
3353
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4694
3354
|
case "UnauthorizedResourceAccessException":
|
|
4695
3355
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4696
|
-
|
|
4697
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4698
|
-
name: errorCode,
|
|
4699
|
-
$metadata: deserializeMetadata(output),
|
|
4700
|
-
};
|
|
4701
|
-
break;
|
|
3356
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4702
3357
|
default:
|
|
4703
3358
|
const parsedBody = parsedOutput.body;
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
...parsedBody,
|
|
4707
|
-
name: `${errorCode}`,
|
|
4708
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3359
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3360
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4709
3361
|
$fault: "client",
|
|
4710
3362
|
$metadata: deserializeMetadata(output),
|
|
4711
|
-
};
|
|
3363
|
+
});
|
|
3364
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4712
3365
|
}
|
|
4713
|
-
const message = response.message || response.Message || errorCode;
|
|
4714
|
-
response.message = message;
|
|
4715
|
-
delete response.Message;
|
|
4716
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4717
3366
|
};
|
|
4718
3367
|
const deserializeAws_restJson1UpdateDocumentVersionCommand = async (output, context) => {
|
|
4719
3368
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4737,83 +3386,37 @@ const deserializeAws_restJson1UpdateDocumentVersionCommandError = async (output,
|
|
|
4737
3386
|
switch (errorCode) {
|
|
4738
3387
|
case "ConcurrentModificationException":
|
|
4739
3388
|
case "com.amazonaws.workdocs#ConcurrentModificationException":
|
|
4740
|
-
|
|
4741
|
-
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
4742
|
-
name: errorCode,
|
|
4743
|
-
$metadata: deserializeMetadata(output),
|
|
4744
|
-
};
|
|
4745
|
-
break;
|
|
3389
|
+
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
4746
3390
|
case "EntityNotExistsException":
|
|
4747
3391
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
4748
|
-
|
|
4749
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
4750
|
-
name: errorCode,
|
|
4751
|
-
$metadata: deserializeMetadata(output),
|
|
4752
|
-
};
|
|
4753
|
-
break;
|
|
3392
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4754
3393
|
case "FailedDependencyException":
|
|
4755
3394
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4756
|
-
|
|
4757
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4758
|
-
name: errorCode,
|
|
4759
|
-
$metadata: deserializeMetadata(output),
|
|
4760
|
-
};
|
|
4761
|
-
break;
|
|
3395
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4762
3396
|
case "InvalidOperationException":
|
|
4763
3397
|
case "com.amazonaws.workdocs#InvalidOperationException":
|
|
4764
|
-
|
|
4765
|
-
...(await deserializeAws_restJson1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
4766
|
-
name: errorCode,
|
|
4767
|
-
$metadata: deserializeMetadata(output),
|
|
4768
|
-
};
|
|
4769
|
-
break;
|
|
3398
|
+
throw await deserializeAws_restJson1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
4770
3399
|
case "ProhibitedStateException":
|
|
4771
3400
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
4772
|
-
|
|
4773
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
4774
|
-
name: errorCode,
|
|
4775
|
-
$metadata: deserializeMetadata(output),
|
|
4776
|
-
};
|
|
4777
|
-
break;
|
|
3401
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
4778
3402
|
case "ServiceUnavailableException":
|
|
4779
3403
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4780
|
-
|
|
4781
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4782
|
-
name: errorCode,
|
|
4783
|
-
$metadata: deserializeMetadata(output),
|
|
4784
|
-
};
|
|
4785
|
-
break;
|
|
3404
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4786
3405
|
case "UnauthorizedOperationException":
|
|
4787
3406
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4788
|
-
|
|
4789
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4790
|
-
name: errorCode,
|
|
4791
|
-
$metadata: deserializeMetadata(output),
|
|
4792
|
-
};
|
|
4793
|
-
break;
|
|
3407
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4794
3408
|
case "UnauthorizedResourceAccessException":
|
|
4795
3409
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4796
|
-
|
|
4797
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4798
|
-
name: errorCode,
|
|
4799
|
-
$metadata: deserializeMetadata(output),
|
|
4800
|
-
};
|
|
4801
|
-
break;
|
|
3410
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4802
3411
|
default:
|
|
4803
3412
|
const parsedBody = parsedOutput.body;
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
...parsedBody,
|
|
4807
|
-
name: `${errorCode}`,
|
|
4808
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3413
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3414
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4809
3415
|
$fault: "client",
|
|
4810
3416
|
$metadata: deserializeMetadata(output),
|
|
4811
|
-
};
|
|
3417
|
+
});
|
|
3418
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4812
3419
|
}
|
|
4813
|
-
const message = response.message || response.Message || errorCode;
|
|
4814
|
-
response.message = message;
|
|
4815
|
-
delete response.Message;
|
|
4816
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4817
3420
|
};
|
|
4818
3421
|
const deserializeAws_restJson1UpdateFolderCommand = async (output, context) => {
|
|
4819
3422
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4837,99 +3440,43 @@ const deserializeAws_restJson1UpdateFolderCommandError = async (output, context)
|
|
|
4837
3440
|
switch (errorCode) {
|
|
4838
3441
|
case "ConcurrentModificationException":
|
|
4839
3442
|
case "com.amazonaws.workdocs#ConcurrentModificationException":
|
|
4840
|
-
|
|
4841
|
-
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
4842
|
-
name: errorCode,
|
|
4843
|
-
$metadata: deserializeMetadata(output),
|
|
4844
|
-
};
|
|
4845
|
-
break;
|
|
3443
|
+
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
4846
3444
|
case "ConflictingOperationException":
|
|
4847
3445
|
case "com.amazonaws.workdocs#ConflictingOperationException":
|
|
4848
|
-
|
|
4849
|
-
...(await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context)),
|
|
4850
|
-
name: errorCode,
|
|
4851
|
-
$metadata: deserializeMetadata(output),
|
|
4852
|
-
};
|
|
4853
|
-
break;
|
|
3446
|
+
throw await deserializeAws_restJson1ConflictingOperationExceptionResponse(parsedOutput, context);
|
|
4854
3447
|
case "EntityAlreadyExistsException":
|
|
4855
3448
|
case "com.amazonaws.workdocs#EntityAlreadyExistsException":
|
|
4856
|
-
|
|
4857
|
-
...(await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
4858
|
-
name: errorCode,
|
|
4859
|
-
$metadata: deserializeMetadata(output),
|
|
4860
|
-
};
|
|
4861
|
-
break;
|
|
3449
|
+
throw await deserializeAws_restJson1EntityAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
4862
3450
|
case "EntityNotExistsException":
|
|
4863
3451
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
4864
|
-
|
|
4865
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
4866
|
-
name: errorCode,
|
|
4867
|
-
$metadata: deserializeMetadata(output),
|
|
4868
|
-
};
|
|
4869
|
-
break;
|
|
3452
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4870
3453
|
case "FailedDependencyException":
|
|
4871
3454
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4872
|
-
|
|
4873
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4874
|
-
name: errorCode,
|
|
4875
|
-
$metadata: deserializeMetadata(output),
|
|
4876
|
-
};
|
|
4877
|
-
break;
|
|
3455
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4878
3456
|
case "LimitExceededException":
|
|
4879
3457
|
case "com.amazonaws.workdocs#LimitExceededException":
|
|
4880
|
-
|
|
4881
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
4882
|
-
name: errorCode,
|
|
4883
|
-
$metadata: deserializeMetadata(output),
|
|
4884
|
-
};
|
|
4885
|
-
break;
|
|
3458
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
4886
3459
|
case "ProhibitedStateException":
|
|
4887
3460
|
case "com.amazonaws.workdocs#ProhibitedStateException":
|
|
4888
|
-
|
|
4889
|
-
...(await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context)),
|
|
4890
|
-
name: errorCode,
|
|
4891
|
-
$metadata: deserializeMetadata(output),
|
|
4892
|
-
};
|
|
4893
|
-
break;
|
|
3461
|
+
throw await deserializeAws_restJson1ProhibitedStateExceptionResponse(parsedOutput, context);
|
|
4894
3462
|
case "ServiceUnavailableException":
|
|
4895
3463
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
4896
|
-
|
|
4897
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
4898
|
-
name: errorCode,
|
|
4899
|
-
$metadata: deserializeMetadata(output),
|
|
4900
|
-
};
|
|
4901
|
-
break;
|
|
3464
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
4902
3465
|
case "UnauthorizedOperationException":
|
|
4903
3466
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
4904
|
-
|
|
4905
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
4906
|
-
name: errorCode,
|
|
4907
|
-
$metadata: deserializeMetadata(output),
|
|
4908
|
-
};
|
|
4909
|
-
break;
|
|
3467
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
4910
3468
|
case "UnauthorizedResourceAccessException":
|
|
4911
3469
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
4912
|
-
|
|
4913
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
4914
|
-
name: errorCode,
|
|
4915
|
-
$metadata: deserializeMetadata(output),
|
|
4916
|
-
};
|
|
4917
|
-
break;
|
|
3470
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
4918
3471
|
default:
|
|
4919
3472
|
const parsedBody = parsedOutput.body;
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
...parsedBody,
|
|
4923
|
-
name: `${errorCode}`,
|
|
4924
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3473
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3474
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
4925
3475
|
$fault: "client",
|
|
4926
3476
|
$metadata: deserializeMetadata(output),
|
|
4927
|
-
};
|
|
3477
|
+
});
|
|
3478
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
4928
3479
|
}
|
|
4929
|
-
const message = response.message || response.Message || errorCode;
|
|
4930
|
-
response.message = message;
|
|
4931
|
-
delete response.Message;
|
|
4932
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
4933
3480
|
};
|
|
4934
3481
|
const deserializeAws_restJson1UpdateUserCommand = async (output, context) => {
|
|
4935
3482
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -4957,131 +3504,76 @@ const deserializeAws_restJson1UpdateUserCommandError = async (output, context) =
|
|
|
4957
3504
|
switch (errorCode) {
|
|
4958
3505
|
case "DeactivatingLastSystemUserException":
|
|
4959
3506
|
case "com.amazonaws.workdocs#DeactivatingLastSystemUserException":
|
|
4960
|
-
|
|
4961
|
-
...(await deserializeAws_restJson1DeactivatingLastSystemUserExceptionResponse(parsedOutput, context)),
|
|
4962
|
-
name: errorCode,
|
|
4963
|
-
$metadata: deserializeMetadata(output),
|
|
4964
|
-
};
|
|
4965
|
-
break;
|
|
3507
|
+
throw await deserializeAws_restJson1DeactivatingLastSystemUserExceptionResponse(parsedOutput, context);
|
|
4966
3508
|
case "EntityNotExistsException":
|
|
4967
3509
|
case "com.amazonaws.workdocs#EntityNotExistsException":
|
|
4968
|
-
|
|
4969
|
-
...(await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context)),
|
|
4970
|
-
name: errorCode,
|
|
4971
|
-
$metadata: deserializeMetadata(output),
|
|
4972
|
-
};
|
|
4973
|
-
break;
|
|
3510
|
+
throw await deserializeAws_restJson1EntityNotExistsExceptionResponse(parsedOutput, context);
|
|
4974
3511
|
case "FailedDependencyException":
|
|
4975
3512
|
case "com.amazonaws.workdocs#FailedDependencyException":
|
|
4976
|
-
|
|
4977
|
-
...(await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context)),
|
|
4978
|
-
name: errorCode,
|
|
4979
|
-
$metadata: deserializeMetadata(output),
|
|
4980
|
-
};
|
|
4981
|
-
break;
|
|
3513
|
+
throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
|
|
4982
3514
|
case "IllegalUserStateException":
|
|
4983
3515
|
case "com.amazonaws.workdocs#IllegalUserStateException":
|
|
4984
|
-
|
|
4985
|
-
...(await deserializeAws_restJson1IllegalUserStateExceptionResponse(parsedOutput, context)),
|
|
4986
|
-
name: errorCode,
|
|
4987
|
-
$metadata: deserializeMetadata(output),
|
|
4988
|
-
};
|
|
4989
|
-
break;
|
|
3516
|
+
throw await deserializeAws_restJson1IllegalUserStateExceptionResponse(parsedOutput, context);
|
|
4990
3517
|
case "InvalidArgumentException":
|
|
4991
3518
|
case "com.amazonaws.workdocs#InvalidArgumentException":
|
|
4992
|
-
|
|
4993
|
-
...(await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)),
|
|
4994
|
-
name: errorCode,
|
|
4995
|
-
$metadata: deserializeMetadata(output),
|
|
4996
|
-
};
|
|
4997
|
-
break;
|
|
3519
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
4998
3520
|
case "ServiceUnavailableException":
|
|
4999
3521
|
case "com.amazonaws.workdocs#ServiceUnavailableException":
|
|
5000
|
-
|
|
5001
|
-
...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
5002
|
-
name: errorCode,
|
|
5003
|
-
$metadata: deserializeMetadata(output),
|
|
5004
|
-
};
|
|
5005
|
-
break;
|
|
3522
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
5006
3523
|
case "UnauthorizedOperationException":
|
|
5007
3524
|
case "com.amazonaws.workdocs#UnauthorizedOperationException":
|
|
5008
|
-
|
|
5009
|
-
...(await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context)),
|
|
5010
|
-
name: errorCode,
|
|
5011
|
-
$metadata: deserializeMetadata(output),
|
|
5012
|
-
};
|
|
5013
|
-
break;
|
|
3525
|
+
throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
|
|
5014
3526
|
case "UnauthorizedResourceAccessException":
|
|
5015
3527
|
case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
|
|
5016
|
-
|
|
5017
|
-
...(await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context)),
|
|
5018
|
-
name: errorCode,
|
|
5019
|
-
$metadata: deserializeMetadata(output),
|
|
5020
|
-
};
|
|
5021
|
-
break;
|
|
3528
|
+
throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
|
|
5022
3529
|
default:
|
|
5023
3530
|
const parsedBody = parsedOutput.body;
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
...parsedBody,
|
|
5027
|
-
name: `${errorCode}`,
|
|
5028
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3531
|
+
response = new WorkDocsServiceException_1.WorkDocsServiceException({
|
|
3532
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
5029
3533
|
$fault: "client",
|
|
5030
3534
|
$metadata: deserializeMetadata(output),
|
|
5031
|
-
};
|
|
3535
|
+
});
|
|
3536
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
5032
3537
|
}
|
|
5033
|
-
const message = response.message || response.Message || errorCode;
|
|
5034
|
-
response.message = message;
|
|
5035
|
-
delete response.Message;
|
|
5036
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
5037
3538
|
};
|
|
5038
3539
|
const deserializeAws_restJson1ConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
|
|
5039
|
-
const contents = {
|
|
5040
|
-
name: "ConcurrentModificationException",
|
|
5041
|
-
$fault: "client",
|
|
5042
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5043
|
-
Message: undefined,
|
|
5044
|
-
};
|
|
3540
|
+
const contents = {};
|
|
5045
3541
|
const data = parsedOutput.body;
|
|
5046
3542
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5047
3543
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5048
3544
|
}
|
|
5049
|
-
|
|
3545
|
+
const exception = new models_0_1.ConcurrentModificationException({
|
|
3546
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3547
|
+
...contents,
|
|
3548
|
+
});
|
|
3549
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5050
3550
|
};
|
|
5051
3551
|
const deserializeAws_restJson1ConflictingOperationExceptionResponse = async (parsedOutput, context) => {
|
|
5052
|
-
const contents = {
|
|
5053
|
-
name: "ConflictingOperationException",
|
|
5054
|
-
$fault: "client",
|
|
5055
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5056
|
-
Message: undefined,
|
|
5057
|
-
};
|
|
3552
|
+
const contents = {};
|
|
5058
3553
|
const data = parsedOutput.body;
|
|
5059
3554
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5060
3555
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5061
3556
|
}
|
|
5062
|
-
|
|
3557
|
+
const exception = new models_0_1.ConflictingOperationException({
|
|
3558
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3559
|
+
...contents,
|
|
3560
|
+
});
|
|
3561
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5063
3562
|
};
|
|
5064
3563
|
const deserializeAws_restJson1CustomMetadataLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
5065
|
-
const contents = {
|
|
5066
|
-
name: "CustomMetadataLimitExceededException",
|
|
5067
|
-
$fault: "client",
|
|
5068
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5069
|
-
Message: undefined,
|
|
5070
|
-
};
|
|
3564
|
+
const contents = {};
|
|
5071
3565
|
const data = parsedOutput.body;
|
|
5072
3566
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5073
3567
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5074
3568
|
}
|
|
5075
|
-
|
|
3569
|
+
const exception = new models_0_1.CustomMetadataLimitExceededException({
|
|
3570
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3571
|
+
...contents,
|
|
3572
|
+
});
|
|
3573
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5076
3574
|
};
|
|
5077
3575
|
const deserializeAws_restJson1DeactivatingLastSystemUserExceptionResponse = async (parsedOutput, context) => {
|
|
5078
|
-
const contents = {
|
|
5079
|
-
name: "DeactivatingLastSystemUserException",
|
|
5080
|
-
$fault: "client",
|
|
5081
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5082
|
-
Code: undefined,
|
|
5083
|
-
Message: undefined,
|
|
5084
|
-
};
|
|
3576
|
+
const contents = {};
|
|
5085
3577
|
const data = parsedOutput.body;
|
|
5086
3578
|
if (data.Code !== undefined && data.Code !== null) {
|
|
5087
3579
|
contents.Code = smithy_client_1.expectString(data.Code);
|
|
@@ -5089,55 +3581,50 @@ const deserializeAws_restJson1DeactivatingLastSystemUserExceptionResponse = asyn
|
|
|
5089
3581
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5090
3582
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5091
3583
|
}
|
|
5092
|
-
|
|
3584
|
+
const exception = new models_0_1.DeactivatingLastSystemUserException({
|
|
3585
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3586
|
+
...contents,
|
|
3587
|
+
});
|
|
3588
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5093
3589
|
};
|
|
5094
3590
|
const deserializeAws_restJson1DocumentLockedForCommentsExceptionResponse = async (parsedOutput, context) => {
|
|
5095
|
-
const contents = {
|
|
5096
|
-
name: "DocumentLockedForCommentsException",
|
|
5097
|
-
$fault: "client",
|
|
5098
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5099
|
-
Message: undefined,
|
|
5100
|
-
};
|
|
3591
|
+
const contents = {};
|
|
5101
3592
|
const data = parsedOutput.body;
|
|
5102
3593
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5103
3594
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5104
3595
|
}
|
|
5105
|
-
|
|
3596
|
+
const exception = new models_0_1.DocumentLockedForCommentsException({
|
|
3597
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3598
|
+
...contents,
|
|
3599
|
+
});
|
|
3600
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5106
3601
|
};
|
|
5107
3602
|
const deserializeAws_restJson1DraftUploadOutOfSyncExceptionResponse = async (parsedOutput, context) => {
|
|
5108
|
-
const contents = {
|
|
5109
|
-
name: "DraftUploadOutOfSyncException",
|
|
5110
|
-
$fault: "client",
|
|
5111
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5112
|
-
Message: undefined,
|
|
5113
|
-
};
|
|
3603
|
+
const contents = {};
|
|
5114
3604
|
const data = parsedOutput.body;
|
|
5115
3605
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5116
3606
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5117
3607
|
}
|
|
5118
|
-
|
|
3608
|
+
const exception = new models_0_1.DraftUploadOutOfSyncException({
|
|
3609
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3610
|
+
...contents,
|
|
3611
|
+
});
|
|
3612
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5119
3613
|
};
|
|
5120
3614
|
const deserializeAws_restJson1EntityAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
|
|
5121
|
-
const contents = {
|
|
5122
|
-
name: "EntityAlreadyExistsException",
|
|
5123
|
-
$fault: "client",
|
|
5124
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5125
|
-
Message: undefined,
|
|
5126
|
-
};
|
|
3615
|
+
const contents = {};
|
|
5127
3616
|
const data = parsedOutput.body;
|
|
5128
3617
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5129
3618
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5130
3619
|
}
|
|
5131
|
-
|
|
3620
|
+
const exception = new models_0_1.EntityAlreadyExistsException({
|
|
3621
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3622
|
+
...contents,
|
|
3623
|
+
});
|
|
3624
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5132
3625
|
};
|
|
5133
3626
|
const deserializeAws_restJson1EntityNotExistsExceptionResponse = async (parsedOutput, context) => {
|
|
5134
|
-
const contents = {
|
|
5135
|
-
name: "EntityNotExistsException",
|
|
5136
|
-
$fault: "client",
|
|
5137
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5138
|
-
EntityIds: undefined,
|
|
5139
|
-
Message: undefined,
|
|
5140
|
-
};
|
|
3627
|
+
const contents = {};
|
|
5141
3628
|
const data = parsedOutput.body;
|
|
5142
3629
|
if (data.EntityIds !== undefined && data.EntityIds !== null) {
|
|
5143
3630
|
contents.EntityIds = deserializeAws_restJson1EntityIdList(data.EntityIds, context);
|
|
@@ -5145,211 +3632,194 @@ const deserializeAws_restJson1EntityNotExistsExceptionResponse = async (parsedOu
|
|
|
5145
3632
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5146
3633
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5147
3634
|
}
|
|
5148
|
-
|
|
3635
|
+
const exception = new models_0_1.EntityNotExistsException({
|
|
3636
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3637
|
+
...contents,
|
|
3638
|
+
});
|
|
3639
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5149
3640
|
};
|
|
5150
3641
|
const deserializeAws_restJson1FailedDependencyExceptionResponse = async (parsedOutput, context) => {
|
|
5151
|
-
const contents = {
|
|
5152
|
-
name: "FailedDependencyException",
|
|
5153
|
-
$fault: "client",
|
|
5154
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5155
|
-
Message: undefined,
|
|
5156
|
-
};
|
|
3642
|
+
const contents = {};
|
|
5157
3643
|
const data = parsedOutput.body;
|
|
5158
3644
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5159
3645
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5160
3646
|
}
|
|
5161
|
-
|
|
3647
|
+
const exception = new models_0_1.FailedDependencyException({
|
|
3648
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3649
|
+
...contents,
|
|
3650
|
+
});
|
|
3651
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5162
3652
|
};
|
|
5163
3653
|
const deserializeAws_restJson1IllegalUserStateExceptionResponse = async (parsedOutput, context) => {
|
|
5164
|
-
const contents = {
|
|
5165
|
-
name: "IllegalUserStateException",
|
|
5166
|
-
$fault: "client",
|
|
5167
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5168
|
-
Message: undefined,
|
|
5169
|
-
};
|
|
3654
|
+
const contents = {};
|
|
5170
3655
|
const data = parsedOutput.body;
|
|
5171
3656
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5172
3657
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5173
3658
|
}
|
|
5174
|
-
|
|
3659
|
+
const exception = new models_0_1.IllegalUserStateException({
|
|
3660
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3661
|
+
...contents,
|
|
3662
|
+
});
|
|
3663
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5175
3664
|
};
|
|
5176
3665
|
const deserializeAws_restJson1InvalidArgumentExceptionResponse = async (parsedOutput, context) => {
|
|
5177
|
-
const contents = {
|
|
5178
|
-
name: "InvalidArgumentException",
|
|
5179
|
-
$fault: "client",
|
|
5180
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5181
|
-
Message: undefined,
|
|
5182
|
-
};
|
|
3666
|
+
const contents = {};
|
|
5183
3667
|
const data = parsedOutput.body;
|
|
5184
3668
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5185
3669
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5186
3670
|
}
|
|
5187
|
-
|
|
3671
|
+
const exception = new models_0_1.InvalidArgumentException({
|
|
3672
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3673
|
+
...contents,
|
|
3674
|
+
});
|
|
3675
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5188
3676
|
};
|
|
5189
3677
|
const deserializeAws_restJson1InvalidCommentOperationExceptionResponse = async (parsedOutput, context) => {
|
|
5190
|
-
const contents = {
|
|
5191
|
-
name: "InvalidCommentOperationException",
|
|
5192
|
-
$fault: "client",
|
|
5193
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5194
|
-
Message: undefined,
|
|
5195
|
-
};
|
|
3678
|
+
const contents = {};
|
|
5196
3679
|
const data = parsedOutput.body;
|
|
5197
3680
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5198
3681
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5199
3682
|
}
|
|
5200
|
-
|
|
3683
|
+
const exception = new models_0_1.InvalidCommentOperationException({
|
|
3684
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3685
|
+
...contents,
|
|
3686
|
+
});
|
|
3687
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5201
3688
|
};
|
|
5202
3689
|
const deserializeAws_restJson1InvalidOperationExceptionResponse = async (parsedOutput, context) => {
|
|
5203
|
-
const contents = {
|
|
5204
|
-
name: "InvalidOperationException",
|
|
5205
|
-
$fault: "client",
|
|
5206
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5207
|
-
Message: undefined,
|
|
5208
|
-
};
|
|
3690
|
+
const contents = {};
|
|
5209
3691
|
const data = parsedOutput.body;
|
|
5210
3692
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5211
3693
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5212
3694
|
}
|
|
5213
|
-
|
|
3695
|
+
const exception = new models_0_1.InvalidOperationException({
|
|
3696
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3697
|
+
...contents,
|
|
3698
|
+
});
|
|
3699
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5214
3700
|
};
|
|
5215
3701
|
const deserializeAws_restJson1InvalidPasswordExceptionResponse = async (parsedOutput, context) => {
|
|
5216
|
-
const contents = {
|
|
5217
|
-
name: "InvalidPasswordException",
|
|
5218
|
-
$fault: "client",
|
|
5219
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5220
|
-
Message: undefined,
|
|
5221
|
-
};
|
|
3702
|
+
const contents = {};
|
|
5222
3703
|
const data = parsedOutput.body;
|
|
5223
3704
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5224
3705
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5225
3706
|
}
|
|
5226
|
-
|
|
3707
|
+
const exception = new models_0_1.InvalidPasswordException({
|
|
3708
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3709
|
+
...contents,
|
|
3710
|
+
});
|
|
3711
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5227
3712
|
};
|
|
5228
3713
|
const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
5229
|
-
const contents = {
|
|
5230
|
-
name: "LimitExceededException",
|
|
5231
|
-
$fault: "client",
|
|
5232
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5233
|
-
Message: undefined,
|
|
5234
|
-
};
|
|
3714
|
+
const contents = {};
|
|
5235
3715
|
const data = parsedOutput.body;
|
|
5236
3716
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5237
3717
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5238
3718
|
}
|
|
5239
|
-
|
|
3719
|
+
const exception = new models_0_1.LimitExceededException({
|
|
3720
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3721
|
+
...contents,
|
|
3722
|
+
});
|
|
3723
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5240
3724
|
};
|
|
5241
3725
|
const deserializeAws_restJson1ProhibitedStateExceptionResponse = async (parsedOutput, context) => {
|
|
5242
|
-
const contents = {
|
|
5243
|
-
name: "ProhibitedStateException",
|
|
5244
|
-
$fault: "client",
|
|
5245
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5246
|
-
Message: undefined,
|
|
5247
|
-
};
|
|
3726
|
+
const contents = {};
|
|
5248
3727
|
const data = parsedOutput.body;
|
|
5249
3728
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5250
3729
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5251
3730
|
}
|
|
5252
|
-
|
|
3731
|
+
const exception = new models_0_1.ProhibitedStateException({
|
|
3732
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3733
|
+
...contents,
|
|
3734
|
+
});
|
|
3735
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5253
3736
|
};
|
|
5254
3737
|
const deserializeAws_restJson1RequestedEntityTooLargeExceptionResponse = async (parsedOutput, context) => {
|
|
5255
|
-
const contents = {
|
|
5256
|
-
name: "RequestedEntityTooLargeException",
|
|
5257
|
-
$fault: "client",
|
|
5258
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5259
|
-
Message: undefined,
|
|
5260
|
-
};
|
|
3738
|
+
const contents = {};
|
|
5261
3739
|
const data = parsedOutput.body;
|
|
5262
3740
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5263
3741
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5264
3742
|
}
|
|
5265
|
-
|
|
3743
|
+
const exception = new models_0_1.RequestedEntityTooLargeException({
|
|
3744
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3745
|
+
...contents,
|
|
3746
|
+
});
|
|
3747
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5266
3748
|
};
|
|
5267
3749
|
const deserializeAws_restJson1ResourceAlreadyCheckedOutExceptionResponse = async (parsedOutput, context) => {
|
|
5268
|
-
const contents = {
|
|
5269
|
-
name: "ResourceAlreadyCheckedOutException",
|
|
5270
|
-
$fault: "client",
|
|
5271
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5272
|
-
Message: undefined,
|
|
5273
|
-
};
|
|
3750
|
+
const contents = {};
|
|
5274
3751
|
const data = parsedOutput.body;
|
|
5275
3752
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5276
3753
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5277
3754
|
}
|
|
5278
|
-
|
|
3755
|
+
const exception = new models_0_1.ResourceAlreadyCheckedOutException({
|
|
3756
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3757
|
+
...contents,
|
|
3758
|
+
});
|
|
3759
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5279
3760
|
};
|
|
5280
3761
|
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
5281
|
-
const contents = {
|
|
5282
|
-
name: "ServiceUnavailableException",
|
|
5283
|
-
$fault: "server",
|
|
5284
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5285
|
-
Message: undefined,
|
|
5286
|
-
};
|
|
3762
|
+
const contents = {};
|
|
5287
3763
|
const data = parsedOutput.body;
|
|
5288
3764
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5289
3765
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5290
3766
|
}
|
|
5291
|
-
|
|
3767
|
+
const exception = new models_0_1.ServiceUnavailableException({
|
|
3768
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3769
|
+
...contents,
|
|
3770
|
+
});
|
|
3771
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5292
3772
|
};
|
|
5293
3773
|
const deserializeAws_restJson1StorageLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
5294
|
-
const contents = {
|
|
5295
|
-
name: "StorageLimitExceededException",
|
|
5296
|
-
$fault: "client",
|
|
5297
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5298
|
-
Message: undefined,
|
|
5299
|
-
};
|
|
3774
|
+
const contents = {};
|
|
5300
3775
|
const data = parsedOutput.body;
|
|
5301
3776
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5302
3777
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5303
3778
|
}
|
|
5304
|
-
|
|
3779
|
+
const exception = new models_0_1.StorageLimitExceededException({
|
|
3780
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3781
|
+
...contents,
|
|
3782
|
+
});
|
|
3783
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5305
3784
|
};
|
|
5306
3785
|
const deserializeAws_restJson1StorageLimitWillExceedExceptionResponse = async (parsedOutput, context) => {
|
|
5307
|
-
const contents = {
|
|
5308
|
-
name: "StorageLimitWillExceedException",
|
|
5309
|
-
$fault: "client",
|
|
5310
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5311
|
-
Message: undefined,
|
|
5312
|
-
};
|
|
3786
|
+
const contents = {};
|
|
5313
3787
|
const data = parsedOutput.body;
|
|
5314
3788
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5315
3789
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5316
3790
|
}
|
|
5317
|
-
|
|
3791
|
+
const exception = new models_0_1.StorageLimitWillExceedException({
|
|
3792
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3793
|
+
...contents,
|
|
3794
|
+
});
|
|
3795
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5318
3796
|
};
|
|
5319
3797
|
const deserializeAws_restJson1TooManyLabelsExceptionResponse = async (parsedOutput, context) => {
|
|
5320
|
-
const contents = {
|
|
5321
|
-
name: "TooManyLabelsException",
|
|
5322
|
-
$fault: "client",
|
|
5323
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5324
|
-
Message: undefined,
|
|
5325
|
-
};
|
|
3798
|
+
const contents = {};
|
|
5326
3799
|
const data = parsedOutput.body;
|
|
5327
3800
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5328
3801
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5329
3802
|
}
|
|
5330
|
-
|
|
3803
|
+
const exception = new models_0_1.TooManyLabelsException({
|
|
3804
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3805
|
+
...contents,
|
|
3806
|
+
});
|
|
3807
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5331
3808
|
};
|
|
5332
3809
|
const deserializeAws_restJson1TooManySubscriptionsExceptionResponse = async (parsedOutput, context) => {
|
|
5333
|
-
const contents = {
|
|
5334
|
-
name: "TooManySubscriptionsException",
|
|
5335
|
-
$fault: "client",
|
|
5336
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5337
|
-
Message: undefined,
|
|
5338
|
-
};
|
|
3810
|
+
const contents = {};
|
|
5339
3811
|
const data = parsedOutput.body;
|
|
5340
3812
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5341
3813
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5342
3814
|
}
|
|
5343
|
-
|
|
3815
|
+
const exception = new models_0_1.TooManySubscriptionsException({
|
|
3816
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3817
|
+
...contents,
|
|
3818
|
+
});
|
|
3819
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5344
3820
|
};
|
|
5345
3821
|
const deserializeAws_restJson1UnauthorizedOperationExceptionResponse = async (parsedOutput, context) => {
|
|
5346
|
-
const contents = {
|
|
5347
|
-
name: "UnauthorizedOperationException",
|
|
5348
|
-
$fault: "client",
|
|
5349
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5350
|
-
Code: undefined,
|
|
5351
|
-
Message: undefined,
|
|
5352
|
-
};
|
|
3822
|
+
const contents = {};
|
|
5353
3823
|
const data = parsedOutput.body;
|
|
5354
3824
|
if (data.Code !== undefined && data.Code !== null) {
|
|
5355
3825
|
contents.Code = smithy_client_1.expectString(data.Code);
|
|
@@ -5357,20 +3827,23 @@ const deserializeAws_restJson1UnauthorizedOperationExceptionResponse = async (pa
|
|
|
5357
3827
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5358
3828
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5359
3829
|
}
|
|
5360
|
-
|
|
3830
|
+
const exception = new models_0_1.UnauthorizedOperationException({
|
|
3831
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3832
|
+
...contents,
|
|
3833
|
+
});
|
|
3834
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5361
3835
|
};
|
|
5362
3836
|
const deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse = async (parsedOutput, context) => {
|
|
5363
|
-
const contents = {
|
|
5364
|
-
name: "UnauthorizedResourceAccessException",
|
|
5365
|
-
$fault: "client",
|
|
5366
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
5367
|
-
Message: undefined,
|
|
5368
|
-
};
|
|
3837
|
+
const contents = {};
|
|
5369
3838
|
const data = parsedOutput.body;
|
|
5370
3839
|
if (data.Message !== undefined && data.Message !== null) {
|
|
5371
3840
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
5372
3841
|
}
|
|
5373
|
-
|
|
3842
|
+
const exception = new models_0_1.UnauthorizedResourceAccessException({
|
|
3843
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3844
|
+
...contents,
|
|
3845
|
+
});
|
|
3846
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
5374
3847
|
};
|
|
5375
3848
|
const serializeAws_restJson1CustomMetadataMap = (input, context) => {
|
|
5376
3849
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
@@ -5466,7 +3939,7 @@ const deserializeAws_restJson1Comment = (output, context) => {
|
|
|
5466
3939
|
};
|
|
5467
3940
|
};
|
|
5468
3941
|
const deserializeAws_restJson1CommentList = (output, context) => {
|
|
5469
|
-
|
|
3942
|
+
const retVal = (output || [])
|
|
5470
3943
|
.filter((e) => e != null)
|
|
5471
3944
|
.map((entry) => {
|
|
5472
3945
|
if (entry === null) {
|
|
@@ -5474,6 +3947,7 @@ const deserializeAws_restJson1CommentList = (output, context) => {
|
|
|
5474
3947
|
}
|
|
5475
3948
|
return deserializeAws_restJson1Comment(entry, context);
|
|
5476
3949
|
});
|
|
3950
|
+
return retVal;
|
|
5477
3951
|
};
|
|
5478
3952
|
const deserializeAws_restJson1CommentMetadata = (output, context) => {
|
|
5479
3953
|
return {
|
|
@@ -5520,7 +3994,7 @@ const deserializeAws_restJson1DocumentMetadata = (output, context) => {
|
|
|
5520
3994
|
};
|
|
5521
3995
|
};
|
|
5522
3996
|
const deserializeAws_restJson1DocumentMetadataList = (output, context) => {
|
|
5523
|
-
|
|
3997
|
+
const retVal = (output || [])
|
|
5524
3998
|
.filter((e) => e != null)
|
|
5525
3999
|
.map((entry) => {
|
|
5526
4000
|
if (entry === null) {
|
|
@@ -5528,6 +4002,7 @@ const deserializeAws_restJson1DocumentMetadataList = (output, context) => {
|
|
|
5528
4002
|
}
|
|
5529
4003
|
return deserializeAws_restJson1DocumentMetadata(entry, context);
|
|
5530
4004
|
});
|
|
4005
|
+
return retVal;
|
|
5531
4006
|
};
|
|
5532
4007
|
const deserializeAws_restJson1DocumentSourceUrlMap = (output, context) => {
|
|
5533
4008
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -5581,7 +4056,7 @@ const deserializeAws_restJson1DocumentVersionMetadata = (output, context) => {
|
|
|
5581
4056
|
};
|
|
5582
4057
|
};
|
|
5583
4058
|
const deserializeAws_restJson1DocumentVersionMetadataList = (output, context) => {
|
|
5584
|
-
|
|
4059
|
+
const retVal = (output || [])
|
|
5585
4060
|
.filter((e) => e != null)
|
|
5586
4061
|
.map((entry) => {
|
|
5587
4062
|
if (entry === null) {
|
|
@@ -5589,9 +4064,10 @@ const deserializeAws_restJson1DocumentVersionMetadataList = (output, context) =>
|
|
|
5589
4064
|
}
|
|
5590
4065
|
return deserializeAws_restJson1DocumentVersionMetadata(entry, context);
|
|
5591
4066
|
});
|
|
4067
|
+
return retVal;
|
|
5592
4068
|
};
|
|
5593
4069
|
const deserializeAws_restJson1EntityIdList = (output, context) => {
|
|
5594
|
-
|
|
4070
|
+
const retVal = (output || [])
|
|
5595
4071
|
.filter((e) => e != null)
|
|
5596
4072
|
.map((entry) => {
|
|
5597
4073
|
if (entry === null) {
|
|
@@ -5599,6 +4075,7 @@ const deserializeAws_restJson1EntityIdList = (output, context) => {
|
|
|
5599
4075
|
}
|
|
5600
4076
|
return smithy_client_1.expectString(entry);
|
|
5601
4077
|
});
|
|
4078
|
+
return retVal;
|
|
5602
4079
|
};
|
|
5603
4080
|
const deserializeAws_restJson1FolderMetadata = (output, context) => {
|
|
5604
4081
|
return {
|
|
@@ -5622,7 +4099,7 @@ const deserializeAws_restJson1FolderMetadata = (output, context) => {
|
|
|
5622
4099
|
};
|
|
5623
4100
|
};
|
|
5624
4101
|
const deserializeAws_restJson1FolderMetadataList = (output, context) => {
|
|
5625
|
-
|
|
4102
|
+
const retVal = (output || [])
|
|
5626
4103
|
.filter((e) => e != null)
|
|
5627
4104
|
.map((entry) => {
|
|
5628
4105
|
if (entry === null) {
|
|
@@ -5630,6 +4107,7 @@ const deserializeAws_restJson1FolderMetadataList = (output, context) => {
|
|
|
5630
4107
|
}
|
|
5631
4108
|
return deserializeAws_restJson1FolderMetadata(entry, context);
|
|
5632
4109
|
});
|
|
4110
|
+
return retVal;
|
|
5633
4111
|
};
|
|
5634
4112
|
const deserializeAws_restJson1GroupMetadata = (output, context) => {
|
|
5635
4113
|
return {
|
|
@@ -5638,7 +4116,7 @@ const deserializeAws_restJson1GroupMetadata = (output, context) => {
|
|
|
5638
4116
|
};
|
|
5639
4117
|
};
|
|
5640
4118
|
const deserializeAws_restJson1GroupMetadataList = (output, context) => {
|
|
5641
|
-
|
|
4119
|
+
const retVal = (output || [])
|
|
5642
4120
|
.filter((e) => e != null)
|
|
5643
4121
|
.map((entry) => {
|
|
5644
4122
|
if (entry === null) {
|
|
@@ -5646,9 +4124,10 @@ const deserializeAws_restJson1GroupMetadataList = (output, context) => {
|
|
|
5646
4124
|
}
|
|
5647
4125
|
return deserializeAws_restJson1GroupMetadata(entry, context);
|
|
5648
4126
|
});
|
|
4127
|
+
return retVal;
|
|
5649
4128
|
};
|
|
5650
4129
|
const deserializeAws_restJson1OrganizationUserList = (output, context) => {
|
|
5651
|
-
|
|
4130
|
+
const retVal = (output || [])
|
|
5652
4131
|
.filter((e) => e != null)
|
|
5653
4132
|
.map((entry) => {
|
|
5654
4133
|
if (entry === null) {
|
|
@@ -5656,6 +4135,7 @@ const deserializeAws_restJson1OrganizationUserList = (output, context) => {
|
|
|
5656
4135
|
}
|
|
5657
4136
|
return deserializeAws_restJson1User(entry, context);
|
|
5658
4137
|
});
|
|
4138
|
+
return retVal;
|
|
5659
4139
|
};
|
|
5660
4140
|
const deserializeAws_restJson1Participants = (output, context) => {
|
|
5661
4141
|
return {
|
|
@@ -5674,7 +4154,7 @@ const deserializeAws_restJson1PermissionInfo = (output, context) => {
|
|
|
5674
4154
|
};
|
|
5675
4155
|
};
|
|
5676
4156
|
const deserializeAws_restJson1PermissionInfoList = (output, context) => {
|
|
5677
|
-
|
|
4157
|
+
const retVal = (output || [])
|
|
5678
4158
|
.filter((e) => e != null)
|
|
5679
4159
|
.map((entry) => {
|
|
5680
4160
|
if (entry === null) {
|
|
@@ -5682,6 +4162,7 @@ const deserializeAws_restJson1PermissionInfoList = (output, context) => {
|
|
|
5682
4162
|
}
|
|
5683
4163
|
return deserializeAws_restJson1PermissionInfo(entry, context);
|
|
5684
4164
|
});
|
|
4165
|
+
return retVal;
|
|
5685
4166
|
};
|
|
5686
4167
|
const deserializeAws_restJson1Principal = (output, context) => {
|
|
5687
4168
|
return {
|
|
@@ -5693,7 +4174,7 @@ const deserializeAws_restJson1Principal = (output, context) => {
|
|
|
5693
4174
|
};
|
|
5694
4175
|
};
|
|
5695
4176
|
const deserializeAws_restJson1PrincipalList = (output, context) => {
|
|
5696
|
-
|
|
4177
|
+
const retVal = (output || [])
|
|
5697
4178
|
.filter((e) => e != null)
|
|
5698
4179
|
.map((entry) => {
|
|
5699
4180
|
if (entry === null) {
|
|
@@ -5701,6 +4182,7 @@ const deserializeAws_restJson1PrincipalList = (output, context) => {
|
|
|
5701
4182
|
}
|
|
5702
4183
|
return deserializeAws_restJson1Principal(entry, context);
|
|
5703
4184
|
});
|
|
4185
|
+
return retVal;
|
|
5704
4186
|
};
|
|
5705
4187
|
const deserializeAws_restJson1ResourceMetadata = (output, context) => {
|
|
5706
4188
|
return {
|
|
@@ -5729,7 +4211,7 @@ const deserializeAws_restJson1ResourcePathComponent = (output, context) => {
|
|
|
5729
4211
|
};
|
|
5730
4212
|
};
|
|
5731
4213
|
const deserializeAws_restJson1ResourcePathComponentList = (output, context) => {
|
|
5732
|
-
|
|
4214
|
+
const retVal = (output || [])
|
|
5733
4215
|
.filter((e) => e != null)
|
|
5734
4216
|
.map((entry) => {
|
|
5735
4217
|
if (entry === null) {
|
|
@@ -5737,9 +4219,10 @@ const deserializeAws_restJson1ResourcePathComponentList = (output, context) => {
|
|
|
5737
4219
|
}
|
|
5738
4220
|
return deserializeAws_restJson1ResourcePathComponent(entry, context);
|
|
5739
4221
|
});
|
|
4222
|
+
return retVal;
|
|
5740
4223
|
};
|
|
5741
4224
|
const deserializeAws_restJson1SharedLabels = (output, context) => {
|
|
5742
|
-
|
|
4225
|
+
const retVal = (output || [])
|
|
5743
4226
|
.filter((e) => e != null)
|
|
5744
4227
|
.map((entry) => {
|
|
5745
4228
|
if (entry === null) {
|
|
@@ -5747,6 +4230,7 @@ const deserializeAws_restJson1SharedLabels = (output, context) => {
|
|
|
5747
4230
|
}
|
|
5748
4231
|
return smithy_client_1.expectString(entry);
|
|
5749
4232
|
});
|
|
4233
|
+
return retVal;
|
|
5750
4234
|
};
|
|
5751
4235
|
const deserializeAws_restJson1ShareResult = (output, context) => {
|
|
5752
4236
|
return {
|
|
@@ -5759,7 +4243,7 @@ const deserializeAws_restJson1ShareResult = (output, context) => {
|
|
|
5759
4243
|
};
|
|
5760
4244
|
};
|
|
5761
4245
|
const deserializeAws_restJson1ShareResultsList = (output, context) => {
|
|
5762
|
-
|
|
4246
|
+
const retVal = (output || [])
|
|
5763
4247
|
.filter((e) => e != null)
|
|
5764
4248
|
.map((entry) => {
|
|
5765
4249
|
if (entry === null) {
|
|
@@ -5767,6 +4251,7 @@ const deserializeAws_restJson1ShareResultsList = (output, context) => {
|
|
|
5767
4251
|
}
|
|
5768
4252
|
return deserializeAws_restJson1ShareResult(entry, context);
|
|
5769
4253
|
});
|
|
4254
|
+
return retVal;
|
|
5770
4255
|
};
|
|
5771
4256
|
const deserializeAws_restJson1SignedHeaderMap = (output, context) => {
|
|
5772
4257
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -5793,7 +4278,7 @@ const deserializeAws_restJson1Subscription = (output, context) => {
|
|
|
5793
4278
|
};
|
|
5794
4279
|
};
|
|
5795
4280
|
const deserializeAws_restJson1SubscriptionList = (output, context) => {
|
|
5796
|
-
|
|
4281
|
+
const retVal = (output || [])
|
|
5797
4282
|
.filter((e) => e != null)
|
|
5798
4283
|
.map((entry) => {
|
|
5799
4284
|
if (entry === null) {
|
|
@@ -5801,6 +4286,7 @@ const deserializeAws_restJson1SubscriptionList = (output, context) => {
|
|
|
5801
4286
|
}
|
|
5802
4287
|
return deserializeAws_restJson1Subscription(entry, context);
|
|
5803
4288
|
});
|
|
4289
|
+
return retVal;
|
|
5804
4290
|
};
|
|
5805
4291
|
const deserializeAws_restJson1UploadMetadata = (output, context) => {
|
|
5806
4292
|
return {
|
|
@@ -5836,7 +4322,7 @@ const deserializeAws_restJson1User = (output, context) => {
|
|
|
5836
4322
|
};
|
|
5837
4323
|
};
|
|
5838
4324
|
const deserializeAws_restJson1UserActivities = (output, context) => {
|
|
5839
|
-
|
|
4325
|
+
const retVal = (output || [])
|
|
5840
4326
|
.filter((e) => e != null)
|
|
5841
4327
|
.map((entry) => {
|
|
5842
4328
|
if (entry === null) {
|
|
@@ -5844,6 +4330,7 @@ const deserializeAws_restJson1UserActivities = (output, context) => {
|
|
|
5844
4330
|
}
|
|
5845
4331
|
return deserializeAws_restJson1Activity(entry, context);
|
|
5846
4332
|
});
|
|
4333
|
+
return retVal;
|
|
5847
4334
|
};
|
|
5848
4335
|
const deserializeAws_restJson1UserMetadata = (output, context) => {
|
|
5849
4336
|
return {
|
|
@@ -5855,7 +4342,7 @@ const deserializeAws_restJson1UserMetadata = (output, context) => {
|
|
|
5855
4342
|
};
|
|
5856
4343
|
};
|
|
5857
4344
|
const deserializeAws_restJson1UserMetadataList = (output, context) => {
|
|
5858
|
-
|
|
4345
|
+
const retVal = (output || [])
|
|
5859
4346
|
.filter((e) => e != null)
|
|
5860
4347
|
.map((entry) => {
|
|
5861
4348
|
if (entry === null) {
|
|
@@ -5863,6 +4350,7 @@ const deserializeAws_restJson1UserMetadataList = (output, context) => {
|
|
|
5863
4350
|
}
|
|
5864
4351
|
return deserializeAws_restJson1UserMetadata(entry, context);
|
|
5865
4352
|
});
|
|
4353
|
+
return retVal;
|
|
5866
4354
|
};
|
|
5867
4355
|
const deserializeAws_restJson1UserStorageMetadata = (output, context) => {
|
|
5868
4356
|
return {
|