@aws-sdk/client-amplifybackend 3.40.0 → 3.45.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 +41 -0
- package/dist-cjs/AmplifyBackend.js +90 -0
- package/dist-cjs/commands/CreateBackendStorageCommand.js +36 -0
- package/dist-cjs/commands/DeleteBackendStorageCommand.js +36 -0
- package/dist-cjs/commands/GetBackendStorageCommand.js +36 -0
- package/dist-cjs/commands/ImportBackendStorageCommand.js +36 -0
- package/dist-cjs/commands/ListS3BucketsCommand.js +36 -0
- package/dist-cjs/commands/UpdateBackendStorageCommand.js +36 -0
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoints.js +9 -0
- package/dist-cjs/models/models_0.js +121 -2
- package/dist-cjs/protocols/Aws_restJson1.js +937 -101
- package/dist-es/AmplifyBackend.js +90 -0
- package/dist-es/commands/CreateBackendStorageCommand.js +39 -0
- package/dist-es/commands/DeleteBackendStorageCommand.js +39 -0
- package/dist-es/commands/GetBackendStorageCommand.js +39 -0
- package/dist-es/commands/ImportBackendStorageCommand.js +39 -0
- package/dist-es/commands/ListS3BucketsCommand.js +39 -0
- package/dist-es/commands/UpdateBackendStorageCommand.js +39 -0
- package/dist-es/commands/index.js +6 -0
- package/dist-es/endpoints.js +9 -0
- package/dist-es/models/models_0.js +84 -0
- package/dist-es/protocols/Aws_restJson1.js +1008 -86
- package/dist-types/AmplifyBackend.d.ts +42 -0
- package/dist-types/AmplifyBackendClient.d.ts +8 -2
- package/dist-types/commands/CloneBackendCommand.d.ts +1 -1
- package/dist-types/commands/CreateBackendAPICommand.d.ts +1 -1
- package/dist-types/commands/CreateBackendAuthCommand.d.ts +1 -1
- package/dist-types/commands/CreateBackendCommand.d.ts +1 -1
- package/dist-types/commands/CreateBackendConfigCommand.d.ts +1 -1
- package/dist-types/commands/CreateBackendStorageCommand.d.ts +35 -0
- package/dist-types/commands/CreateTokenCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBackendAPICommand.d.ts +1 -1
- package/dist-types/commands/DeleteBackendAuthCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBackendCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBackendStorageCommand.d.ts +35 -0
- package/dist-types/commands/DeleteTokenCommand.d.ts +1 -1
- package/dist-types/commands/GenerateBackendAPIModelsCommand.d.ts +1 -1
- package/dist-types/commands/GetBackendAPICommand.d.ts +1 -1
- package/dist-types/commands/GetBackendAPIModelsCommand.d.ts +1 -1
- package/dist-types/commands/GetBackendAuthCommand.d.ts +1 -1
- package/dist-types/commands/GetBackendCommand.d.ts +1 -1
- package/dist-types/commands/GetBackendJobCommand.d.ts +1 -1
- package/dist-types/commands/GetBackendStorageCommand.d.ts +35 -0
- package/dist-types/commands/GetTokenCommand.d.ts +1 -1
- package/dist-types/commands/ImportBackendAuthCommand.d.ts +1 -1
- package/dist-types/commands/ImportBackendStorageCommand.d.ts +35 -0
- package/dist-types/commands/ListBackendJobsCommand.d.ts +1 -1
- package/dist-types/commands/ListS3BucketsCommand.d.ts +35 -0
- package/dist-types/commands/RemoveAllBackendsCommand.d.ts +1 -1
- package/dist-types/commands/RemoveBackendConfigCommand.d.ts +1 -1
- package/dist-types/commands/UpdateBackendAPICommand.d.ts +1 -1
- package/dist-types/commands/UpdateBackendAuthCommand.d.ts +1 -1
- package/dist-types/commands/UpdateBackendConfigCommand.d.ts +1 -1
- package/dist-types/commands/UpdateBackendJobCommand.d.ts +1 -1
- package/dist-types/commands/UpdateBackendStorageCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +403 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/ts3.4/AmplifyBackend.d.ts +30 -0
- package/dist-types/ts3.4/AmplifyBackendClient.d.ts +8 -2
- package/dist-types/ts3.4/commands/CreateBackendStorageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteBackendStorageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetBackendStorageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ImportBackendStorageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListS3BucketsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateBackendStorageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +236 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +6 -6
|
@@ -186,6 +186,44 @@ export var serializeAws_restJson1CreateBackendConfigCommand = function (input, c
|
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
}); };
|
|
189
|
+
export var serializeAws_restJson1CreateBackendStorageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
190
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
191
|
+
return __generator(this, function (_c) {
|
|
192
|
+
switch (_c.label) {
|
|
193
|
+
case 0: return [4, context.endpoint()];
|
|
194
|
+
case 1:
|
|
195
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
196
|
+
headers = {
|
|
197
|
+
"content-type": "application/json",
|
|
198
|
+
};
|
|
199
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/backend/{AppId}/storage";
|
|
200
|
+
if (input.AppId !== undefined) {
|
|
201
|
+
labelValue = input.AppId;
|
|
202
|
+
if (labelValue.length <= 0) {
|
|
203
|
+
throw new Error("Empty value provided for input HTTP label: AppId.");
|
|
204
|
+
}
|
|
205
|
+
resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue));
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
throw new Error("No value provided for input HTTP label: AppId.");
|
|
209
|
+
}
|
|
210
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.BackendEnvironmentName !== undefined &&
|
|
211
|
+
input.BackendEnvironmentName !== null && { backendEnvironmentName: input.BackendEnvironmentName })), (input.ResourceConfig !== undefined &&
|
|
212
|
+
input.ResourceConfig !== null && {
|
|
213
|
+
resourceConfig: serializeAws_restJson1CreateBackendStorageResourceConfig(input.ResourceConfig, context),
|
|
214
|
+
})), (input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName })));
|
|
215
|
+
return [2, new __HttpRequest({
|
|
216
|
+
protocol: protocol,
|
|
217
|
+
hostname: hostname,
|
|
218
|
+
port: port,
|
|
219
|
+
method: "POST",
|
|
220
|
+
headers: headers,
|
|
221
|
+
path: resolvedPath,
|
|
222
|
+
body: body,
|
|
223
|
+
})];
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}); };
|
|
189
227
|
export var serializeAws_restJson1CreateTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
190
228
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
191
229
|
return __generator(this, function (_c) {
|
|
@@ -352,6 +390,51 @@ export var serializeAws_restJson1DeleteBackendAuthCommand = function (input, con
|
|
|
352
390
|
}
|
|
353
391
|
});
|
|
354
392
|
}); };
|
|
393
|
+
export var serializeAws_restJson1DeleteBackendStorageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
394
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
395
|
+
return __generator(this, function (_c) {
|
|
396
|
+
switch (_c.label) {
|
|
397
|
+
case 0: return [4, context.endpoint()];
|
|
398
|
+
case 1:
|
|
399
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
400
|
+
headers = {
|
|
401
|
+
"content-type": "application/json",
|
|
402
|
+
};
|
|
403
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
404
|
+
"/backend/{AppId}/storage/{BackendEnvironmentName}/remove";
|
|
405
|
+
if (input.AppId !== undefined) {
|
|
406
|
+
labelValue = input.AppId;
|
|
407
|
+
if (labelValue.length <= 0) {
|
|
408
|
+
throw new Error("Empty value provided for input HTTP label: AppId.");
|
|
409
|
+
}
|
|
410
|
+
resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue));
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
throw new Error("No value provided for input HTTP label: AppId.");
|
|
414
|
+
}
|
|
415
|
+
if (input.BackendEnvironmentName !== undefined) {
|
|
416
|
+
labelValue = input.BackendEnvironmentName;
|
|
417
|
+
if (labelValue.length <= 0) {
|
|
418
|
+
throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName.");
|
|
419
|
+
}
|
|
420
|
+
resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue));
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
throw new Error("No value provided for input HTTP label: BackendEnvironmentName.");
|
|
424
|
+
}
|
|
425
|
+
body = JSON.stringify(__assign(__assign({}, (input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName })), (input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName })));
|
|
426
|
+
return [2, new __HttpRequest({
|
|
427
|
+
protocol: protocol,
|
|
428
|
+
hostname: hostname,
|
|
429
|
+
port: port,
|
|
430
|
+
method: "POST",
|
|
431
|
+
headers: headers,
|
|
432
|
+
path: resolvedPath,
|
|
433
|
+
body: body,
|
|
434
|
+
})];
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}); };
|
|
355
438
|
export var serializeAws_restJson1DeleteTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
356
439
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
357
440
|
return __generator(this, function (_c) {
|
|
@@ -664,6 +747,51 @@ export var serializeAws_restJson1GetBackendJobCommand = function (input, context
|
|
|
664
747
|
}
|
|
665
748
|
});
|
|
666
749
|
}); };
|
|
750
|
+
export var serializeAws_restJson1GetBackendStorageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
751
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
752
|
+
return __generator(this, function (_c) {
|
|
753
|
+
switch (_c.label) {
|
|
754
|
+
case 0: return [4, context.endpoint()];
|
|
755
|
+
case 1:
|
|
756
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
757
|
+
headers = {
|
|
758
|
+
"content-type": "application/json",
|
|
759
|
+
};
|
|
760
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
761
|
+
"/backend/{AppId}/storage/{BackendEnvironmentName}/details";
|
|
762
|
+
if (input.AppId !== undefined) {
|
|
763
|
+
labelValue = input.AppId;
|
|
764
|
+
if (labelValue.length <= 0) {
|
|
765
|
+
throw new Error("Empty value provided for input HTTP label: AppId.");
|
|
766
|
+
}
|
|
767
|
+
resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue));
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
throw new Error("No value provided for input HTTP label: AppId.");
|
|
771
|
+
}
|
|
772
|
+
if (input.BackendEnvironmentName !== undefined) {
|
|
773
|
+
labelValue = input.BackendEnvironmentName;
|
|
774
|
+
if (labelValue.length <= 0) {
|
|
775
|
+
throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName.");
|
|
776
|
+
}
|
|
777
|
+
resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue));
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
throw new Error("No value provided for input HTTP label: BackendEnvironmentName.");
|
|
781
|
+
}
|
|
782
|
+
body = JSON.stringify(__assign({}, (input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName })));
|
|
783
|
+
return [2, new __HttpRequest({
|
|
784
|
+
protocol: protocol,
|
|
785
|
+
hostname: hostname,
|
|
786
|
+
port: port,
|
|
787
|
+
method: "POST",
|
|
788
|
+
headers: headers,
|
|
789
|
+
path: resolvedPath,
|
|
790
|
+
body: body,
|
|
791
|
+
})];
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
}); };
|
|
667
795
|
export var serializeAws_restJson1GetTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
668
796
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
669
797
|
return __generator(this, function (_c) {
|
|
@@ -752,6 +880,51 @@ export var serializeAws_restJson1ImportBackendAuthCommand = function (input, con
|
|
|
752
880
|
}
|
|
753
881
|
});
|
|
754
882
|
}); };
|
|
883
|
+
export var serializeAws_restJson1ImportBackendStorageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
884
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
885
|
+
return __generator(this, function (_c) {
|
|
886
|
+
switch (_c.label) {
|
|
887
|
+
case 0: return [4, context.endpoint()];
|
|
888
|
+
case 1:
|
|
889
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
890
|
+
headers = {
|
|
891
|
+
"content-type": "application/json",
|
|
892
|
+
};
|
|
893
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
894
|
+
"/backend/{AppId}/storage/{BackendEnvironmentName}/import";
|
|
895
|
+
if (input.AppId !== undefined) {
|
|
896
|
+
labelValue = input.AppId;
|
|
897
|
+
if (labelValue.length <= 0) {
|
|
898
|
+
throw new Error("Empty value provided for input HTTP label: AppId.");
|
|
899
|
+
}
|
|
900
|
+
resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue));
|
|
901
|
+
}
|
|
902
|
+
else {
|
|
903
|
+
throw new Error("No value provided for input HTTP label: AppId.");
|
|
904
|
+
}
|
|
905
|
+
if (input.BackendEnvironmentName !== undefined) {
|
|
906
|
+
labelValue = input.BackendEnvironmentName;
|
|
907
|
+
if (labelValue.length <= 0) {
|
|
908
|
+
throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName.");
|
|
909
|
+
}
|
|
910
|
+
resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue));
|
|
911
|
+
}
|
|
912
|
+
else {
|
|
913
|
+
throw new Error("No value provided for input HTTP label: BackendEnvironmentName.");
|
|
914
|
+
}
|
|
915
|
+
body = JSON.stringify(__assign(__assign({}, (input.BucketName !== undefined && input.BucketName !== null && { bucketName: input.BucketName })), (input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName })));
|
|
916
|
+
return [2, new __HttpRequest({
|
|
917
|
+
protocol: protocol,
|
|
918
|
+
hostname: hostname,
|
|
919
|
+
port: port,
|
|
920
|
+
method: "POST",
|
|
921
|
+
headers: headers,
|
|
922
|
+
path: resolvedPath,
|
|
923
|
+
body: body,
|
|
924
|
+
})];
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
}); };
|
|
755
928
|
export var serializeAws_restJson1ListBackendJobsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
756
929
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
757
930
|
return __generator(this, function (_c) {
|
|
@@ -797,6 +970,30 @@ export var serializeAws_restJson1ListBackendJobsCommand = function (input, conte
|
|
|
797
970
|
}
|
|
798
971
|
});
|
|
799
972
|
}); };
|
|
973
|
+
export var serializeAws_restJson1ListS3BucketsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
974
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
975
|
+
return __generator(this, function (_c) {
|
|
976
|
+
switch (_c.label) {
|
|
977
|
+
case 0: return [4, context.endpoint()];
|
|
978
|
+
case 1:
|
|
979
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
980
|
+
headers = {
|
|
981
|
+
"content-type": "application/json",
|
|
982
|
+
};
|
|
983
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/s3Buckets";
|
|
984
|
+
body = JSON.stringify(__assign({}, (input.NextToken !== undefined && input.NextToken !== null && { nextToken: input.NextToken })));
|
|
985
|
+
return [2, new __HttpRequest({
|
|
986
|
+
protocol: protocol,
|
|
987
|
+
hostname: hostname,
|
|
988
|
+
port: port,
|
|
989
|
+
method: "POST",
|
|
990
|
+
headers: headers,
|
|
991
|
+
path: resolvedPath,
|
|
992
|
+
body: body,
|
|
993
|
+
})];
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
}); };
|
|
800
997
|
export var serializeAws_restJson1RemoveAllBackendsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
801
998
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
802
999
|
return __generator(this, function (_c) {
|
|
@@ -1051,6 +1248,54 @@ export var serializeAws_restJson1UpdateBackendJobCommand = function (input, cont
|
|
|
1051
1248
|
}
|
|
1052
1249
|
});
|
|
1053
1250
|
}); };
|
|
1251
|
+
export var serializeAws_restJson1UpdateBackendStorageCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1252
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1253
|
+
return __generator(this, function (_c) {
|
|
1254
|
+
switch (_c.label) {
|
|
1255
|
+
case 0: return [4, context.endpoint()];
|
|
1256
|
+
case 1:
|
|
1257
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1258
|
+
headers = {
|
|
1259
|
+
"content-type": "application/json",
|
|
1260
|
+
};
|
|
1261
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
1262
|
+
"/backend/{AppId}/storage/{BackendEnvironmentName}";
|
|
1263
|
+
if (input.AppId !== undefined) {
|
|
1264
|
+
labelValue = input.AppId;
|
|
1265
|
+
if (labelValue.length <= 0) {
|
|
1266
|
+
throw new Error("Empty value provided for input HTTP label: AppId.");
|
|
1267
|
+
}
|
|
1268
|
+
resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue));
|
|
1269
|
+
}
|
|
1270
|
+
else {
|
|
1271
|
+
throw new Error("No value provided for input HTTP label: AppId.");
|
|
1272
|
+
}
|
|
1273
|
+
if (input.BackendEnvironmentName !== undefined) {
|
|
1274
|
+
labelValue = input.BackendEnvironmentName;
|
|
1275
|
+
if (labelValue.length <= 0) {
|
|
1276
|
+
throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName.");
|
|
1277
|
+
}
|
|
1278
|
+
resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue));
|
|
1279
|
+
}
|
|
1280
|
+
else {
|
|
1281
|
+
throw new Error("No value provided for input HTTP label: BackendEnvironmentName.");
|
|
1282
|
+
}
|
|
1283
|
+
body = JSON.stringify(__assign(__assign({}, (input.ResourceConfig !== undefined &&
|
|
1284
|
+
input.ResourceConfig !== null && {
|
|
1285
|
+
resourceConfig: serializeAws_restJson1UpdateBackendStorageResourceConfig(input.ResourceConfig, context),
|
|
1286
|
+
})), (input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName })));
|
|
1287
|
+
return [2, new __HttpRequest({
|
|
1288
|
+
protocol: protocol,
|
|
1289
|
+
hostname: hostname,
|
|
1290
|
+
port: port,
|
|
1291
|
+
method: "POST",
|
|
1292
|
+
headers: headers,
|
|
1293
|
+
path: resolvedPath,
|
|
1294
|
+
body: body,
|
|
1295
|
+
})];
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
}); };
|
|
1054
1299
|
export var deserializeAws_restJson1CloneBackendCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1055
1300
|
var contents, data, _a, _b;
|
|
1056
1301
|
return __generator(this, function (_c) {
|
|
@@ -1573,20 +1818,20 @@ var deserializeAws_restJson1CreateBackendConfigCommandError = function (output,
|
|
|
1573
1818
|
}
|
|
1574
1819
|
});
|
|
1575
1820
|
}); };
|
|
1576
|
-
export var
|
|
1821
|
+
export var deserializeAws_restJson1CreateBackendStorageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1577
1822
|
var contents, data, _a, _b;
|
|
1578
1823
|
return __generator(this, function (_c) {
|
|
1579
1824
|
switch (_c.label) {
|
|
1580
1825
|
case 0:
|
|
1581
1826
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1582
|
-
return [2,
|
|
1827
|
+
return [2, deserializeAws_restJson1CreateBackendStorageCommandError(output, context)];
|
|
1583
1828
|
}
|
|
1584
1829
|
contents = {
|
|
1585
1830
|
$metadata: deserializeMetadata(output),
|
|
1586
1831
|
AppId: undefined,
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1832
|
+
BackendEnvironmentName: undefined,
|
|
1833
|
+
JobId: undefined,
|
|
1834
|
+
Status: undefined,
|
|
1590
1835
|
};
|
|
1591
1836
|
_a = __expectNonNull;
|
|
1592
1837
|
_b = __expectObject;
|
|
@@ -1596,20 +1841,20 @@ export var deserializeAws_restJson1CreateTokenCommand = function (output, contex
|
|
|
1596
1841
|
if (data.appId !== undefined && data.appId !== null) {
|
|
1597
1842
|
contents.AppId = __expectString(data.appId);
|
|
1598
1843
|
}
|
|
1599
|
-
if (data.
|
|
1600
|
-
contents.
|
|
1844
|
+
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
1845
|
+
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
1601
1846
|
}
|
|
1602
|
-
if (data.
|
|
1603
|
-
contents.
|
|
1847
|
+
if (data.jobId !== undefined && data.jobId !== null) {
|
|
1848
|
+
contents.JobId = __expectString(data.jobId);
|
|
1604
1849
|
}
|
|
1605
|
-
if (data.
|
|
1606
|
-
contents.
|
|
1850
|
+
if (data.status !== undefined && data.status !== null) {
|
|
1851
|
+
contents.Status = __expectString(data.status);
|
|
1607
1852
|
}
|
|
1608
1853
|
return [2, Promise.resolve(contents)];
|
|
1609
1854
|
}
|
|
1610
1855
|
});
|
|
1611
1856
|
}); };
|
|
1612
|
-
var
|
|
1857
|
+
var deserializeAws_restJson1CreateBackendStorageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1613
1858
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1614
1859
|
var _g;
|
|
1615
1860
|
return __generator(this, function (_h) {
|
|
@@ -1671,20 +1916,118 @@ var deserializeAws_restJson1CreateTokenCommandError = function (output, context)
|
|
|
1671
1916
|
}
|
|
1672
1917
|
});
|
|
1673
1918
|
}); };
|
|
1674
|
-
export var
|
|
1919
|
+
export var deserializeAws_restJson1CreateTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1675
1920
|
var contents, data, _a, _b;
|
|
1676
1921
|
return __generator(this, function (_c) {
|
|
1677
1922
|
switch (_c.label) {
|
|
1678
1923
|
case 0:
|
|
1679
1924
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1680
|
-
return [2,
|
|
1925
|
+
return [2, deserializeAws_restJson1CreateTokenCommandError(output, context)];
|
|
1681
1926
|
}
|
|
1682
1927
|
contents = {
|
|
1683
1928
|
$metadata: deserializeMetadata(output),
|
|
1684
1929
|
AppId: undefined,
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1930
|
+
ChallengeCode: undefined,
|
|
1931
|
+
SessionId: undefined,
|
|
1932
|
+
Ttl: undefined,
|
|
1933
|
+
};
|
|
1934
|
+
_a = __expectNonNull;
|
|
1935
|
+
_b = __expectObject;
|
|
1936
|
+
return [4, parseBody(output.body, context)];
|
|
1937
|
+
case 1:
|
|
1938
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1939
|
+
if (data.appId !== undefined && data.appId !== null) {
|
|
1940
|
+
contents.AppId = __expectString(data.appId);
|
|
1941
|
+
}
|
|
1942
|
+
if (data.challengeCode !== undefined && data.challengeCode !== null) {
|
|
1943
|
+
contents.ChallengeCode = __expectString(data.challengeCode);
|
|
1944
|
+
}
|
|
1945
|
+
if (data.sessionId !== undefined && data.sessionId !== null) {
|
|
1946
|
+
contents.SessionId = __expectString(data.sessionId);
|
|
1947
|
+
}
|
|
1948
|
+
if (data.ttl !== undefined && data.ttl !== null) {
|
|
1949
|
+
contents.Ttl = __expectString(data.ttl);
|
|
1950
|
+
}
|
|
1951
|
+
return [2, Promise.resolve(contents)];
|
|
1952
|
+
}
|
|
1953
|
+
});
|
|
1954
|
+
}); };
|
|
1955
|
+
var deserializeAws_restJson1CreateTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1956
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1957
|
+
var _g;
|
|
1958
|
+
return __generator(this, function (_h) {
|
|
1959
|
+
switch (_h.label) {
|
|
1960
|
+
case 0:
|
|
1961
|
+
_a = [__assign({}, output)];
|
|
1962
|
+
_g = {};
|
|
1963
|
+
return [4, parseBody(output.body, context)];
|
|
1964
|
+
case 1:
|
|
1965
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1966
|
+
errorCode = "UnknownError";
|
|
1967
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1968
|
+
_b = errorCode;
|
|
1969
|
+
switch (_b) {
|
|
1970
|
+
case "BadRequestException": return [3, 2];
|
|
1971
|
+
case "com.amazonaws.amplifybackend#BadRequestException": return [3, 2];
|
|
1972
|
+
case "GatewayTimeoutException": return [3, 4];
|
|
1973
|
+
case "com.amazonaws.amplifybackend#GatewayTimeoutException": return [3, 4];
|
|
1974
|
+
case "NotFoundException": return [3, 6];
|
|
1975
|
+
case "com.amazonaws.amplifybackend#NotFoundException": return [3, 6];
|
|
1976
|
+
case "TooManyRequestsException": return [3, 8];
|
|
1977
|
+
case "com.amazonaws.amplifybackend#TooManyRequestsException": return [3, 8];
|
|
1978
|
+
}
|
|
1979
|
+
return [3, 10];
|
|
1980
|
+
case 2:
|
|
1981
|
+
_c = [{}];
|
|
1982
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1983
|
+
case 3:
|
|
1984
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1985
|
+
return [3, 11];
|
|
1986
|
+
case 4:
|
|
1987
|
+
_d = [{}];
|
|
1988
|
+
return [4, deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)];
|
|
1989
|
+
case 5:
|
|
1990
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1991
|
+
return [3, 11];
|
|
1992
|
+
case 6:
|
|
1993
|
+
_e = [{}];
|
|
1994
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1995
|
+
case 7:
|
|
1996
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1997
|
+
return [3, 11];
|
|
1998
|
+
case 8:
|
|
1999
|
+
_f = [{}];
|
|
2000
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
2001
|
+
case 9:
|
|
2002
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2003
|
+
return [3, 11];
|
|
2004
|
+
case 10:
|
|
2005
|
+
parsedBody = parsedOutput.body;
|
|
2006
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2007
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2008
|
+
_h.label = 11;
|
|
2009
|
+
case 11:
|
|
2010
|
+
message = response.message || response.Message || errorCode;
|
|
2011
|
+
response.message = message;
|
|
2012
|
+
delete response.Message;
|
|
2013
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2014
|
+
}
|
|
2015
|
+
});
|
|
2016
|
+
}); };
|
|
2017
|
+
export var deserializeAws_restJson1DeleteBackendCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2018
|
+
var contents, data, _a, _b;
|
|
2019
|
+
return __generator(this, function (_c) {
|
|
2020
|
+
switch (_c.label) {
|
|
2021
|
+
case 0:
|
|
2022
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2023
|
+
return [2, deserializeAws_restJson1DeleteBackendCommandError(output, context)];
|
|
2024
|
+
}
|
|
2025
|
+
contents = {
|
|
2026
|
+
$metadata: deserializeMetadata(output),
|
|
2027
|
+
AppId: undefined,
|
|
2028
|
+
BackendEnvironmentName: undefined,
|
|
2029
|
+
Error: undefined,
|
|
2030
|
+
JobId: undefined,
|
|
1688
2031
|
Operation: undefined,
|
|
1689
2032
|
Status: undefined,
|
|
1690
2033
|
};
|
|
@@ -1989,6 +2332,104 @@ var deserializeAws_restJson1DeleteBackendAuthCommandError = function (output, co
|
|
|
1989
2332
|
}
|
|
1990
2333
|
});
|
|
1991
2334
|
}); };
|
|
2335
|
+
export var deserializeAws_restJson1DeleteBackendStorageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2336
|
+
var contents, data, _a, _b;
|
|
2337
|
+
return __generator(this, function (_c) {
|
|
2338
|
+
switch (_c.label) {
|
|
2339
|
+
case 0:
|
|
2340
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2341
|
+
return [2, deserializeAws_restJson1DeleteBackendStorageCommandError(output, context)];
|
|
2342
|
+
}
|
|
2343
|
+
contents = {
|
|
2344
|
+
$metadata: deserializeMetadata(output),
|
|
2345
|
+
AppId: undefined,
|
|
2346
|
+
BackendEnvironmentName: undefined,
|
|
2347
|
+
JobId: undefined,
|
|
2348
|
+
Status: undefined,
|
|
2349
|
+
};
|
|
2350
|
+
_a = __expectNonNull;
|
|
2351
|
+
_b = __expectObject;
|
|
2352
|
+
return [4, parseBody(output.body, context)];
|
|
2353
|
+
case 1:
|
|
2354
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2355
|
+
if (data.appId !== undefined && data.appId !== null) {
|
|
2356
|
+
contents.AppId = __expectString(data.appId);
|
|
2357
|
+
}
|
|
2358
|
+
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
2359
|
+
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
2360
|
+
}
|
|
2361
|
+
if (data.jobId !== undefined && data.jobId !== null) {
|
|
2362
|
+
contents.JobId = __expectString(data.jobId);
|
|
2363
|
+
}
|
|
2364
|
+
if (data.status !== undefined && data.status !== null) {
|
|
2365
|
+
contents.Status = __expectString(data.status);
|
|
2366
|
+
}
|
|
2367
|
+
return [2, Promise.resolve(contents)];
|
|
2368
|
+
}
|
|
2369
|
+
});
|
|
2370
|
+
}); };
|
|
2371
|
+
var deserializeAws_restJson1DeleteBackendStorageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2372
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2373
|
+
var _g;
|
|
2374
|
+
return __generator(this, function (_h) {
|
|
2375
|
+
switch (_h.label) {
|
|
2376
|
+
case 0:
|
|
2377
|
+
_a = [__assign({}, output)];
|
|
2378
|
+
_g = {};
|
|
2379
|
+
return [4, parseBody(output.body, context)];
|
|
2380
|
+
case 1:
|
|
2381
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
2382
|
+
errorCode = "UnknownError";
|
|
2383
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2384
|
+
_b = errorCode;
|
|
2385
|
+
switch (_b) {
|
|
2386
|
+
case "BadRequestException": return [3, 2];
|
|
2387
|
+
case "com.amazonaws.amplifybackend#BadRequestException": return [3, 2];
|
|
2388
|
+
case "GatewayTimeoutException": return [3, 4];
|
|
2389
|
+
case "com.amazonaws.amplifybackend#GatewayTimeoutException": return [3, 4];
|
|
2390
|
+
case "NotFoundException": return [3, 6];
|
|
2391
|
+
case "com.amazonaws.amplifybackend#NotFoundException": return [3, 6];
|
|
2392
|
+
case "TooManyRequestsException": return [3, 8];
|
|
2393
|
+
case "com.amazonaws.amplifybackend#TooManyRequestsException": return [3, 8];
|
|
2394
|
+
}
|
|
2395
|
+
return [3, 10];
|
|
2396
|
+
case 2:
|
|
2397
|
+
_c = [{}];
|
|
2398
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
2399
|
+
case 3:
|
|
2400
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2401
|
+
return [3, 11];
|
|
2402
|
+
case 4:
|
|
2403
|
+
_d = [{}];
|
|
2404
|
+
return [4, deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)];
|
|
2405
|
+
case 5:
|
|
2406
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2407
|
+
return [3, 11];
|
|
2408
|
+
case 6:
|
|
2409
|
+
_e = [{}];
|
|
2410
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2411
|
+
case 7:
|
|
2412
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2413
|
+
return [3, 11];
|
|
2414
|
+
case 8:
|
|
2415
|
+
_f = [{}];
|
|
2416
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
2417
|
+
case 9:
|
|
2418
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2419
|
+
return [3, 11];
|
|
2420
|
+
case 10:
|
|
2421
|
+
parsedBody = parsedOutput.body;
|
|
2422
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2423
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2424
|
+
_h.label = 11;
|
|
2425
|
+
case 11:
|
|
2426
|
+
message = response.message || response.Message || errorCode;
|
|
2427
|
+
response.message = message;
|
|
2428
|
+
delete response.Message;
|
|
2429
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2430
|
+
}
|
|
2431
|
+
});
|
|
2432
|
+
}); };
|
|
1992
2433
|
export var deserializeAws_restJson1DeleteTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1993
2434
|
var contents, data, _a, _b;
|
|
1994
2435
|
return __generator(this, function (_c) {
|
|
@@ -2489,15 +2930,328 @@ export var deserializeAws_restJson1GetBackendAuthCommand = function (output, con
|
|
|
2489
2930
|
switch (_c.label) {
|
|
2490
2931
|
case 0:
|
|
2491
2932
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2492
|
-
return [2, deserializeAws_restJson1GetBackendAuthCommandError(output, context)];
|
|
2933
|
+
return [2, deserializeAws_restJson1GetBackendAuthCommandError(output, context)];
|
|
2934
|
+
}
|
|
2935
|
+
contents = {
|
|
2936
|
+
$metadata: deserializeMetadata(output),
|
|
2937
|
+
AppId: undefined,
|
|
2938
|
+
BackendEnvironmentName: undefined,
|
|
2939
|
+
Error: undefined,
|
|
2940
|
+
ResourceConfig: undefined,
|
|
2941
|
+
ResourceName: undefined,
|
|
2942
|
+
};
|
|
2943
|
+
_a = __expectNonNull;
|
|
2944
|
+
_b = __expectObject;
|
|
2945
|
+
return [4, parseBody(output.body, context)];
|
|
2946
|
+
case 1:
|
|
2947
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2948
|
+
if (data.appId !== undefined && data.appId !== null) {
|
|
2949
|
+
contents.AppId = __expectString(data.appId);
|
|
2950
|
+
}
|
|
2951
|
+
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
2952
|
+
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
2953
|
+
}
|
|
2954
|
+
if (data.error !== undefined && data.error !== null) {
|
|
2955
|
+
contents.Error = __expectString(data.error);
|
|
2956
|
+
}
|
|
2957
|
+
if (data.resourceConfig !== undefined && data.resourceConfig !== null) {
|
|
2958
|
+
contents.ResourceConfig = deserializeAws_restJson1CreateBackendAuthResourceConfig(data.resourceConfig, context);
|
|
2959
|
+
}
|
|
2960
|
+
if (data.resourceName !== undefined && data.resourceName !== null) {
|
|
2961
|
+
contents.ResourceName = __expectString(data.resourceName);
|
|
2962
|
+
}
|
|
2963
|
+
return [2, Promise.resolve(contents)];
|
|
2964
|
+
}
|
|
2965
|
+
});
|
|
2966
|
+
}); };
|
|
2967
|
+
var deserializeAws_restJson1GetBackendAuthCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2968
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2969
|
+
var _g;
|
|
2970
|
+
return __generator(this, function (_h) {
|
|
2971
|
+
switch (_h.label) {
|
|
2972
|
+
case 0:
|
|
2973
|
+
_a = [__assign({}, output)];
|
|
2974
|
+
_g = {};
|
|
2975
|
+
return [4, parseBody(output.body, context)];
|
|
2976
|
+
case 1:
|
|
2977
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
2978
|
+
errorCode = "UnknownError";
|
|
2979
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2980
|
+
_b = errorCode;
|
|
2981
|
+
switch (_b) {
|
|
2982
|
+
case "BadRequestException": return [3, 2];
|
|
2983
|
+
case "com.amazonaws.amplifybackend#BadRequestException": return [3, 2];
|
|
2984
|
+
case "GatewayTimeoutException": return [3, 4];
|
|
2985
|
+
case "com.amazonaws.amplifybackend#GatewayTimeoutException": return [3, 4];
|
|
2986
|
+
case "NotFoundException": return [3, 6];
|
|
2987
|
+
case "com.amazonaws.amplifybackend#NotFoundException": return [3, 6];
|
|
2988
|
+
case "TooManyRequestsException": return [3, 8];
|
|
2989
|
+
case "com.amazonaws.amplifybackend#TooManyRequestsException": return [3, 8];
|
|
2990
|
+
}
|
|
2991
|
+
return [3, 10];
|
|
2992
|
+
case 2:
|
|
2993
|
+
_c = [{}];
|
|
2994
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
2995
|
+
case 3:
|
|
2996
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2997
|
+
return [3, 11];
|
|
2998
|
+
case 4:
|
|
2999
|
+
_d = [{}];
|
|
3000
|
+
return [4, deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)];
|
|
3001
|
+
case 5:
|
|
3002
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3003
|
+
return [3, 11];
|
|
3004
|
+
case 6:
|
|
3005
|
+
_e = [{}];
|
|
3006
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3007
|
+
case 7:
|
|
3008
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3009
|
+
return [3, 11];
|
|
3010
|
+
case 8:
|
|
3011
|
+
_f = [{}];
|
|
3012
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
3013
|
+
case 9:
|
|
3014
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3015
|
+
return [3, 11];
|
|
3016
|
+
case 10:
|
|
3017
|
+
parsedBody = parsedOutput.body;
|
|
3018
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3019
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3020
|
+
_h.label = 11;
|
|
3021
|
+
case 11:
|
|
3022
|
+
message = response.message || response.Message || errorCode;
|
|
3023
|
+
response.message = message;
|
|
3024
|
+
delete response.Message;
|
|
3025
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3026
|
+
}
|
|
3027
|
+
});
|
|
3028
|
+
}); };
|
|
3029
|
+
export var deserializeAws_restJson1GetBackendJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3030
|
+
var contents, data, _a, _b;
|
|
3031
|
+
return __generator(this, function (_c) {
|
|
3032
|
+
switch (_c.label) {
|
|
3033
|
+
case 0:
|
|
3034
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3035
|
+
return [2, deserializeAws_restJson1GetBackendJobCommandError(output, context)];
|
|
3036
|
+
}
|
|
3037
|
+
contents = {
|
|
3038
|
+
$metadata: deserializeMetadata(output),
|
|
3039
|
+
AppId: undefined,
|
|
3040
|
+
BackendEnvironmentName: undefined,
|
|
3041
|
+
CreateTime: undefined,
|
|
3042
|
+
Error: undefined,
|
|
3043
|
+
JobId: undefined,
|
|
3044
|
+
Operation: undefined,
|
|
3045
|
+
Status: undefined,
|
|
3046
|
+
UpdateTime: undefined,
|
|
3047
|
+
};
|
|
3048
|
+
_a = __expectNonNull;
|
|
3049
|
+
_b = __expectObject;
|
|
3050
|
+
return [4, parseBody(output.body, context)];
|
|
3051
|
+
case 1:
|
|
3052
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3053
|
+
if (data.appId !== undefined && data.appId !== null) {
|
|
3054
|
+
contents.AppId = __expectString(data.appId);
|
|
3055
|
+
}
|
|
3056
|
+
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
3057
|
+
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
3058
|
+
}
|
|
3059
|
+
if (data.createTime !== undefined && data.createTime !== null) {
|
|
3060
|
+
contents.CreateTime = __expectString(data.createTime);
|
|
3061
|
+
}
|
|
3062
|
+
if (data.error !== undefined && data.error !== null) {
|
|
3063
|
+
contents.Error = __expectString(data.error);
|
|
3064
|
+
}
|
|
3065
|
+
if (data.jobId !== undefined && data.jobId !== null) {
|
|
3066
|
+
contents.JobId = __expectString(data.jobId);
|
|
3067
|
+
}
|
|
3068
|
+
if (data.operation !== undefined && data.operation !== null) {
|
|
3069
|
+
contents.Operation = __expectString(data.operation);
|
|
3070
|
+
}
|
|
3071
|
+
if (data.status !== undefined && data.status !== null) {
|
|
3072
|
+
contents.Status = __expectString(data.status);
|
|
3073
|
+
}
|
|
3074
|
+
if (data.updateTime !== undefined && data.updateTime !== null) {
|
|
3075
|
+
contents.UpdateTime = __expectString(data.updateTime);
|
|
3076
|
+
}
|
|
3077
|
+
return [2, Promise.resolve(contents)];
|
|
3078
|
+
}
|
|
3079
|
+
});
|
|
3080
|
+
}); };
|
|
3081
|
+
var deserializeAws_restJson1GetBackendJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3082
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
3083
|
+
var _g;
|
|
3084
|
+
return __generator(this, function (_h) {
|
|
3085
|
+
switch (_h.label) {
|
|
3086
|
+
case 0:
|
|
3087
|
+
_a = [__assign({}, output)];
|
|
3088
|
+
_g = {};
|
|
3089
|
+
return [4, parseBody(output.body, context)];
|
|
3090
|
+
case 1:
|
|
3091
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
3092
|
+
errorCode = "UnknownError";
|
|
3093
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3094
|
+
_b = errorCode;
|
|
3095
|
+
switch (_b) {
|
|
3096
|
+
case "BadRequestException": return [3, 2];
|
|
3097
|
+
case "com.amazonaws.amplifybackend#BadRequestException": return [3, 2];
|
|
3098
|
+
case "GatewayTimeoutException": return [3, 4];
|
|
3099
|
+
case "com.amazonaws.amplifybackend#GatewayTimeoutException": return [3, 4];
|
|
3100
|
+
case "NotFoundException": return [3, 6];
|
|
3101
|
+
case "com.amazonaws.amplifybackend#NotFoundException": return [3, 6];
|
|
3102
|
+
case "TooManyRequestsException": return [3, 8];
|
|
3103
|
+
case "com.amazonaws.amplifybackend#TooManyRequestsException": return [3, 8];
|
|
3104
|
+
}
|
|
3105
|
+
return [3, 10];
|
|
3106
|
+
case 2:
|
|
3107
|
+
_c = [{}];
|
|
3108
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3109
|
+
case 3:
|
|
3110
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3111
|
+
return [3, 11];
|
|
3112
|
+
case 4:
|
|
3113
|
+
_d = [{}];
|
|
3114
|
+
return [4, deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)];
|
|
3115
|
+
case 5:
|
|
3116
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3117
|
+
return [3, 11];
|
|
3118
|
+
case 6:
|
|
3119
|
+
_e = [{}];
|
|
3120
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3121
|
+
case 7:
|
|
3122
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3123
|
+
return [3, 11];
|
|
3124
|
+
case 8:
|
|
3125
|
+
_f = [{}];
|
|
3126
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
3127
|
+
case 9:
|
|
3128
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3129
|
+
return [3, 11];
|
|
3130
|
+
case 10:
|
|
3131
|
+
parsedBody = parsedOutput.body;
|
|
3132
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3133
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3134
|
+
_h.label = 11;
|
|
3135
|
+
case 11:
|
|
3136
|
+
message = response.message || response.Message || errorCode;
|
|
3137
|
+
response.message = message;
|
|
3138
|
+
delete response.Message;
|
|
3139
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3140
|
+
}
|
|
3141
|
+
});
|
|
3142
|
+
}); };
|
|
3143
|
+
export var deserializeAws_restJson1GetBackendStorageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3144
|
+
var contents, data, _a, _b;
|
|
3145
|
+
return __generator(this, function (_c) {
|
|
3146
|
+
switch (_c.label) {
|
|
3147
|
+
case 0:
|
|
3148
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3149
|
+
return [2, deserializeAws_restJson1GetBackendStorageCommandError(output, context)];
|
|
3150
|
+
}
|
|
3151
|
+
contents = {
|
|
3152
|
+
$metadata: deserializeMetadata(output),
|
|
3153
|
+
AppId: undefined,
|
|
3154
|
+
BackendEnvironmentName: undefined,
|
|
3155
|
+
ResourceConfig: undefined,
|
|
3156
|
+
ResourceName: undefined,
|
|
3157
|
+
};
|
|
3158
|
+
_a = __expectNonNull;
|
|
3159
|
+
_b = __expectObject;
|
|
3160
|
+
return [4, parseBody(output.body, context)];
|
|
3161
|
+
case 1:
|
|
3162
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3163
|
+
if (data.appId !== undefined && data.appId !== null) {
|
|
3164
|
+
contents.AppId = __expectString(data.appId);
|
|
3165
|
+
}
|
|
3166
|
+
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
3167
|
+
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
3168
|
+
}
|
|
3169
|
+
if (data.resourceConfig !== undefined && data.resourceConfig !== null) {
|
|
3170
|
+
contents.ResourceConfig = deserializeAws_restJson1GetBackendStorageResourceConfig(data.resourceConfig, context);
|
|
3171
|
+
}
|
|
3172
|
+
if (data.resourceName !== undefined && data.resourceName !== null) {
|
|
3173
|
+
contents.ResourceName = __expectString(data.resourceName);
|
|
3174
|
+
}
|
|
3175
|
+
return [2, Promise.resolve(contents)];
|
|
3176
|
+
}
|
|
3177
|
+
});
|
|
3178
|
+
}); };
|
|
3179
|
+
var deserializeAws_restJson1GetBackendStorageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3180
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
3181
|
+
var _g;
|
|
3182
|
+
return __generator(this, function (_h) {
|
|
3183
|
+
switch (_h.label) {
|
|
3184
|
+
case 0:
|
|
3185
|
+
_a = [__assign({}, output)];
|
|
3186
|
+
_g = {};
|
|
3187
|
+
return [4, parseBody(output.body, context)];
|
|
3188
|
+
case 1:
|
|
3189
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
3190
|
+
errorCode = "UnknownError";
|
|
3191
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3192
|
+
_b = errorCode;
|
|
3193
|
+
switch (_b) {
|
|
3194
|
+
case "BadRequestException": return [3, 2];
|
|
3195
|
+
case "com.amazonaws.amplifybackend#BadRequestException": return [3, 2];
|
|
3196
|
+
case "GatewayTimeoutException": return [3, 4];
|
|
3197
|
+
case "com.amazonaws.amplifybackend#GatewayTimeoutException": return [3, 4];
|
|
3198
|
+
case "NotFoundException": return [3, 6];
|
|
3199
|
+
case "com.amazonaws.amplifybackend#NotFoundException": return [3, 6];
|
|
3200
|
+
case "TooManyRequestsException": return [3, 8];
|
|
3201
|
+
case "com.amazonaws.amplifybackend#TooManyRequestsException": return [3, 8];
|
|
3202
|
+
}
|
|
3203
|
+
return [3, 10];
|
|
3204
|
+
case 2:
|
|
3205
|
+
_c = [{}];
|
|
3206
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3207
|
+
case 3:
|
|
3208
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3209
|
+
return [3, 11];
|
|
3210
|
+
case 4:
|
|
3211
|
+
_d = [{}];
|
|
3212
|
+
return [4, deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)];
|
|
3213
|
+
case 5:
|
|
3214
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3215
|
+
return [3, 11];
|
|
3216
|
+
case 6:
|
|
3217
|
+
_e = [{}];
|
|
3218
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3219
|
+
case 7:
|
|
3220
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3221
|
+
return [3, 11];
|
|
3222
|
+
case 8:
|
|
3223
|
+
_f = [{}];
|
|
3224
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
3225
|
+
case 9:
|
|
3226
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3227
|
+
return [3, 11];
|
|
3228
|
+
case 10:
|
|
3229
|
+
parsedBody = parsedOutput.body;
|
|
3230
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3231
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3232
|
+
_h.label = 11;
|
|
3233
|
+
case 11:
|
|
3234
|
+
message = response.message || response.Message || errorCode;
|
|
3235
|
+
response.message = message;
|
|
3236
|
+
delete response.Message;
|
|
3237
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3238
|
+
}
|
|
3239
|
+
});
|
|
3240
|
+
}); };
|
|
3241
|
+
export var deserializeAws_restJson1GetTokenCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3242
|
+
var contents, data, _a, _b;
|
|
3243
|
+
return __generator(this, function (_c) {
|
|
3244
|
+
switch (_c.label) {
|
|
3245
|
+
case 0:
|
|
3246
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3247
|
+
return [2, deserializeAws_restJson1GetTokenCommandError(output, context)];
|
|
2493
3248
|
}
|
|
2494
3249
|
contents = {
|
|
2495
3250
|
$metadata: deserializeMetadata(output),
|
|
2496
3251
|
AppId: undefined,
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
ResourceName: undefined,
|
|
3252
|
+
ChallengeCode: undefined,
|
|
3253
|
+
SessionId: undefined,
|
|
3254
|
+
Ttl: undefined,
|
|
2501
3255
|
};
|
|
2502
3256
|
_a = __expectNonNull;
|
|
2503
3257
|
_b = __expectObject;
|
|
@@ -2507,23 +3261,20 @@ export var deserializeAws_restJson1GetBackendAuthCommand = function (output, con
|
|
|
2507
3261
|
if (data.appId !== undefined && data.appId !== null) {
|
|
2508
3262
|
contents.AppId = __expectString(data.appId);
|
|
2509
3263
|
}
|
|
2510
|
-
if (data.
|
|
2511
|
-
contents.
|
|
2512
|
-
}
|
|
2513
|
-
if (data.error !== undefined && data.error !== null) {
|
|
2514
|
-
contents.Error = __expectString(data.error);
|
|
3264
|
+
if (data.challengeCode !== undefined && data.challengeCode !== null) {
|
|
3265
|
+
contents.ChallengeCode = __expectString(data.challengeCode);
|
|
2515
3266
|
}
|
|
2516
|
-
if (data.
|
|
2517
|
-
contents.
|
|
3267
|
+
if (data.sessionId !== undefined && data.sessionId !== null) {
|
|
3268
|
+
contents.SessionId = __expectString(data.sessionId);
|
|
2518
3269
|
}
|
|
2519
|
-
if (data.
|
|
2520
|
-
contents.
|
|
3270
|
+
if (data.ttl !== undefined && data.ttl !== null) {
|
|
3271
|
+
contents.Ttl = __expectString(data.ttl);
|
|
2521
3272
|
}
|
|
2522
3273
|
return [2, Promise.resolve(contents)];
|
|
2523
3274
|
}
|
|
2524
3275
|
});
|
|
2525
3276
|
}); };
|
|
2526
|
-
var
|
|
3277
|
+
var deserializeAws_restJson1GetTokenCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2527
3278
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2528
3279
|
var _g;
|
|
2529
3280
|
return __generator(this, function (_h) {
|
|
@@ -2585,24 +3336,22 @@ var deserializeAws_restJson1GetBackendAuthCommandError = function (output, conte
|
|
|
2585
3336
|
}
|
|
2586
3337
|
});
|
|
2587
3338
|
}); };
|
|
2588
|
-
export var
|
|
3339
|
+
export var deserializeAws_restJson1ImportBackendAuthCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2589
3340
|
var contents, data, _a, _b;
|
|
2590
3341
|
return __generator(this, function (_c) {
|
|
2591
3342
|
switch (_c.label) {
|
|
2592
3343
|
case 0:
|
|
2593
3344
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2594
|
-
return [2,
|
|
3345
|
+
return [2, deserializeAws_restJson1ImportBackendAuthCommandError(output, context)];
|
|
2595
3346
|
}
|
|
2596
3347
|
contents = {
|
|
2597
3348
|
$metadata: deserializeMetadata(output),
|
|
2598
3349
|
AppId: undefined,
|
|
2599
3350
|
BackendEnvironmentName: undefined,
|
|
2600
|
-
CreateTime: undefined,
|
|
2601
3351
|
Error: undefined,
|
|
2602
3352
|
JobId: undefined,
|
|
2603
3353
|
Operation: undefined,
|
|
2604
3354
|
Status: undefined,
|
|
2605
|
-
UpdateTime: undefined,
|
|
2606
3355
|
};
|
|
2607
3356
|
_a = __expectNonNull;
|
|
2608
3357
|
_b = __expectObject;
|
|
@@ -2615,9 +3364,6 @@ export var deserializeAws_restJson1GetBackendJobCommand = function (output, cont
|
|
|
2615
3364
|
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
2616
3365
|
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
2617
3366
|
}
|
|
2618
|
-
if (data.createTime !== undefined && data.createTime !== null) {
|
|
2619
|
-
contents.CreateTime = __expectString(data.createTime);
|
|
2620
|
-
}
|
|
2621
3367
|
if (data.error !== undefined && data.error !== null) {
|
|
2622
3368
|
contents.Error = __expectString(data.error);
|
|
2623
3369
|
}
|
|
@@ -2630,14 +3376,11 @@ export var deserializeAws_restJson1GetBackendJobCommand = function (output, cont
|
|
|
2630
3376
|
if (data.status !== undefined && data.status !== null) {
|
|
2631
3377
|
contents.Status = __expectString(data.status);
|
|
2632
3378
|
}
|
|
2633
|
-
if (data.updateTime !== undefined && data.updateTime !== null) {
|
|
2634
|
-
contents.UpdateTime = __expectString(data.updateTime);
|
|
2635
|
-
}
|
|
2636
3379
|
return [2, Promise.resolve(contents)];
|
|
2637
3380
|
}
|
|
2638
3381
|
});
|
|
2639
3382
|
}); };
|
|
2640
|
-
var
|
|
3383
|
+
var deserializeAws_restJson1ImportBackendAuthCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2641
3384
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2642
3385
|
var _g;
|
|
2643
3386
|
return __generator(this, function (_h) {
|
|
@@ -2699,20 +3442,20 @@ var deserializeAws_restJson1GetBackendJobCommandError = function (output, contex
|
|
|
2699
3442
|
}
|
|
2700
3443
|
});
|
|
2701
3444
|
}); };
|
|
2702
|
-
export var
|
|
3445
|
+
export var deserializeAws_restJson1ImportBackendStorageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2703
3446
|
var contents, data, _a, _b;
|
|
2704
3447
|
return __generator(this, function (_c) {
|
|
2705
3448
|
switch (_c.label) {
|
|
2706
3449
|
case 0:
|
|
2707
3450
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2708
|
-
return [2,
|
|
3451
|
+
return [2, deserializeAws_restJson1ImportBackendStorageCommandError(output, context)];
|
|
2709
3452
|
}
|
|
2710
3453
|
contents = {
|
|
2711
3454
|
$metadata: deserializeMetadata(output),
|
|
2712
3455
|
AppId: undefined,
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
3456
|
+
BackendEnvironmentName: undefined,
|
|
3457
|
+
JobId: undefined,
|
|
3458
|
+
Status: undefined,
|
|
2716
3459
|
};
|
|
2717
3460
|
_a = __expectNonNull;
|
|
2718
3461
|
_b = __expectObject;
|
|
@@ -2722,20 +3465,20 @@ export var deserializeAws_restJson1GetTokenCommand = function (output, context)
|
|
|
2722
3465
|
if (data.appId !== undefined && data.appId !== null) {
|
|
2723
3466
|
contents.AppId = __expectString(data.appId);
|
|
2724
3467
|
}
|
|
2725
|
-
if (data.
|
|
2726
|
-
contents.
|
|
3468
|
+
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
3469
|
+
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
2727
3470
|
}
|
|
2728
|
-
if (data.
|
|
2729
|
-
contents.
|
|
3471
|
+
if (data.jobId !== undefined && data.jobId !== null) {
|
|
3472
|
+
contents.JobId = __expectString(data.jobId);
|
|
2730
3473
|
}
|
|
2731
|
-
if (data.
|
|
2732
|
-
contents.
|
|
3474
|
+
if (data.status !== undefined && data.status !== null) {
|
|
3475
|
+
contents.Status = __expectString(data.status);
|
|
2733
3476
|
}
|
|
2734
3477
|
return [2, Promise.resolve(contents)];
|
|
2735
3478
|
}
|
|
2736
3479
|
});
|
|
2737
3480
|
}); };
|
|
2738
|
-
var
|
|
3481
|
+
var deserializeAws_restJson1ImportBackendStorageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2739
3482
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2740
3483
|
var _g;
|
|
2741
3484
|
return __generator(this, function (_h) {
|
|
@@ -2797,51 +3540,35 @@ var deserializeAws_restJson1GetTokenCommandError = function (output, context) {
|
|
|
2797
3540
|
}
|
|
2798
3541
|
});
|
|
2799
3542
|
}); };
|
|
2800
|
-
export var
|
|
3543
|
+
export var deserializeAws_restJson1ListBackendJobsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2801
3544
|
var contents, data, _a, _b;
|
|
2802
3545
|
return __generator(this, function (_c) {
|
|
2803
3546
|
switch (_c.label) {
|
|
2804
3547
|
case 0:
|
|
2805
3548
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2806
|
-
return [2,
|
|
3549
|
+
return [2, deserializeAws_restJson1ListBackendJobsCommandError(output, context)];
|
|
2807
3550
|
}
|
|
2808
3551
|
contents = {
|
|
2809
3552
|
$metadata: deserializeMetadata(output),
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
Error: undefined,
|
|
2813
|
-
JobId: undefined,
|
|
2814
|
-
Operation: undefined,
|
|
2815
|
-
Status: undefined,
|
|
3553
|
+
Jobs: undefined,
|
|
3554
|
+
NextToken: undefined,
|
|
2816
3555
|
};
|
|
2817
3556
|
_a = __expectNonNull;
|
|
2818
3557
|
_b = __expectObject;
|
|
2819
3558
|
return [4, parseBody(output.body, context)];
|
|
2820
3559
|
case 1:
|
|
2821
3560
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2822
|
-
if (data.
|
|
2823
|
-
contents.
|
|
2824
|
-
}
|
|
2825
|
-
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
2826
|
-
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
2827
|
-
}
|
|
2828
|
-
if (data.error !== undefined && data.error !== null) {
|
|
2829
|
-
contents.Error = __expectString(data.error);
|
|
2830
|
-
}
|
|
2831
|
-
if (data.jobId !== undefined && data.jobId !== null) {
|
|
2832
|
-
contents.JobId = __expectString(data.jobId);
|
|
2833
|
-
}
|
|
2834
|
-
if (data.operation !== undefined && data.operation !== null) {
|
|
2835
|
-
contents.Operation = __expectString(data.operation);
|
|
3561
|
+
if (data.jobs !== undefined && data.jobs !== null) {
|
|
3562
|
+
contents.Jobs = deserializeAws_restJson1ListOfBackendJobRespObj(data.jobs, context);
|
|
2836
3563
|
}
|
|
2837
|
-
if (data.
|
|
2838
|
-
contents.
|
|
3564
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
3565
|
+
contents.NextToken = __expectString(data.nextToken);
|
|
2839
3566
|
}
|
|
2840
3567
|
return [2, Promise.resolve(contents)];
|
|
2841
3568
|
}
|
|
2842
3569
|
});
|
|
2843
3570
|
}); };
|
|
2844
|
-
var
|
|
3571
|
+
var deserializeAws_restJson1ListBackendJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2845
3572
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2846
3573
|
var _g;
|
|
2847
3574
|
return __generator(this, function (_h) {
|
|
@@ -2903,17 +3630,17 @@ var deserializeAws_restJson1ImportBackendAuthCommandError = function (output, co
|
|
|
2903
3630
|
}
|
|
2904
3631
|
});
|
|
2905
3632
|
}); };
|
|
2906
|
-
export var
|
|
3633
|
+
export var deserializeAws_restJson1ListS3BucketsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2907
3634
|
var contents, data, _a, _b;
|
|
2908
3635
|
return __generator(this, function (_c) {
|
|
2909
3636
|
switch (_c.label) {
|
|
2910
3637
|
case 0:
|
|
2911
3638
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2912
|
-
return [2,
|
|
3639
|
+
return [2, deserializeAws_restJson1ListS3BucketsCommandError(output, context)];
|
|
2913
3640
|
}
|
|
2914
3641
|
contents = {
|
|
2915
3642
|
$metadata: deserializeMetadata(output),
|
|
2916
|
-
|
|
3643
|
+
Buckets: undefined,
|
|
2917
3644
|
NextToken: undefined,
|
|
2918
3645
|
};
|
|
2919
3646
|
_a = __expectNonNull;
|
|
@@ -2921,8 +3648,8 @@ export var deserializeAws_restJson1ListBackendJobsCommand = function (output, co
|
|
|
2921
3648
|
return [4, parseBody(output.body, context)];
|
|
2922
3649
|
case 1:
|
|
2923
3650
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2924
|
-
if (data.
|
|
2925
|
-
contents.
|
|
3651
|
+
if (data.buckets !== undefined && data.buckets !== null) {
|
|
3652
|
+
contents.Buckets = deserializeAws_restJson1ListOfS3BucketInfo(data.buckets, context);
|
|
2926
3653
|
}
|
|
2927
3654
|
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2928
3655
|
contents.NextToken = __expectString(data.nextToken);
|
|
@@ -2931,7 +3658,7 @@ export var deserializeAws_restJson1ListBackendJobsCommand = function (output, co
|
|
|
2931
3658
|
}
|
|
2932
3659
|
});
|
|
2933
3660
|
}); };
|
|
2934
|
-
var
|
|
3661
|
+
var deserializeAws_restJson1ListS3BucketsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2935
3662
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2936
3663
|
var _g;
|
|
2937
3664
|
return __generator(this, function (_h) {
|
|
@@ -3605,6 +4332,104 @@ var deserializeAws_restJson1UpdateBackendJobCommandError = function (output, con
|
|
|
3605
4332
|
}
|
|
3606
4333
|
});
|
|
3607
4334
|
}); };
|
|
4335
|
+
export var deserializeAws_restJson1UpdateBackendStorageCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4336
|
+
var contents, data, _a, _b;
|
|
4337
|
+
return __generator(this, function (_c) {
|
|
4338
|
+
switch (_c.label) {
|
|
4339
|
+
case 0:
|
|
4340
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4341
|
+
return [2, deserializeAws_restJson1UpdateBackendStorageCommandError(output, context)];
|
|
4342
|
+
}
|
|
4343
|
+
contents = {
|
|
4344
|
+
$metadata: deserializeMetadata(output),
|
|
4345
|
+
AppId: undefined,
|
|
4346
|
+
BackendEnvironmentName: undefined,
|
|
4347
|
+
JobId: undefined,
|
|
4348
|
+
Status: undefined,
|
|
4349
|
+
};
|
|
4350
|
+
_a = __expectNonNull;
|
|
4351
|
+
_b = __expectObject;
|
|
4352
|
+
return [4, parseBody(output.body, context)];
|
|
4353
|
+
case 1:
|
|
4354
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
4355
|
+
if (data.appId !== undefined && data.appId !== null) {
|
|
4356
|
+
contents.AppId = __expectString(data.appId);
|
|
4357
|
+
}
|
|
4358
|
+
if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) {
|
|
4359
|
+
contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName);
|
|
4360
|
+
}
|
|
4361
|
+
if (data.jobId !== undefined && data.jobId !== null) {
|
|
4362
|
+
contents.JobId = __expectString(data.jobId);
|
|
4363
|
+
}
|
|
4364
|
+
if (data.status !== undefined && data.status !== null) {
|
|
4365
|
+
contents.Status = __expectString(data.status);
|
|
4366
|
+
}
|
|
4367
|
+
return [2, Promise.resolve(contents)];
|
|
4368
|
+
}
|
|
4369
|
+
});
|
|
4370
|
+
}); };
|
|
4371
|
+
var deserializeAws_restJson1UpdateBackendStorageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4372
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
4373
|
+
var _g;
|
|
4374
|
+
return __generator(this, function (_h) {
|
|
4375
|
+
switch (_h.label) {
|
|
4376
|
+
case 0:
|
|
4377
|
+
_a = [__assign({}, output)];
|
|
4378
|
+
_g = {};
|
|
4379
|
+
return [4, parseBody(output.body, context)];
|
|
4380
|
+
case 1:
|
|
4381
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
4382
|
+
errorCode = "UnknownError";
|
|
4383
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4384
|
+
_b = errorCode;
|
|
4385
|
+
switch (_b) {
|
|
4386
|
+
case "BadRequestException": return [3, 2];
|
|
4387
|
+
case "com.amazonaws.amplifybackend#BadRequestException": return [3, 2];
|
|
4388
|
+
case "GatewayTimeoutException": return [3, 4];
|
|
4389
|
+
case "com.amazonaws.amplifybackend#GatewayTimeoutException": return [3, 4];
|
|
4390
|
+
case "NotFoundException": return [3, 6];
|
|
4391
|
+
case "com.amazonaws.amplifybackend#NotFoundException": return [3, 6];
|
|
4392
|
+
case "TooManyRequestsException": return [3, 8];
|
|
4393
|
+
case "com.amazonaws.amplifybackend#TooManyRequestsException": return [3, 8];
|
|
4394
|
+
}
|
|
4395
|
+
return [3, 10];
|
|
4396
|
+
case 2:
|
|
4397
|
+
_c = [{}];
|
|
4398
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
4399
|
+
case 3:
|
|
4400
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4401
|
+
return [3, 11];
|
|
4402
|
+
case 4:
|
|
4403
|
+
_d = [{}];
|
|
4404
|
+
return [4, deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)];
|
|
4405
|
+
case 5:
|
|
4406
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4407
|
+
return [3, 11];
|
|
4408
|
+
case 6:
|
|
4409
|
+
_e = [{}];
|
|
4410
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
4411
|
+
case 7:
|
|
4412
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4413
|
+
return [3, 11];
|
|
4414
|
+
case 8:
|
|
4415
|
+
_f = [{}];
|
|
4416
|
+
return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
4417
|
+
case 9:
|
|
4418
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4419
|
+
return [3, 11];
|
|
4420
|
+
case 10:
|
|
4421
|
+
parsedBody = parsedOutput.body;
|
|
4422
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4423
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
4424
|
+
_h.label = 11;
|
|
4425
|
+
case 11:
|
|
4426
|
+
message = response.message || response.Message || errorCode;
|
|
4427
|
+
response.message = message;
|
|
4428
|
+
delete response.Message;
|
|
4429
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
4430
|
+
}
|
|
4431
|
+
});
|
|
4432
|
+
}); };
|
|
3608
4433
|
var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3609
4434
|
var contents, data;
|
|
3610
4435
|
return __generator(this, function (_a) {
|
|
@@ -3714,6 +4539,15 @@ var serializeAws_restJson1BackendAuthAppleProviderConfig = function (input, cont
|
|
|
3714
4539
|
var serializeAws_restJson1BackendAuthSocialProviderConfig = function (input, context) {
|
|
3715
4540
|
return __assign(__assign({}, (input.ClientId !== undefined && input.ClientId !== null && { client_id: input.ClientId })), (input.ClientSecret !== undefined && input.ClientSecret !== null && { client_secret: input.ClientSecret }));
|
|
3716
4541
|
};
|
|
4542
|
+
var serializeAws_restJson1BackendStoragePermissions = function (input, context) {
|
|
4543
|
+
return __assign(__assign({}, (input.Authenticated !== undefined &&
|
|
4544
|
+
input.Authenticated !== null && {
|
|
4545
|
+
authenticated: serializeAws_restJson1ListOfAuthenticatedElement(input.Authenticated, context),
|
|
4546
|
+
})), (input.UnAuthenticated !== undefined &&
|
|
4547
|
+
input.UnAuthenticated !== null && {
|
|
4548
|
+
unAuthenticated: serializeAws_restJson1ListOfUnAuthenticatedElement(input.UnAuthenticated, context),
|
|
4549
|
+
}));
|
|
4550
|
+
};
|
|
3717
4551
|
var serializeAws_restJson1CreateBackendAuthForgotPasswordConfig = function (input, context) {
|
|
3718
4552
|
return __assign(__assign(__assign({}, (input.DeliveryMethod !== undefined &&
|
|
3719
4553
|
input.DeliveryMethod !== null && { deliveryMethod: input.DeliveryMethod })), (input.EmailSettings !== undefined &&
|
|
@@ -3777,6 +4611,12 @@ var serializeAws_restJson1CreateBackendAuthUserPoolConfig = function (input, con
|
|
|
3777
4611
|
requiredSignUpAttributes: serializeAws_restJson1ListOfRequiredSignUpAttributesElement(input.RequiredSignUpAttributes, context),
|
|
3778
4612
|
})), (input.SignInMethod !== undefined && input.SignInMethod !== null && { signInMethod: input.SignInMethod })), (input.UserPoolName !== undefined && input.UserPoolName !== null && { userPoolName: input.UserPoolName }));
|
|
3779
4613
|
};
|
|
4614
|
+
var serializeAws_restJson1CreateBackendStorageResourceConfig = function (input, context) {
|
|
4615
|
+
return __assign(__assign(__assign({}, (input.BucketName !== undefined && input.BucketName !== null && { bucketName: input.BucketName })), (input.Permissions !== undefined &&
|
|
4616
|
+
input.Permissions !== null && {
|
|
4617
|
+
permissions: serializeAws_restJson1BackendStoragePermissions(input.Permissions, context),
|
|
4618
|
+
})), (input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName }));
|
|
4619
|
+
};
|
|
3780
4620
|
var serializeAws_restJson1EmailSettings = function (input, context) {
|
|
3781
4621
|
return __assign(__assign({}, (input.EmailMessage !== undefined && input.EmailMessage !== null && { emailMessage: input.EmailMessage })), (input.EmailSubject !== undefined && input.EmailSubject !== null && { emailSubject: input.EmailSubject }));
|
|
3782
4622
|
};
|
|
@@ -3800,6 +4640,16 @@ var serializeAws_restJson1ListOfAdditionalConstraintsElement = function (input,
|
|
|
3800
4640
|
return entry;
|
|
3801
4641
|
});
|
|
3802
4642
|
};
|
|
4643
|
+
var serializeAws_restJson1ListOfAuthenticatedElement = function (input, context) {
|
|
4644
|
+
return input
|
|
4645
|
+
.filter(function (e) { return e != null; })
|
|
4646
|
+
.map(function (entry) {
|
|
4647
|
+
if (entry === null) {
|
|
4648
|
+
return null;
|
|
4649
|
+
}
|
|
4650
|
+
return entry;
|
|
4651
|
+
});
|
|
4652
|
+
};
|
|
3803
4653
|
var serializeAws_restJson1ListOfBackendAPIAuthType = function (input, context) {
|
|
3804
4654
|
return input
|
|
3805
4655
|
.filter(function (e) { return e != null; })
|
|
@@ -3840,6 +4690,16 @@ var serializeAws_restJson1ListOfRequiredSignUpAttributesElement = function (inpu
|
|
|
3840
4690
|
return entry;
|
|
3841
4691
|
});
|
|
3842
4692
|
};
|
|
4693
|
+
var serializeAws_restJson1ListOfUnAuthenticatedElement = function (input, context) {
|
|
4694
|
+
return input
|
|
4695
|
+
.filter(function (e) { return e != null; })
|
|
4696
|
+
.map(function (entry) {
|
|
4697
|
+
if (entry === null) {
|
|
4698
|
+
return null;
|
|
4699
|
+
}
|
|
4700
|
+
return entry;
|
|
4701
|
+
});
|
|
4702
|
+
};
|
|
3843
4703
|
var serializeAws_restJson1LoginAuthConfigReqObj = function (input, context) {
|
|
3844
4704
|
return __assign(__assign(__assign(__assign({}, (input.AwsCognitoIdentityPoolId !== undefined &&
|
|
3845
4705
|
input.AwsCognitoIdentityPoolId !== null && { aws_cognito_identity_pool_id: input.AwsCognitoIdentityPoolId })), (input.AwsCognitoRegion !== undefined &&
|
|
@@ -3931,6 +4791,12 @@ var serializeAws_restJson1UpdateBackendAuthUserPoolConfig = function (input, con
|
|
|
3931
4791
|
passwordPolicy: serializeAws_restJson1UpdateBackendAuthPasswordPolicyConfig(input.PasswordPolicy, context),
|
|
3932
4792
|
}));
|
|
3933
4793
|
};
|
|
4794
|
+
var serializeAws_restJson1UpdateBackendStorageResourceConfig = function (input, context) {
|
|
4795
|
+
return __assign(__assign({}, (input.Permissions !== undefined &&
|
|
4796
|
+
input.Permissions !== null && {
|
|
4797
|
+
permissions: serializeAws_restJson1BackendStoragePermissions(input.Permissions, context),
|
|
4798
|
+
})), (input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName }));
|
|
4799
|
+
};
|
|
3934
4800
|
var deserializeAws_restJson1BackendAPIAppSyncAuthSettings = function (output, context) {
|
|
3935
4801
|
return {
|
|
3936
4802
|
CognitoUserPoolId: __expectString(output.cognitoUserPoolId),
|
|
@@ -3998,6 +4864,16 @@ var deserializeAws_restJson1BackendJobRespObj = function (output, context) {
|
|
|
3998
4864
|
UpdateTime: __expectString(output.updateTime),
|
|
3999
4865
|
};
|
|
4000
4866
|
};
|
|
4867
|
+
var deserializeAws_restJson1BackendStoragePermissions = function (output, context) {
|
|
4868
|
+
return {
|
|
4869
|
+
Authenticated: output.authenticated !== undefined && output.authenticated !== null
|
|
4870
|
+
? deserializeAws_restJson1ListOfAuthenticatedElement(output.authenticated, context)
|
|
4871
|
+
: undefined,
|
|
4872
|
+
UnAuthenticated: output.unAuthenticated !== undefined && output.unAuthenticated !== null
|
|
4873
|
+
? deserializeAws_restJson1ListOfUnAuthenticatedElement(output.unAuthenticated, context)
|
|
4874
|
+
: undefined,
|
|
4875
|
+
};
|
|
4876
|
+
};
|
|
4001
4877
|
var deserializeAws_restJson1CreateBackendAuthForgotPasswordConfig = function (output, context) {
|
|
4002
4878
|
return {
|
|
4003
4879
|
DeliveryMethod: __expectString(output.deliveryMethod),
|
|
@@ -4088,6 +4964,16 @@ var deserializeAws_restJson1EmailSettings = function (output, context) {
|
|
|
4088
4964
|
EmailSubject: __expectString(output.emailSubject),
|
|
4089
4965
|
};
|
|
4090
4966
|
};
|
|
4967
|
+
var deserializeAws_restJson1GetBackendStorageResourceConfig = function (output, context) {
|
|
4968
|
+
return {
|
|
4969
|
+
BucketName: __expectString(output.bucketName),
|
|
4970
|
+
Imported: __expectBoolean(output.imported),
|
|
4971
|
+
Permissions: output.permissions !== undefined && output.permissions !== null
|
|
4972
|
+
? deserializeAws_restJson1BackendStoragePermissions(output.permissions, context)
|
|
4973
|
+
: undefined,
|
|
4974
|
+
ServiceName: __expectString(output.serviceName),
|
|
4975
|
+
};
|
|
4976
|
+
};
|
|
4091
4977
|
var deserializeAws_restJson1ListOf__string = function (output, context) {
|
|
4092
4978
|
return (output || [])
|
|
4093
4979
|
.filter(function (e) { return e != null; })
|
|
@@ -4108,6 +4994,16 @@ var deserializeAws_restJson1ListOfAdditionalConstraintsElement = function (outpu
|
|
|
4108
4994
|
return __expectString(entry);
|
|
4109
4995
|
});
|
|
4110
4996
|
};
|
|
4997
|
+
var deserializeAws_restJson1ListOfAuthenticatedElement = function (output, context) {
|
|
4998
|
+
return (output || [])
|
|
4999
|
+
.filter(function (e) { return e != null; })
|
|
5000
|
+
.map(function (entry) {
|
|
5001
|
+
if (entry === null) {
|
|
5002
|
+
return null;
|
|
5003
|
+
}
|
|
5004
|
+
return __expectString(entry);
|
|
5005
|
+
});
|
|
5006
|
+
};
|
|
4111
5007
|
var deserializeAws_restJson1ListOfBackendAPIAuthType = function (output, context) {
|
|
4112
5008
|
return (output || [])
|
|
4113
5009
|
.filter(function (e) { return e != null; })
|
|
@@ -4158,6 +5054,26 @@ var deserializeAws_restJson1ListOfRequiredSignUpAttributesElement = function (ou
|
|
|
4158
5054
|
return __expectString(entry);
|
|
4159
5055
|
});
|
|
4160
5056
|
};
|
|
5057
|
+
var deserializeAws_restJson1ListOfS3BucketInfo = function (output, context) {
|
|
5058
|
+
return (output || [])
|
|
5059
|
+
.filter(function (e) { return e != null; })
|
|
5060
|
+
.map(function (entry) {
|
|
5061
|
+
if (entry === null) {
|
|
5062
|
+
return null;
|
|
5063
|
+
}
|
|
5064
|
+
return deserializeAws_restJson1S3BucketInfo(entry, context);
|
|
5065
|
+
});
|
|
5066
|
+
};
|
|
5067
|
+
var deserializeAws_restJson1ListOfUnAuthenticatedElement = function (output, context) {
|
|
5068
|
+
return (output || [])
|
|
5069
|
+
.filter(function (e) { return e != null; })
|
|
5070
|
+
.map(function (entry) {
|
|
5071
|
+
if (entry === null) {
|
|
5072
|
+
return null;
|
|
5073
|
+
}
|
|
5074
|
+
return __expectString(entry);
|
|
5075
|
+
});
|
|
5076
|
+
};
|
|
4161
5077
|
var deserializeAws_restJson1LoginAuthConfigReqObj = function (output, context) {
|
|
4162
5078
|
return {
|
|
4163
5079
|
AwsCognitoIdentityPoolId: __expectString(output.aws_cognito_identity_pool_id),
|
|
@@ -4166,6 +5082,12 @@ var deserializeAws_restJson1LoginAuthConfigReqObj = function (output, context) {
|
|
|
4166
5082
|
AwsUserPoolsWebClientId: __expectString(output.aws_user_pools_web_client_id),
|
|
4167
5083
|
};
|
|
4168
5084
|
};
|
|
5085
|
+
var deserializeAws_restJson1S3BucketInfo = function (output, context) {
|
|
5086
|
+
return {
|
|
5087
|
+
CreationDate: __expectString(output.creationDate),
|
|
5088
|
+
Name: __expectString(output.name),
|
|
5089
|
+
};
|
|
5090
|
+
};
|
|
4169
5091
|
var deserializeAws_restJson1Settings = function (output, context) {
|
|
4170
5092
|
return {
|
|
4171
5093
|
MfaTypes: output.mfaTypes !== undefined && output.mfaTypes !== null
|