@aws-sdk/client-workdocs 3.28.0 → 3.32.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.
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectBoolean as __expectBoolean, expectInt as __expectInt, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
3
+ import { expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
4
4
  export var serializeAws_restJson1AbortDocumentVersionUploadCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
5
5
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
6
6
  return __generator(this, function (_c) {
@@ -1463,9 +1463,9 @@ var deserializeAws_restJson1AbortDocumentVersionUploadCommandError = function (o
1463
1463
  });
1464
1464
  }); };
1465
1465
  export var deserializeAws_restJson1ActivateUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1466
- var contents, data;
1467
- return __generator(this, function (_a) {
1468
- switch (_a.label) {
1466
+ var contents, data, _a, _b;
1467
+ return __generator(this, function (_c) {
1468
+ switch (_c.label) {
1469
1469
  case 0:
1470
1470
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1471
1471
  return [2 /*return*/, deserializeAws_restJson1ActivateUserCommandError(output, context)];
@@ -1474,9 +1474,11 @@ export var deserializeAws_restJson1ActivateUserCommand = function (output, conte
1474
1474
  $metadata: deserializeMetadata(output),
1475
1475
  User: undefined,
1476
1476
  };
1477
+ _a = __expectNonNull;
1478
+ _b = __expectObject;
1477
1479
  return [4 /*yield*/, parseBody(output.body, context)];
1478
1480
  case 1:
1479
- data = _a.sent();
1481
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1480
1482
  if (data.User !== undefined && data.User !== null) {
1481
1483
  contents.User = deserializeAws_restJson1User(data.User, context);
1482
1484
  }
@@ -1555,9 +1557,9 @@ var deserializeAws_restJson1ActivateUserCommandError = function (output, context
1555
1557
  });
1556
1558
  }); };
1557
1559
  export var deserializeAws_restJson1AddResourcePermissionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1558
- var contents, data;
1559
- return __generator(this, function (_a) {
1560
- switch (_a.label) {
1560
+ var contents, data, _a, _b;
1561
+ return __generator(this, function (_c) {
1562
+ switch (_c.label) {
1561
1563
  case 0:
1562
1564
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1563
1565
  return [2 /*return*/, deserializeAws_restJson1AddResourcePermissionsCommandError(output, context)];
@@ -1566,9 +1568,11 @@ export var deserializeAws_restJson1AddResourcePermissionsCommand = function (out
1566
1568
  $metadata: deserializeMetadata(output),
1567
1569
  ShareResults: undefined,
1568
1570
  };
1571
+ _a = __expectNonNull;
1572
+ _b = __expectObject;
1569
1573
  return [4 /*yield*/, parseBody(output.body, context)];
1570
1574
  case 1:
1571
- data = _a.sent();
1575
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1572
1576
  if (data.ShareResults !== undefined && data.ShareResults !== null) {
1573
1577
  contents.ShareResults = deserializeAws_restJson1ShareResultsList(data.ShareResults, context);
1574
1578
  }
@@ -1639,9 +1643,9 @@ var deserializeAws_restJson1AddResourcePermissionsCommandError = function (outpu
1639
1643
  });
1640
1644
  }); };
1641
1645
  export var deserializeAws_restJson1CreateCommentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1642
- var contents, data;
1643
- return __generator(this, function (_a) {
1644
- switch (_a.label) {
1646
+ var contents, data, _a, _b;
1647
+ return __generator(this, function (_c) {
1648
+ switch (_c.label) {
1645
1649
  case 0:
1646
1650
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1647
1651
  return [2 /*return*/, deserializeAws_restJson1CreateCommentCommandError(output, context)];
@@ -1650,9 +1654,11 @@ export var deserializeAws_restJson1CreateCommentCommand = function (output, cont
1650
1654
  $metadata: deserializeMetadata(output),
1651
1655
  Comment: undefined,
1652
1656
  };
1657
+ _a = __expectNonNull;
1658
+ _b = __expectObject;
1653
1659
  return [4 /*yield*/, parseBody(output.body, context)];
1654
1660
  case 1:
1655
- data = _a.sent();
1661
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1656
1662
  if (data.Comment !== undefined && data.Comment !== null) {
1657
1663
  contents.Comment = deserializeAws_restJson1Comment(data.Comment, context);
1658
1664
  }
@@ -1859,9 +1865,9 @@ var deserializeAws_restJson1CreateCustomMetadataCommandError = function (output,
1859
1865
  });
1860
1866
  }); };
1861
1867
  export var deserializeAws_restJson1CreateFolderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1862
- var contents, data;
1863
- return __generator(this, function (_a) {
1864
- switch (_a.label) {
1868
+ var contents, data, _a, _b;
1869
+ return __generator(this, function (_c) {
1870
+ switch (_c.label) {
1865
1871
  case 0:
1866
1872
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1867
1873
  return [2 /*return*/, deserializeAws_restJson1CreateFolderCommandError(output, context)];
@@ -1870,9 +1876,11 @@ export var deserializeAws_restJson1CreateFolderCommand = function (output, conte
1870
1876
  $metadata: deserializeMetadata(output),
1871
1877
  Metadata: undefined,
1872
1878
  };
1879
+ _a = __expectNonNull;
1880
+ _b = __expectObject;
1873
1881
  return [4 /*yield*/, parseBody(output.body, context)];
1874
1882
  case 1:
1875
- data = _a.sent();
1883
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1876
1884
  if (data.Metadata !== undefined && data.Metadata !== null) {
1877
1885
  contents.Metadata = deserializeAws_restJson1FolderMetadata(data.Metadata, context);
1878
1886
  }
@@ -2079,9 +2087,9 @@ var deserializeAws_restJson1CreateLabelsCommandError = function (output, context
2079
2087
  });
2080
2088
  }); };
2081
2089
  export var deserializeAws_restJson1CreateNotificationSubscriptionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2082
- var contents, data;
2083
- return __generator(this, function (_a) {
2084
- switch (_a.label) {
2090
+ var contents, data, _a, _b;
2091
+ return __generator(this, function (_c) {
2092
+ switch (_c.label) {
2085
2093
  case 0:
2086
2094
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2087
2095
  return [2 /*return*/, deserializeAws_restJson1CreateNotificationSubscriptionCommandError(output, context)];
@@ -2090,9 +2098,11 @@ export var deserializeAws_restJson1CreateNotificationSubscriptionCommand = funct
2090
2098
  $metadata: deserializeMetadata(output),
2091
2099
  Subscription: undefined,
2092
2100
  };
2101
+ _a = __expectNonNull;
2102
+ _b = __expectObject;
2093
2103
  return [4 /*yield*/, parseBody(output.body, context)];
2094
2104
  case 1:
2095
- data = _a.sent();
2105
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2096
2106
  if (data.Subscription !== undefined && data.Subscription !== null) {
2097
2107
  contents.Subscription = deserializeAws_restJson1Subscription(data.Subscription, context);
2098
2108
  }
@@ -2155,9 +2165,9 @@ var deserializeAws_restJson1CreateNotificationSubscriptionCommandError = functio
2155
2165
  });
2156
2166
  }); };
2157
2167
  export var deserializeAws_restJson1CreateUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2158
- var contents, data;
2159
- return __generator(this, function (_a) {
2160
- switch (_a.label) {
2168
+ var contents, data, _a, _b;
2169
+ return __generator(this, function (_c) {
2170
+ switch (_c.label) {
2161
2171
  case 0:
2162
2172
  if (output.statusCode !== 201 && output.statusCode >= 300) {
2163
2173
  return [2 /*return*/, deserializeAws_restJson1CreateUserCommandError(output, context)];
@@ -2166,9 +2176,11 @@ export var deserializeAws_restJson1CreateUserCommand = function (output, context
2166
2176
  $metadata: deserializeMetadata(output),
2167
2177
  User: undefined,
2168
2178
  };
2179
+ _a = __expectNonNull;
2180
+ _b = __expectObject;
2169
2181
  return [4 /*yield*/, parseBody(output.body, context)];
2170
2182
  case 1:
2171
- data = _a.sent();
2183
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2172
2184
  if (data.User !== undefined && data.User !== null) {
2173
2185
  contents.User = deserializeAws_restJson1User(data.User, context);
2174
2186
  }
@@ -3119,9 +3131,9 @@ var deserializeAws_restJson1DeleteUserCommandError = function (output, context)
3119
3131
  });
3120
3132
  }); };
3121
3133
  export var deserializeAws_restJson1DescribeActivitiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3122
- var contents, data;
3123
- return __generator(this, function (_a) {
3124
- switch (_a.label) {
3134
+ var contents, data, _a, _b;
3135
+ return __generator(this, function (_c) {
3136
+ switch (_c.label) {
3125
3137
  case 0:
3126
3138
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3127
3139
  return [2 /*return*/, deserializeAws_restJson1DescribeActivitiesCommandError(output, context)];
@@ -3131,9 +3143,11 @@ export var deserializeAws_restJson1DescribeActivitiesCommand = function (output,
3131
3143
  Marker: undefined,
3132
3144
  UserActivities: undefined,
3133
3145
  };
3146
+ _a = __expectNonNull;
3147
+ _b = __expectObject;
3134
3148
  return [4 /*yield*/, parseBody(output.body, context)];
3135
3149
  case 1:
3136
- data = _a.sent();
3150
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3137
3151
  if (data.Marker !== undefined && data.Marker !== null) {
3138
3152
  contents.Marker = __expectString(data.Marker);
3139
3153
  }
@@ -3215,9 +3229,9 @@ var deserializeAws_restJson1DescribeActivitiesCommandError = function (output, c
3215
3229
  });
3216
3230
  }); };
3217
3231
  export var deserializeAws_restJson1DescribeCommentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3218
- var contents, data;
3219
- return __generator(this, function (_a) {
3220
- switch (_a.label) {
3232
+ var contents, data, _a, _b;
3233
+ return __generator(this, function (_c) {
3234
+ switch (_c.label) {
3221
3235
  case 0:
3222
3236
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3223
3237
  return [2 /*return*/, deserializeAws_restJson1DescribeCommentsCommandError(output, context)];
@@ -3227,9 +3241,11 @@ export var deserializeAws_restJson1DescribeCommentsCommand = function (output, c
3227
3241
  Comments: undefined,
3228
3242
  Marker: undefined,
3229
3243
  };
3244
+ _a = __expectNonNull;
3245
+ _b = __expectObject;
3230
3246
  return [4 /*yield*/, parseBody(output.body, context)];
3231
3247
  case 1:
3232
- data = _a.sent();
3248
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3233
3249
  if (data.Comments !== undefined && data.Comments !== null) {
3234
3250
  contents.Comments = deserializeAws_restJson1CommentList(data.Comments, context);
3235
3251
  }
@@ -3319,9 +3335,9 @@ var deserializeAws_restJson1DescribeCommentsCommandError = function (output, con
3319
3335
  });
3320
3336
  }); };
3321
3337
  export var deserializeAws_restJson1DescribeDocumentVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3322
- var contents, data;
3323
- return __generator(this, function (_a) {
3324
- switch (_a.label) {
3338
+ var contents, data, _a, _b;
3339
+ return __generator(this, function (_c) {
3340
+ switch (_c.label) {
3325
3341
  case 0:
3326
3342
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3327
3343
  return [2 /*return*/, deserializeAws_restJson1DescribeDocumentVersionsCommandError(output, context)];
@@ -3331,9 +3347,11 @@ export var deserializeAws_restJson1DescribeDocumentVersionsCommand = function (o
3331
3347
  DocumentVersions: undefined,
3332
3348
  Marker: undefined,
3333
3349
  };
3350
+ _a = __expectNonNull;
3351
+ _b = __expectObject;
3334
3352
  return [4 /*yield*/, parseBody(output.body, context)];
3335
3353
  case 1:
3336
- data = _a.sent();
3354
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3337
3355
  if (data.DocumentVersions !== undefined && data.DocumentVersions !== null) {
3338
3356
  contents.DocumentVersions = deserializeAws_restJson1DocumentVersionMetadataList(data.DocumentVersions, context);
3339
3357
  }
@@ -3431,9 +3449,9 @@ var deserializeAws_restJson1DescribeDocumentVersionsCommandError = function (out
3431
3449
  });
3432
3450
  }); };
3433
3451
  export var deserializeAws_restJson1DescribeFolderContentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3434
- var contents, data;
3435
- return __generator(this, function (_a) {
3436
- switch (_a.label) {
3452
+ var contents, data, _a, _b;
3453
+ return __generator(this, function (_c) {
3454
+ switch (_c.label) {
3437
3455
  case 0:
3438
3456
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3439
3457
  return [2 /*return*/, deserializeAws_restJson1DescribeFolderContentsCommandError(output, context)];
@@ -3444,9 +3462,11 @@ export var deserializeAws_restJson1DescribeFolderContentsCommand = function (out
3444
3462
  Folders: undefined,
3445
3463
  Marker: undefined,
3446
3464
  };
3465
+ _a = __expectNonNull;
3466
+ _b = __expectObject;
3447
3467
  return [4 /*yield*/, parseBody(output.body, context)];
3448
3468
  case 1:
3449
- data = _a.sent();
3469
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3450
3470
  if (data.Documents !== undefined && data.Documents !== null) {
3451
3471
  contents.Documents = deserializeAws_restJson1DocumentMetadataList(data.Documents, context);
3452
3472
  }
@@ -3539,9 +3559,9 @@ var deserializeAws_restJson1DescribeFolderContentsCommandError = function (outpu
3539
3559
  });
3540
3560
  }); };
3541
3561
  export var deserializeAws_restJson1DescribeGroupsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3542
- var contents, data;
3543
- return __generator(this, function (_a) {
3544
- switch (_a.label) {
3562
+ var contents, data, _a, _b;
3563
+ return __generator(this, function (_c) {
3564
+ switch (_c.label) {
3545
3565
  case 0:
3546
3566
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3547
3567
  return [2 /*return*/, deserializeAws_restJson1DescribeGroupsCommandError(output, context)];
@@ -3551,9 +3571,11 @@ export var deserializeAws_restJson1DescribeGroupsCommand = function (output, con
3551
3571
  Groups: undefined,
3552
3572
  Marker: undefined,
3553
3573
  };
3574
+ _a = __expectNonNull;
3575
+ _b = __expectObject;
3554
3576
  return [4 /*yield*/, parseBody(output.body, context)];
3555
3577
  case 1:
3556
- data = _a.sent();
3578
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3557
3579
  if (data.Groups !== undefined && data.Groups !== null) {
3558
3580
  contents.Groups = deserializeAws_restJson1GroupMetadataList(data.Groups, context);
3559
3581
  }
@@ -3627,9 +3649,9 @@ var deserializeAws_restJson1DescribeGroupsCommandError = function (output, conte
3627
3649
  });
3628
3650
  }); };
3629
3651
  export var deserializeAws_restJson1DescribeNotificationSubscriptionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3630
- var contents, data;
3631
- return __generator(this, function (_a) {
3632
- switch (_a.label) {
3652
+ var contents, data, _a, _b;
3653
+ return __generator(this, function (_c) {
3654
+ switch (_c.label) {
3633
3655
  case 0:
3634
3656
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3635
3657
  return [2 /*return*/, deserializeAws_restJson1DescribeNotificationSubscriptionsCommandError(output, context)];
@@ -3639,9 +3661,11 @@ export var deserializeAws_restJson1DescribeNotificationSubscriptionsCommand = fu
3639
3661
  Marker: undefined,
3640
3662
  Subscriptions: undefined,
3641
3663
  };
3664
+ _a = __expectNonNull;
3665
+ _b = __expectObject;
3642
3666
  return [4 /*yield*/, parseBody(output.body, context)];
3643
3667
  case 1:
3644
- data = _a.sent();
3668
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3645
3669
  if (data.Marker !== undefined && data.Marker !== null) {
3646
3670
  contents.Marker = __expectString(data.Marker);
3647
3671
  }
@@ -3707,9 +3731,9 @@ var deserializeAws_restJson1DescribeNotificationSubscriptionsCommandError = func
3707
3731
  });
3708
3732
  }); };
3709
3733
  export var deserializeAws_restJson1DescribeResourcePermissionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3710
- var contents, data;
3711
- return __generator(this, function (_a) {
3712
- switch (_a.label) {
3734
+ var contents, data, _a, _b;
3735
+ return __generator(this, function (_c) {
3736
+ switch (_c.label) {
3713
3737
  case 0:
3714
3738
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3715
3739
  return [2 /*return*/, deserializeAws_restJson1DescribeResourcePermissionsCommandError(output, context)];
@@ -3719,9 +3743,11 @@ export var deserializeAws_restJson1DescribeResourcePermissionsCommand = function
3719
3743
  Marker: undefined,
3720
3744
  Principals: undefined,
3721
3745
  };
3746
+ _a = __expectNonNull;
3747
+ _b = __expectObject;
3722
3748
  return [4 /*yield*/, parseBody(output.body, context)];
3723
3749
  case 1:
3724
- data = _a.sent();
3750
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3725
3751
  if (data.Marker !== undefined && data.Marker !== null) {
3726
3752
  contents.Marker = __expectString(data.Marker);
3727
3753
  }
@@ -3795,9 +3821,9 @@ var deserializeAws_restJson1DescribeResourcePermissionsCommandError = function (
3795
3821
  });
3796
3822
  }); };
3797
3823
  export var deserializeAws_restJson1DescribeRootFoldersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3798
- var contents, data;
3799
- return __generator(this, function (_a) {
3800
- switch (_a.label) {
3824
+ var contents, data, _a, _b;
3825
+ return __generator(this, function (_c) {
3826
+ switch (_c.label) {
3801
3827
  case 0:
3802
3828
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3803
3829
  return [2 /*return*/, deserializeAws_restJson1DescribeRootFoldersCommandError(output, context)];
@@ -3807,9 +3833,11 @@ export var deserializeAws_restJson1DescribeRootFoldersCommand = function (output
3807
3833
  Folders: undefined,
3808
3834
  Marker: undefined,
3809
3835
  };
3836
+ _a = __expectNonNull;
3837
+ _b = __expectObject;
3810
3838
  return [4 /*yield*/, parseBody(output.body, context)];
3811
3839
  case 1:
3812
- data = _a.sent();
3840
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3813
3841
  if (data.Folders !== undefined && data.Folders !== null) {
3814
3842
  contents.Folders = deserializeAws_restJson1FolderMetadataList(data.Folders, context);
3815
3843
  }
@@ -3891,9 +3919,9 @@ var deserializeAws_restJson1DescribeRootFoldersCommandError = function (output,
3891
3919
  });
3892
3920
  }); };
3893
3921
  export var deserializeAws_restJson1DescribeUsersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3894
- var contents, data;
3895
- return __generator(this, function (_a) {
3896
- switch (_a.label) {
3922
+ var contents, data, _a, _b;
3923
+ return __generator(this, function (_c) {
3924
+ switch (_c.label) {
3897
3925
  case 0:
3898
3926
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3899
3927
  return [2 /*return*/, deserializeAws_restJson1DescribeUsersCommandError(output, context)];
@@ -3904,14 +3932,16 @@ export var deserializeAws_restJson1DescribeUsersCommand = function (output, cont
3904
3932
  TotalNumberOfUsers: undefined,
3905
3933
  Users: undefined,
3906
3934
  };
3935
+ _a = __expectNonNull;
3936
+ _b = __expectObject;
3907
3937
  return [4 /*yield*/, parseBody(output.body, context)];
3908
3938
  case 1:
3909
- data = _a.sent();
3939
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3910
3940
  if (data.Marker !== undefined && data.Marker !== null) {
3911
3941
  contents.Marker = __expectString(data.Marker);
3912
3942
  }
3913
3943
  if (data.TotalNumberOfUsers !== undefined && data.TotalNumberOfUsers !== null) {
3914
- contents.TotalNumberOfUsers = __expectInt(data.TotalNumberOfUsers);
3944
+ contents.TotalNumberOfUsers = __expectLong(data.TotalNumberOfUsers);
3915
3945
  }
3916
3946
  if (data.Users !== undefined && data.Users !== null) {
3917
3947
  contents.Users = deserializeAws_restJson1OrganizationUserList(data.Users, context);
@@ -4007,9 +4037,9 @@ var deserializeAws_restJson1DescribeUsersCommandError = function (output, contex
4007
4037
  });
4008
4038
  }); };
4009
4039
  export var deserializeAws_restJson1GetCurrentUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4010
- var contents, data;
4011
- return __generator(this, function (_a) {
4012
- switch (_a.label) {
4040
+ var contents, data, _a, _b;
4041
+ return __generator(this, function (_c) {
4042
+ switch (_c.label) {
4013
4043
  case 0:
4014
4044
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4015
4045
  return [2 /*return*/, deserializeAws_restJson1GetCurrentUserCommandError(output, context)];
@@ -4018,9 +4048,11 @@ export var deserializeAws_restJson1GetCurrentUserCommand = function (output, con
4018
4048
  $metadata: deserializeMetadata(output),
4019
4049
  User: undefined,
4020
4050
  };
4051
+ _a = __expectNonNull;
4052
+ _b = __expectObject;
4021
4053
  return [4 /*yield*/, parseBody(output.body, context)];
4022
4054
  case 1:
4023
- data = _a.sent();
4055
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4024
4056
  if (data.User !== undefined && data.User !== null) {
4025
4057
  contents.User = deserializeAws_restJson1User(data.User, context);
4026
4058
  }
@@ -4099,9 +4131,9 @@ var deserializeAws_restJson1GetCurrentUserCommandError = function (output, conte
4099
4131
  });
4100
4132
  }); };
4101
4133
  export var deserializeAws_restJson1GetDocumentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4102
- var contents, data;
4103
- return __generator(this, function (_a) {
4104
- switch (_a.label) {
4134
+ var contents, data, _a, _b;
4135
+ return __generator(this, function (_c) {
4136
+ switch (_c.label) {
4105
4137
  case 0:
4106
4138
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4107
4139
  return [2 /*return*/, deserializeAws_restJson1GetDocumentCommandError(output, context)];
@@ -4111,9 +4143,11 @@ export var deserializeAws_restJson1GetDocumentCommand = function (output, contex
4111
4143
  CustomMetadata: undefined,
4112
4144
  Metadata: undefined,
4113
4145
  };
4146
+ _a = __expectNonNull;
4147
+ _b = __expectObject;
4114
4148
  return [4 /*yield*/, parseBody(output.body, context)];
4115
4149
  case 1:
4116
- data = _a.sent();
4150
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4117
4151
  if (data.CustomMetadata !== undefined && data.CustomMetadata !== null) {
4118
4152
  contents.CustomMetadata = deserializeAws_restJson1CustomMetadataMap(data.CustomMetadata, context);
4119
4153
  }
@@ -4211,9 +4245,9 @@ var deserializeAws_restJson1GetDocumentCommandError = function (output, context)
4211
4245
  });
4212
4246
  }); };
4213
4247
  export var deserializeAws_restJson1GetDocumentPathCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4214
- var contents, data;
4215
- return __generator(this, function (_a) {
4216
- switch (_a.label) {
4248
+ var contents, data, _a, _b;
4249
+ return __generator(this, function (_c) {
4250
+ switch (_c.label) {
4217
4251
  case 0:
4218
4252
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4219
4253
  return [2 /*return*/, deserializeAws_restJson1GetDocumentPathCommandError(output, context)];
@@ -4222,9 +4256,11 @@ export var deserializeAws_restJson1GetDocumentPathCommand = function (output, co
4222
4256
  $metadata: deserializeMetadata(output),
4223
4257
  Path: undefined,
4224
4258
  };
4259
+ _a = __expectNonNull;
4260
+ _b = __expectObject;
4225
4261
  return [4 /*yield*/, parseBody(output.body, context)];
4226
4262
  case 1:
4227
- data = _a.sent();
4263
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4228
4264
  if (data.Path !== undefined && data.Path !== null) {
4229
4265
  contents.Path = deserializeAws_restJson1ResourcePath(data.Path, context);
4230
4266
  }
@@ -4303,9 +4339,9 @@ var deserializeAws_restJson1GetDocumentPathCommandError = function (output, cont
4303
4339
  });
4304
4340
  }); };
4305
4341
  export var deserializeAws_restJson1GetDocumentVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4306
- var contents, data;
4307
- return __generator(this, function (_a) {
4308
- switch (_a.label) {
4342
+ var contents, data, _a, _b;
4343
+ return __generator(this, function (_c) {
4344
+ switch (_c.label) {
4309
4345
  case 0:
4310
4346
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4311
4347
  return [2 /*return*/, deserializeAws_restJson1GetDocumentVersionCommandError(output, context)];
@@ -4315,9 +4351,11 @@ export var deserializeAws_restJson1GetDocumentVersionCommand = function (output,
4315
4351
  CustomMetadata: undefined,
4316
4352
  Metadata: undefined,
4317
4353
  };
4354
+ _a = __expectNonNull;
4355
+ _b = __expectObject;
4318
4356
  return [4 /*yield*/, parseBody(output.body, context)];
4319
4357
  case 1:
4320
- data = _a.sent();
4358
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4321
4359
  if (data.CustomMetadata !== undefined && data.CustomMetadata !== null) {
4322
4360
  contents.CustomMetadata = deserializeAws_restJson1CustomMetadataMap(data.CustomMetadata, context);
4323
4361
  }
@@ -4415,9 +4453,9 @@ var deserializeAws_restJson1GetDocumentVersionCommandError = function (output, c
4415
4453
  });
4416
4454
  }); };
4417
4455
  export var deserializeAws_restJson1GetFolderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4418
- var contents, data;
4419
- return __generator(this, function (_a) {
4420
- switch (_a.label) {
4456
+ var contents, data, _a, _b;
4457
+ return __generator(this, function (_c) {
4458
+ switch (_c.label) {
4421
4459
  case 0:
4422
4460
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4423
4461
  return [2 /*return*/, deserializeAws_restJson1GetFolderCommandError(output, context)];
@@ -4427,9 +4465,11 @@ export var deserializeAws_restJson1GetFolderCommand = function (output, context)
4427
4465
  CustomMetadata: undefined,
4428
4466
  Metadata: undefined,
4429
4467
  };
4468
+ _a = __expectNonNull;
4469
+ _b = __expectObject;
4430
4470
  return [4 /*yield*/, parseBody(output.body, context)];
4431
4471
  case 1:
4432
- data = _a.sent();
4472
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4433
4473
  if (data.CustomMetadata !== undefined && data.CustomMetadata !== null) {
4434
4474
  contents.CustomMetadata = deserializeAws_restJson1CustomMetadataMap(data.CustomMetadata, context);
4435
4475
  }
@@ -4527,9 +4567,9 @@ var deserializeAws_restJson1GetFolderCommandError = function (output, context) {
4527
4567
  });
4528
4568
  }); };
4529
4569
  export var deserializeAws_restJson1GetFolderPathCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4530
- var contents, data;
4531
- return __generator(this, function (_a) {
4532
- switch (_a.label) {
4570
+ var contents, data, _a, _b;
4571
+ return __generator(this, function (_c) {
4572
+ switch (_c.label) {
4533
4573
  case 0:
4534
4574
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4535
4575
  return [2 /*return*/, deserializeAws_restJson1GetFolderPathCommandError(output, context)];
@@ -4538,9 +4578,11 @@ export var deserializeAws_restJson1GetFolderPathCommand = function (output, cont
4538
4578
  $metadata: deserializeMetadata(output),
4539
4579
  Path: undefined,
4540
4580
  };
4581
+ _a = __expectNonNull;
4582
+ _b = __expectObject;
4541
4583
  return [4 /*yield*/, parseBody(output.body, context)];
4542
4584
  case 1:
4543
- data = _a.sent();
4585
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4544
4586
  if (data.Path !== undefined && data.Path !== null) {
4545
4587
  contents.Path = deserializeAws_restJson1ResourcePath(data.Path, context);
4546
4588
  }
@@ -4619,9 +4661,9 @@ var deserializeAws_restJson1GetFolderPathCommandError = function (output, contex
4619
4661
  });
4620
4662
  }); };
4621
4663
  export var deserializeAws_restJson1GetResourcesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4622
- var contents, data;
4623
- return __generator(this, function (_a) {
4624
- switch (_a.label) {
4664
+ var contents, data, _a, _b;
4665
+ return __generator(this, function (_c) {
4666
+ switch (_c.label) {
4625
4667
  case 0:
4626
4668
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4627
4669
  return [2 /*return*/, deserializeAws_restJson1GetResourcesCommandError(output, context)];
@@ -4632,9 +4674,11 @@ export var deserializeAws_restJson1GetResourcesCommand = function (output, conte
4632
4674
  Folders: undefined,
4633
4675
  Marker: undefined,
4634
4676
  };
4677
+ _a = __expectNonNull;
4678
+ _b = __expectObject;
4635
4679
  return [4 /*yield*/, parseBody(output.body, context)];
4636
4680
  case 1:
4637
- data = _a.sent();
4681
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4638
4682
  if (data.Documents !== undefined && data.Documents !== null) {
4639
4683
  contents.Documents = deserializeAws_restJson1DocumentMetadataList(data.Documents, context);
4640
4684
  }
@@ -4719,9 +4763,9 @@ var deserializeAws_restJson1GetResourcesCommandError = function (output, context
4719
4763
  });
4720
4764
  }); };
4721
4765
  export var deserializeAws_restJson1InitiateDocumentVersionUploadCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4722
- var contents, data;
4723
- return __generator(this, function (_a) {
4724
- switch (_a.label) {
4766
+ var contents, data, _a, _b;
4767
+ return __generator(this, function (_c) {
4768
+ switch (_c.label) {
4725
4769
  case 0:
4726
4770
  if (output.statusCode !== 201 && output.statusCode >= 300) {
4727
4771
  return [2 /*return*/, deserializeAws_restJson1InitiateDocumentVersionUploadCommandError(output, context)];
@@ -4731,9 +4775,11 @@ export var deserializeAws_restJson1InitiateDocumentVersionUploadCommand = functi
4731
4775
  Metadata: undefined,
4732
4776
  UploadMetadata: undefined,
4733
4777
  };
4778
+ _a = __expectNonNull;
4779
+ _b = __expectObject;
4734
4780
  return [4 /*yield*/, parseBody(output.body, context)];
4735
4781
  case 1:
4736
- data = _a.sent();
4782
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4737
4783
  if (data.Metadata !== undefined && data.Metadata !== null) {
4738
4784
  contents.Metadata = deserializeAws_restJson1DocumentMetadata(data.Metadata, context);
4739
4785
  }
@@ -5391,9 +5437,9 @@ var deserializeAws_restJson1UpdateFolderCommandError = function (output, context
5391
5437
  });
5392
5438
  }); };
5393
5439
  export var deserializeAws_restJson1UpdateUserCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5394
- var contents, data;
5395
- return __generator(this, function (_a) {
5396
- switch (_a.label) {
5440
+ var contents, data, _a, _b;
5441
+ return __generator(this, function (_c) {
5442
+ switch (_c.label) {
5397
5443
  case 0:
5398
5444
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5399
5445
  return [2 /*return*/, deserializeAws_restJson1UpdateUserCommandError(output, context)];
@@ -5402,9 +5448,11 @@ export var deserializeAws_restJson1UpdateUserCommand = function (output, context
5402
5448
  $metadata: deserializeMetadata(output),
5403
5449
  User: undefined,
5404
5450
  };
5451
+ _a = __expectNonNull;
5452
+ _b = __expectObject;
5405
5453
  return [4 /*yield*/, parseBody(output.body, context)];
5406
5454
  case 1:
5407
- data = _a.sent();
5455
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
5408
5456
  if (data.User !== undefined && data.User !== null) {
5409
5457
  contents.User = deserializeAws_restJson1User(data.User, context);
5410
5458
  }
@@ -5978,7 +6026,7 @@ var deserializeAws_restJson1Activity = function (output, context) {
5978
6026
  ? deserializeAws_restJson1ResourceMetadata(output.ResourceMetadata, context)
5979
6027
  : undefined,
5980
6028
  TimeStamp: output.TimeStamp !== undefined && output.TimeStamp !== null
5981
- ? new Date(Math.round(output.TimeStamp * 1000))
6029
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TimeStamp)))
5982
6030
  : undefined,
5983
6031
  Type: __expectString(output.Type),
5984
6032
  };
@@ -5990,7 +6038,7 @@ var deserializeAws_restJson1Comment = function (output, context) {
5990
6038
  ? deserializeAws_restJson1User(output.Contributor, context)
5991
6039
  : undefined,
5992
6040
  CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
5993
- ? new Date(Math.round(output.CreatedTimestamp * 1000))
6041
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
5994
6042
  : undefined,
5995
6043
  ParentId: __expectString(output.ParentId),
5996
6044
  RecipientId: __expectString(output.RecipientId),
@@ -6018,7 +6066,7 @@ var deserializeAws_restJson1CommentMetadata = function (output, context) {
6018
6066
  ? deserializeAws_restJson1User(output.Contributor, context)
6019
6067
  : undefined,
6020
6068
  CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
6021
- ? new Date(Math.round(output.CreatedTimestamp * 1000))
6069
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
6022
6070
  : undefined,
6023
6071
  RecipientId: __expectString(output.RecipientId),
6024
6072
  };
@@ -6036,7 +6084,7 @@ var deserializeAws_restJson1CustomMetadataMap = function (output, context) {
6036
6084
  var deserializeAws_restJson1DocumentMetadata = function (output, context) {
6037
6085
  return {
6038
6086
  CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
6039
- ? new Date(Math.round(output.CreatedTimestamp * 1000))
6087
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
6040
6088
  : undefined,
6041
6089
  CreatorId: __expectString(output.CreatorId),
6042
6090
  Id: __expectString(output.Id),
@@ -6047,7 +6095,7 @@ var deserializeAws_restJson1DocumentMetadata = function (output, context) {
6047
6095
  ? deserializeAws_restJson1DocumentVersionMetadata(output.LatestVersionMetadata, context)
6048
6096
  : undefined,
6049
6097
  ModifiedTimestamp: output.ModifiedTimestamp !== undefined && output.ModifiedTimestamp !== null
6050
- ? new Date(Math.round(output.ModifiedTimestamp * 1000))
6098
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp)))
6051
6099
  : undefined,
6052
6100
  ParentFolderId: __expectString(output.ParentFolderId),
6053
6101
  ResourceState: __expectString(output.ResourceState),
@@ -6086,23 +6134,23 @@ var deserializeAws_restJson1DocumentThumbnailUrlMap = function (output, context)
6086
6134
  var deserializeAws_restJson1DocumentVersionMetadata = function (output, context) {
6087
6135
  return {
6088
6136
  ContentCreatedTimestamp: output.ContentCreatedTimestamp !== undefined && output.ContentCreatedTimestamp !== null
6089
- ? new Date(Math.round(output.ContentCreatedTimestamp * 1000))
6137
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ContentCreatedTimestamp)))
6090
6138
  : undefined,
6091
6139
  ContentModifiedTimestamp: output.ContentModifiedTimestamp !== undefined && output.ContentModifiedTimestamp !== null
6092
- ? new Date(Math.round(output.ContentModifiedTimestamp * 1000))
6140
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ContentModifiedTimestamp)))
6093
6141
  : undefined,
6094
6142
  ContentType: __expectString(output.ContentType),
6095
6143
  CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
6096
- ? new Date(Math.round(output.CreatedTimestamp * 1000))
6144
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
6097
6145
  : undefined,
6098
6146
  CreatorId: __expectString(output.CreatorId),
6099
6147
  Id: __expectString(output.Id),
6100
6148
  ModifiedTimestamp: output.ModifiedTimestamp !== undefined && output.ModifiedTimestamp !== null
6101
- ? new Date(Math.round(output.ModifiedTimestamp * 1000))
6149
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp)))
6102
6150
  : undefined,
6103
6151
  Name: __expectString(output.Name),
6104
6152
  Signature: __expectString(output.Signature),
6105
- Size: __expectInt(output.Size),
6153
+ Size: __expectLong(output.Size),
6106
6154
  Source: output.Source !== undefined && output.Source !== null
6107
6155
  ? deserializeAws_restJson1DocumentSourceUrlMap(output.Source, context)
6108
6156
  : undefined,
@@ -6135,22 +6183,22 @@ var deserializeAws_restJson1EntityIdList = function (output, context) {
6135
6183
  var deserializeAws_restJson1FolderMetadata = function (output, context) {
6136
6184
  return {
6137
6185
  CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
6138
- ? new Date(Math.round(output.CreatedTimestamp * 1000))
6186
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
6139
6187
  : undefined,
6140
6188
  CreatorId: __expectString(output.CreatorId),
6141
6189
  Id: __expectString(output.Id),
6142
6190
  Labels: output.Labels !== undefined && output.Labels !== null
6143
6191
  ? deserializeAws_restJson1SharedLabels(output.Labels, context)
6144
6192
  : undefined,
6145
- LatestVersionSize: __expectInt(output.LatestVersionSize),
6193
+ LatestVersionSize: __expectLong(output.LatestVersionSize),
6146
6194
  ModifiedTimestamp: output.ModifiedTimestamp !== undefined && output.ModifiedTimestamp !== null
6147
- ? new Date(Math.round(output.ModifiedTimestamp * 1000))
6195
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp)))
6148
6196
  : undefined,
6149
6197
  Name: __expectString(output.Name),
6150
6198
  ParentFolderId: __expectString(output.ParentFolderId),
6151
6199
  ResourceState: __expectString(output.ResourceState),
6152
6200
  Signature: __expectString(output.Signature),
6153
- Size: __expectInt(output.Size),
6201
+ Size: __expectLong(output.Size),
6154
6202
  };
6155
6203
  };
6156
6204
  var deserializeAws_restJson1FolderMetadataList = function (output, context) {
@@ -6312,7 +6360,7 @@ var deserializeAws_restJson1SignedHeaderMap = function (output, context) {
6312
6360
  };
6313
6361
  var deserializeAws_restJson1StorageRuleType = function (output, context) {
6314
6362
  return {
6315
- StorageAllocatedInBytes: __expectInt(output.StorageAllocatedInBytes),
6363
+ StorageAllocatedInBytes: __expectLong(output.StorageAllocatedInBytes),
6316
6364
  StorageType: __expectString(output.StorageType),
6317
6365
  };
6318
6366
  };
@@ -6344,14 +6392,14 @@ var deserializeAws_restJson1UploadMetadata = function (output, context) {
6344
6392
  var deserializeAws_restJson1User = function (output, context) {
6345
6393
  return {
6346
6394
  CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
6347
- ? new Date(Math.round(output.CreatedTimestamp * 1000))
6395
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
6348
6396
  : undefined,
6349
6397
  EmailAddress: __expectString(output.EmailAddress),
6350
6398
  GivenName: __expectString(output.GivenName),
6351
6399
  Id: __expectString(output.Id),
6352
6400
  Locale: __expectString(output.Locale),
6353
6401
  ModifiedTimestamp: output.ModifiedTimestamp !== undefined && output.ModifiedTimestamp !== null
6354
- ? new Date(Math.round(output.ModifiedTimestamp * 1000))
6402
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp)))
6355
6403
  : undefined,
6356
6404
  OrganizationId: __expectString(output.OrganizationId),
6357
6405
  RecycleBinFolderId: __expectString(output.RecycleBinFolderId),
@@ -6400,7 +6448,7 @@ var deserializeAws_restJson1UserStorageMetadata = function (output, context) {
6400
6448
  StorageRule: output.StorageRule !== undefined && output.StorageRule !== null
6401
6449
  ? deserializeAws_restJson1StorageRuleType(output.StorageRule, context)
6402
6450
  : undefined,
6403
- StorageUtilizedInBytes: __expectInt(output.StorageUtilizedInBytes),
6451
+ StorageUtilizedInBytes: __expectLong(output.StorageUtilizedInBytes),
6404
6452
  };
6405
6453
  };
6406
6454
  var deserializeMetadata = function (output) {