@aws-sdk/client-appsync 3.43.0 → 3.47.1
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 +48 -0
- package/README.md +7 -7
- package/dist-cjs/AppSync.js +120 -0
- package/dist-cjs/commands/AssociateApiCommand.js +36 -0
- package/dist-cjs/commands/CreateDomainNameCommand.js +36 -0
- package/dist-cjs/commands/DeleteDomainNameCommand.js +36 -0
- package/dist-cjs/commands/DisassociateApiCommand.js +36 -0
- package/dist-cjs/commands/GetApiAssociationCommand.js +36 -0
- package/dist-cjs/commands/GetDomainNameCommand.js +36 -0
- package/dist-cjs/commands/ListDomainNamesCommand.js +36 -0
- package/dist-cjs/commands/UpdateDomainNameCommand.js +36 -0
- package/dist-cjs/commands/index.js +8 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +113 -65
- package/dist-cjs/protocols/Aws_restJson1.js +917 -93
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/AppSync.js +120 -0
- package/dist-es/commands/AssociateApiCommand.js +39 -0
- package/dist-es/commands/CreateDomainNameCommand.js +39 -0
- package/dist-es/commands/DeleteDomainNameCommand.js +39 -0
- package/dist-es/commands/DisassociateApiCommand.js +39 -0
- package/dist-es/commands/GetApiAssociationCommand.js +39 -0
- package/dist-es/commands/GetDomainNameCommand.js +39 -0
- package/dist-es/commands/ListDomainNamesCommand.js +39 -0
- package/dist-es/commands/UpdateDomainNameCommand.js +39 -0
- package/dist-es/commands/index.js +8 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +78 -44
- package/dist-es/protocols/Aws_restJson1.js +1048 -91
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/AppSync.d.ts +60 -5
- package/dist-types/AppSyncClient.d.ts +15 -3
- package/dist-types/commands/AssociateApiCommand.d.ts +35 -0
- package/dist-types/commands/CreateApiKeyCommand.d.ts +1 -2
- package/dist-types/commands/CreateDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/CreateFunctionCommand.d.ts +1 -1
- package/dist-types/commands/CreateResolverCommand.d.ts +1 -1
- package/dist-types/commands/DeleteDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/DisassociateApiCommand.d.ts +35 -0
- package/dist-types/commands/GetApiAssociationCommand.d.ts +35 -0
- package/dist-types/commands/GetDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/ListDomainNamesCommand.d.ts +35 -0
- package/dist-types/commands/UpdateApiKeyCommand.d.ts +1 -1
- package/dist-types/commands/UpdateDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/models/models_0.d.ts +556 -299
- package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/AppSync.d.ts +40 -0
- package/dist-types/ts3.4/AppSyncClient.d.ts +13 -3
- package/dist-types/ts3.4/commands/AssociateApiCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DisassociateApiCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetApiAssociationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDomainNamesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/models/models_0.d.ts +201 -60
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +39 -46
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
3
|
import { expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
|
|
4
|
+
export var serializeAws_restJson1AssociateApiCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
6
|
+
return __generator(this, function (_c) {
|
|
7
|
+
switch (_c.label) {
|
|
8
|
+
case 0: return [4, context.endpoint()];
|
|
9
|
+
case 1:
|
|
10
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
11
|
+
headers = {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
};
|
|
14
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames/{domainName}/apiassociation";
|
|
15
|
+
if (input.domainName !== undefined) {
|
|
16
|
+
labelValue = input.domainName;
|
|
17
|
+
if (labelValue.length <= 0) {
|
|
18
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
19
|
+
}
|
|
20
|
+
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
24
|
+
}
|
|
25
|
+
body = JSON.stringify(__assign({}, (input.apiId !== undefined && input.apiId !== null && { apiId: input.apiId })));
|
|
26
|
+
return [2, new __HttpRequest({
|
|
27
|
+
protocol: protocol,
|
|
28
|
+
hostname: hostname,
|
|
29
|
+
port: port,
|
|
30
|
+
method: "POST",
|
|
31
|
+
headers: headers,
|
|
32
|
+
path: resolvedPath,
|
|
33
|
+
body: body,
|
|
34
|
+
})];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}); };
|
|
4
38
|
export var serializeAws_restJson1CreateApiCacheCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
39
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
6
40
|
return __generator(this, function (_c) {
|
|
@@ -125,6 +159,31 @@ export var serializeAws_restJson1CreateDataSourceCommand = function (input, cont
|
|
|
125
159
|
}
|
|
126
160
|
});
|
|
127
161
|
}); };
|
|
162
|
+
export var serializeAws_restJson1CreateDomainNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
163
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
164
|
+
return __generator(this, function (_c) {
|
|
165
|
+
switch (_c.label) {
|
|
166
|
+
case 0: return [4, context.endpoint()];
|
|
167
|
+
case 1:
|
|
168
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
169
|
+
headers = {
|
|
170
|
+
"content-type": "application/json",
|
|
171
|
+
};
|
|
172
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames";
|
|
173
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.certificateArn !== undefined &&
|
|
174
|
+
input.certificateArn !== null && { certificateArn: input.certificateArn })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.domainName !== undefined && input.domainName !== null && { domainName: input.domainName })));
|
|
175
|
+
return [2, new __HttpRequest({
|
|
176
|
+
protocol: protocol,
|
|
177
|
+
hostname: hostname,
|
|
178
|
+
port: port,
|
|
179
|
+
method: "POST",
|
|
180
|
+
headers: headers,
|
|
181
|
+
path: resolvedPath,
|
|
182
|
+
body: body,
|
|
183
|
+
})];
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}); };
|
|
128
187
|
export var serializeAws_restJson1CreateFunctionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
129
188
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
130
189
|
return __generator(this, function (_c) {
|
|
@@ -146,9 +205,9 @@ export var serializeAws_restJson1CreateFunctionCommand = function (input, contex
|
|
|
146
205
|
else {
|
|
147
206
|
throw new Error("No value provided for input HTTP label: apiId.");
|
|
148
207
|
}
|
|
149
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.dataSourceName !== undefined &&
|
|
208
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.dataSourceName !== undefined &&
|
|
150
209
|
input.dataSourceName !== null && { dataSourceName: input.dataSourceName })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.functionVersion !== undefined &&
|
|
151
|
-
input.functionVersion !== null && { functionVersion: input.functionVersion })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.requestMappingTemplate !== undefined &&
|
|
210
|
+
input.functionVersion !== null && { functionVersion: input.functionVersion })), (input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.requestMappingTemplate !== undefined &&
|
|
152
211
|
input.requestMappingTemplate !== null && { requestMappingTemplate: input.requestMappingTemplate })), (input.responseMappingTemplate !== undefined &&
|
|
153
212
|
input.responseMappingTemplate !== null && { responseMappingTemplate: input.responseMappingTemplate })), (input.syncConfig !== undefined &&
|
|
154
213
|
input.syncConfig !== null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) })));
|
|
@@ -234,11 +293,11 @@ export var serializeAws_restJson1CreateResolverCommand = function (input, contex
|
|
|
234
293
|
else {
|
|
235
294
|
throw new Error("No value provided for input HTTP label: typeName.");
|
|
236
295
|
}
|
|
237
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.cachingConfig !== undefined &&
|
|
296
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.cachingConfig !== undefined &&
|
|
238
297
|
input.cachingConfig !== null && {
|
|
239
298
|
cachingConfig: serializeAws_restJson1CachingConfig(input.cachingConfig, context),
|
|
240
299
|
})), (input.dataSourceName !== undefined &&
|
|
241
|
-
input.dataSourceName !== null && { dataSourceName: input.dataSourceName })), (input.fieldName !== undefined && input.fieldName !== null && { fieldName: input.fieldName })), (input.kind !== undefined && input.kind !== null && { kind: input.kind })), (input.pipelineConfig !== undefined &&
|
|
300
|
+
input.dataSourceName !== null && { dataSourceName: input.dataSourceName })), (input.fieldName !== undefined && input.fieldName !== null && { fieldName: input.fieldName })), (input.kind !== undefined && input.kind !== null && { kind: input.kind })), (input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize })), (input.pipelineConfig !== undefined &&
|
|
242
301
|
input.pipelineConfig !== null && {
|
|
243
302
|
pipelineConfig: serializeAws_restJson1PipelineConfig(input.pipelineConfig, context),
|
|
244
303
|
})), (input.requestMappingTemplate !== undefined &&
|
|
@@ -404,6 +463,37 @@ export var serializeAws_restJson1DeleteDataSourceCommand = function (input, cont
|
|
|
404
463
|
}
|
|
405
464
|
});
|
|
406
465
|
}); };
|
|
466
|
+
export var serializeAws_restJson1DeleteDomainNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
467
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
468
|
+
return __generator(this, function (_c) {
|
|
469
|
+
switch (_c.label) {
|
|
470
|
+
case 0: return [4, context.endpoint()];
|
|
471
|
+
case 1:
|
|
472
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
473
|
+
headers = {};
|
|
474
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames/{domainName}";
|
|
475
|
+
if (input.domainName !== undefined) {
|
|
476
|
+
labelValue = input.domainName;
|
|
477
|
+
if (labelValue.length <= 0) {
|
|
478
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
479
|
+
}
|
|
480
|
+
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
484
|
+
}
|
|
485
|
+
return [2, new __HttpRequest({
|
|
486
|
+
protocol: protocol,
|
|
487
|
+
hostname: hostname,
|
|
488
|
+
port: port,
|
|
489
|
+
method: "DELETE",
|
|
490
|
+
headers: headers,
|
|
491
|
+
path: resolvedPath,
|
|
492
|
+
body: body,
|
|
493
|
+
})];
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}); };
|
|
407
497
|
export var serializeAws_restJson1DeleteFunctionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
408
498
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
409
499
|
return __generator(this, function (_c) {
|
|
@@ -569,6 +659,37 @@ export var serializeAws_restJson1DeleteTypeCommand = function (input, context) {
|
|
|
569
659
|
}
|
|
570
660
|
});
|
|
571
661
|
}); };
|
|
662
|
+
export var serializeAws_restJson1DisassociateApiCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
663
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
664
|
+
return __generator(this, function (_c) {
|
|
665
|
+
switch (_c.label) {
|
|
666
|
+
case 0: return [4, context.endpoint()];
|
|
667
|
+
case 1:
|
|
668
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
669
|
+
headers = {};
|
|
670
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames/{domainName}/apiassociation";
|
|
671
|
+
if (input.domainName !== undefined) {
|
|
672
|
+
labelValue = input.domainName;
|
|
673
|
+
if (labelValue.length <= 0) {
|
|
674
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
675
|
+
}
|
|
676
|
+
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
680
|
+
}
|
|
681
|
+
return [2, new __HttpRequest({
|
|
682
|
+
protocol: protocol,
|
|
683
|
+
hostname: hostname,
|
|
684
|
+
port: port,
|
|
685
|
+
method: "DELETE",
|
|
686
|
+
headers: headers,
|
|
687
|
+
path: resolvedPath,
|
|
688
|
+
body: body,
|
|
689
|
+
})];
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}); };
|
|
572
693
|
export var serializeAws_restJson1FlushApiCacheCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
573
694
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
574
695
|
return __generator(this, function (_c) {
|
|
@@ -600,6 +721,37 @@ export var serializeAws_restJson1FlushApiCacheCommand = function (input, context
|
|
|
600
721
|
}
|
|
601
722
|
});
|
|
602
723
|
}); };
|
|
724
|
+
export var serializeAws_restJson1GetApiAssociationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
725
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
726
|
+
return __generator(this, function (_c) {
|
|
727
|
+
switch (_c.label) {
|
|
728
|
+
case 0: return [4, context.endpoint()];
|
|
729
|
+
case 1:
|
|
730
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
731
|
+
headers = {};
|
|
732
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames/{domainName}/apiassociation";
|
|
733
|
+
if (input.domainName !== undefined) {
|
|
734
|
+
labelValue = input.domainName;
|
|
735
|
+
if (labelValue.length <= 0) {
|
|
736
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
737
|
+
}
|
|
738
|
+
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
|
|
739
|
+
}
|
|
740
|
+
else {
|
|
741
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
742
|
+
}
|
|
743
|
+
return [2, new __HttpRequest({
|
|
744
|
+
protocol: protocol,
|
|
745
|
+
hostname: hostname,
|
|
746
|
+
port: port,
|
|
747
|
+
method: "GET",
|
|
748
|
+
headers: headers,
|
|
749
|
+
path: resolvedPath,
|
|
750
|
+
body: body,
|
|
751
|
+
})];
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
}); };
|
|
603
755
|
export var serializeAws_restJson1GetApiCacheCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
604
756
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
605
757
|
return __generator(this, function (_c) {
|
|
@@ -672,6 +824,37 @@ export var serializeAws_restJson1GetDataSourceCommand = function (input, context
|
|
|
672
824
|
}
|
|
673
825
|
});
|
|
674
826
|
}); };
|
|
827
|
+
export var serializeAws_restJson1GetDomainNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
828
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
829
|
+
return __generator(this, function (_c) {
|
|
830
|
+
switch (_c.label) {
|
|
831
|
+
case 0: return [4, context.endpoint()];
|
|
832
|
+
case 1:
|
|
833
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
834
|
+
headers = {};
|
|
835
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames/{domainName}";
|
|
836
|
+
if (input.domainName !== undefined) {
|
|
837
|
+
labelValue = input.domainName;
|
|
838
|
+
if (labelValue.length <= 0) {
|
|
839
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
840
|
+
}
|
|
841
|
+
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
|
|
842
|
+
}
|
|
843
|
+
else {
|
|
844
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
845
|
+
}
|
|
846
|
+
return [2, new __HttpRequest({
|
|
847
|
+
protocol: protocol,
|
|
848
|
+
hostname: hostname,
|
|
849
|
+
port: port,
|
|
850
|
+
method: "GET",
|
|
851
|
+
headers: headers,
|
|
852
|
+
path: resolvedPath,
|
|
853
|
+
body: body,
|
|
854
|
+
})];
|
|
855
|
+
}
|
|
856
|
+
});
|
|
857
|
+
}); };
|
|
675
858
|
export var serializeAws_restJson1GetFunctionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
676
859
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
677
860
|
return __generator(this, function (_c) {
|
|
@@ -969,6 +1152,29 @@ export var serializeAws_restJson1ListDataSourcesCommand = function (input, conte
|
|
|
969
1152
|
}
|
|
970
1153
|
});
|
|
971
1154
|
}); };
|
|
1155
|
+
export var serializeAws_restJson1ListDomainNamesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1156
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
1157
|
+
return __generator(this, function (_c) {
|
|
1158
|
+
switch (_c.label) {
|
|
1159
|
+
case 0: return [4, context.endpoint()];
|
|
1160
|
+
case 1:
|
|
1161
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1162
|
+
headers = {};
|
|
1163
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames";
|
|
1164
|
+
query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
|
|
1165
|
+
return [2, new __HttpRequest({
|
|
1166
|
+
protocol: protocol,
|
|
1167
|
+
hostname: hostname,
|
|
1168
|
+
port: port,
|
|
1169
|
+
method: "GET",
|
|
1170
|
+
headers: headers,
|
|
1171
|
+
path: resolvedPath,
|
|
1172
|
+
query: query,
|
|
1173
|
+
body: body,
|
|
1174
|
+
})];
|
|
1175
|
+
}
|
|
1176
|
+
});
|
|
1177
|
+
}); };
|
|
972
1178
|
export var serializeAws_restJson1ListFunctionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
973
1179
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
974
1180
|
return __generator(this, function (_c) {
|
|
@@ -1421,6 +1627,40 @@ export var serializeAws_restJson1UpdateDataSourceCommand = function (input, cont
|
|
|
1421
1627
|
}
|
|
1422
1628
|
});
|
|
1423
1629
|
}); };
|
|
1630
|
+
export var serializeAws_restJson1UpdateDomainNameCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1631
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
1632
|
+
return __generator(this, function (_c) {
|
|
1633
|
+
switch (_c.label) {
|
|
1634
|
+
case 0: return [4, context.endpoint()];
|
|
1635
|
+
case 1:
|
|
1636
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1637
|
+
headers = {
|
|
1638
|
+
"content-type": "application/json",
|
|
1639
|
+
};
|
|
1640
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/domainnames/{domainName}";
|
|
1641
|
+
if (input.domainName !== undefined) {
|
|
1642
|
+
labelValue = input.domainName;
|
|
1643
|
+
if (labelValue.length <= 0) {
|
|
1644
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
1645
|
+
}
|
|
1646
|
+
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
|
|
1647
|
+
}
|
|
1648
|
+
else {
|
|
1649
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
1650
|
+
}
|
|
1651
|
+
body = JSON.stringify(__assign({}, (input.description !== undefined && input.description !== null && { description: input.description })));
|
|
1652
|
+
return [2, new __HttpRequest({
|
|
1653
|
+
protocol: protocol,
|
|
1654
|
+
hostname: hostname,
|
|
1655
|
+
port: port,
|
|
1656
|
+
method: "POST",
|
|
1657
|
+
headers: headers,
|
|
1658
|
+
path: resolvedPath,
|
|
1659
|
+
body: body,
|
|
1660
|
+
})];
|
|
1661
|
+
}
|
|
1662
|
+
});
|
|
1663
|
+
}); };
|
|
1424
1664
|
export var serializeAws_restJson1UpdateFunctionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1425
1665
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
1426
1666
|
return __generator(this, function (_c) {
|
|
@@ -1452,9 +1692,9 @@ export var serializeAws_restJson1UpdateFunctionCommand = function (input, contex
|
|
|
1452
1692
|
else {
|
|
1453
1693
|
throw new Error("No value provided for input HTTP label: functionId.");
|
|
1454
1694
|
}
|
|
1455
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.dataSourceName !== undefined &&
|
|
1695
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.dataSourceName !== undefined &&
|
|
1456
1696
|
input.dataSourceName !== null && { dataSourceName: input.dataSourceName })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.functionVersion !== undefined &&
|
|
1457
|
-
input.functionVersion !== null && { functionVersion: input.functionVersion })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.requestMappingTemplate !== undefined &&
|
|
1697
|
+
input.functionVersion !== null && { functionVersion: input.functionVersion })), (input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.requestMappingTemplate !== undefined &&
|
|
1458
1698
|
input.requestMappingTemplate !== null && { requestMappingTemplate: input.requestMappingTemplate })), (input.responseMappingTemplate !== undefined &&
|
|
1459
1699
|
input.responseMappingTemplate !== null && { responseMappingTemplate: input.responseMappingTemplate })), (input.syncConfig !== undefined &&
|
|
1460
1700
|
input.syncConfig !== null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) })));
|
|
@@ -1560,11 +1800,11 @@ export var serializeAws_restJson1UpdateResolverCommand = function (input, contex
|
|
|
1560
1800
|
else {
|
|
1561
1801
|
throw new Error("No value provided for input HTTP label: fieldName.");
|
|
1562
1802
|
}
|
|
1563
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.cachingConfig !== undefined &&
|
|
1803
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.cachingConfig !== undefined &&
|
|
1564
1804
|
input.cachingConfig !== null && {
|
|
1565
1805
|
cachingConfig: serializeAws_restJson1CachingConfig(input.cachingConfig, context),
|
|
1566
1806
|
})), (input.dataSourceName !== undefined &&
|
|
1567
|
-
input.dataSourceName !== null && { dataSourceName: input.dataSourceName })), (input.kind !== undefined && input.kind !== null && { kind: input.kind })), (input.pipelineConfig !== undefined &&
|
|
1807
|
+
input.dataSourceName !== null && { dataSourceName: input.dataSourceName })), (input.kind !== undefined && input.kind !== null && { kind: input.kind })), (input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize })), (input.pipelineConfig !== undefined &&
|
|
1568
1808
|
input.pipelineConfig !== null && {
|
|
1569
1809
|
pipelineConfig: serializeAws_restJson1PipelineConfig(input.pipelineConfig, context),
|
|
1570
1810
|
})), (input.requestMappingTemplate !== undefined &&
|
|
@@ -1627,93 +1867,85 @@ export var serializeAws_restJson1UpdateTypeCommand = function (input, context) {
|
|
|
1627
1867
|
}
|
|
1628
1868
|
});
|
|
1629
1869
|
}); };
|
|
1630
|
-
export var
|
|
1870
|
+
export var deserializeAws_restJson1AssociateApiCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1631
1871
|
var contents, data, _a, _b;
|
|
1632
1872
|
return __generator(this, function (_c) {
|
|
1633
1873
|
switch (_c.label) {
|
|
1634
1874
|
case 0:
|
|
1635
1875
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1636
|
-
return [2,
|
|
1876
|
+
return [2, deserializeAws_restJson1AssociateApiCommandError(output, context)];
|
|
1637
1877
|
}
|
|
1638
1878
|
contents = {
|
|
1639
1879
|
$metadata: deserializeMetadata(output),
|
|
1640
|
-
|
|
1880
|
+
apiAssociation: undefined,
|
|
1641
1881
|
};
|
|
1642
1882
|
_a = __expectNonNull;
|
|
1643
1883
|
_b = __expectObject;
|
|
1644
1884
|
return [4, parseBody(output.body, context)];
|
|
1645
1885
|
case 1:
|
|
1646
1886
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1647
|
-
if (data.
|
|
1648
|
-
contents.
|
|
1887
|
+
if (data.apiAssociation !== undefined && data.apiAssociation !== null) {
|
|
1888
|
+
contents.apiAssociation = deserializeAws_restJson1ApiAssociation(data.apiAssociation, context);
|
|
1649
1889
|
}
|
|
1650
1890
|
return [2, Promise.resolve(contents)];
|
|
1651
1891
|
}
|
|
1652
1892
|
});
|
|
1653
1893
|
}); };
|
|
1654
|
-
var
|
|
1655
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f,
|
|
1656
|
-
var
|
|
1657
|
-
return __generator(this, function (
|
|
1658
|
-
switch (
|
|
1894
|
+
var deserializeAws_restJson1AssociateApiCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1895
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1896
|
+
var _g;
|
|
1897
|
+
return __generator(this, function (_h) {
|
|
1898
|
+
switch (_h.label) {
|
|
1659
1899
|
case 0:
|
|
1660
1900
|
_a = [__assign({}, output)];
|
|
1661
|
-
|
|
1901
|
+
_g = {};
|
|
1662
1902
|
return [4, parseBody(output.body, context)];
|
|
1663
1903
|
case 1:
|
|
1664
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1904
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1665
1905
|
errorCode = "UnknownError";
|
|
1666
1906
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1667
1907
|
_b = errorCode;
|
|
1668
1908
|
switch (_b) {
|
|
1669
|
-
case "
|
|
1670
|
-
case "com.amazonaws.appsync#
|
|
1671
|
-
case "
|
|
1672
|
-
case "com.amazonaws.appsync#
|
|
1909
|
+
case "AccessDeniedException": return [3, 2];
|
|
1910
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
1911
|
+
case "BadRequestException": return [3, 4];
|
|
1912
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
1673
1913
|
case "InternalFailureException": return [3, 6];
|
|
1674
1914
|
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
1675
1915
|
case "NotFoundException": return [3, 8];
|
|
1676
1916
|
case "com.amazonaws.appsync#NotFoundException": return [3, 8];
|
|
1677
|
-
case "UnauthorizedException": return [3, 10];
|
|
1678
|
-
case "com.amazonaws.appsync#UnauthorizedException": return [3, 10];
|
|
1679
1917
|
}
|
|
1680
|
-
return [3,
|
|
1918
|
+
return [3, 10];
|
|
1681
1919
|
case 2:
|
|
1682
1920
|
_c = [{}];
|
|
1683
|
-
return [4,
|
|
1921
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1684
1922
|
case 3:
|
|
1685
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
1686
|
-
return [3,
|
|
1923
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1924
|
+
return [3, 11];
|
|
1687
1925
|
case 4:
|
|
1688
1926
|
_d = [{}];
|
|
1689
|
-
return [4,
|
|
1927
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1690
1928
|
case 5:
|
|
1691
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
1692
|
-
return [3,
|
|
1929
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1930
|
+
return [3, 11];
|
|
1693
1931
|
case 6:
|
|
1694
1932
|
_e = [{}];
|
|
1695
1933
|
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
1696
1934
|
case 7:
|
|
1697
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
1698
|
-
return [3,
|
|
1935
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1936
|
+
return [3, 11];
|
|
1699
1937
|
case 8:
|
|
1700
1938
|
_f = [{}];
|
|
1701
1939
|
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1702
1940
|
case 9:
|
|
1703
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
1704
|
-
return [3,
|
|
1941
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1942
|
+
return [3, 11];
|
|
1705
1943
|
case 10:
|
|
1706
|
-
_g = [{}];
|
|
1707
|
-
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
1708
|
-
case 11:
|
|
1709
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1710
|
-
return [3, 13];
|
|
1711
|
-
case 12:
|
|
1712
1944
|
parsedBody = parsedOutput.body;
|
|
1713
1945
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1714
1946
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1715
|
-
|
|
1716
|
-
case
|
|
1947
|
+
_h.label = 11;
|
|
1948
|
+
case 11:
|
|
1717
1949
|
message = response.message || response.Message || errorCode;
|
|
1718
1950
|
response.message = message;
|
|
1719
1951
|
delete response.Message;
|
|
@@ -1721,13 +1953,107 @@ var deserializeAws_restJson1CreateApiCacheCommandError = function (output, conte
|
|
|
1721
1953
|
}
|
|
1722
1954
|
});
|
|
1723
1955
|
}); };
|
|
1724
|
-
export var
|
|
1956
|
+
export var deserializeAws_restJson1CreateApiCacheCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1725
1957
|
var contents, data, _a, _b;
|
|
1726
1958
|
return __generator(this, function (_c) {
|
|
1727
1959
|
switch (_c.label) {
|
|
1728
1960
|
case 0:
|
|
1729
1961
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1730
|
-
return [2,
|
|
1962
|
+
return [2, deserializeAws_restJson1CreateApiCacheCommandError(output, context)];
|
|
1963
|
+
}
|
|
1964
|
+
contents = {
|
|
1965
|
+
$metadata: deserializeMetadata(output),
|
|
1966
|
+
apiCache: undefined,
|
|
1967
|
+
};
|
|
1968
|
+
_a = __expectNonNull;
|
|
1969
|
+
_b = __expectObject;
|
|
1970
|
+
return [4, parseBody(output.body, context)];
|
|
1971
|
+
case 1:
|
|
1972
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1973
|
+
if (data.apiCache !== undefined && data.apiCache !== null) {
|
|
1974
|
+
contents.apiCache = deserializeAws_restJson1ApiCache(data.apiCache, context);
|
|
1975
|
+
}
|
|
1976
|
+
return [2, Promise.resolve(contents)];
|
|
1977
|
+
}
|
|
1978
|
+
});
|
|
1979
|
+
}); };
|
|
1980
|
+
var deserializeAws_restJson1CreateApiCacheCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1981
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
1982
|
+
var _h;
|
|
1983
|
+
return __generator(this, function (_j) {
|
|
1984
|
+
switch (_j.label) {
|
|
1985
|
+
case 0:
|
|
1986
|
+
_a = [__assign({}, output)];
|
|
1987
|
+
_h = {};
|
|
1988
|
+
return [4, parseBody(output.body, context)];
|
|
1989
|
+
case 1:
|
|
1990
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
1991
|
+
errorCode = "UnknownError";
|
|
1992
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1993
|
+
_b = errorCode;
|
|
1994
|
+
switch (_b) {
|
|
1995
|
+
case "BadRequestException": return [3, 2];
|
|
1996
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 2];
|
|
1997
|
+
case "ConcurrentModificationException": return [3, 4];
|
|
1998
|
+
case "com.amazonaws.appsync#ConcurrentModificationException": return [3, 4];
|
|
1999
|
+
case "InternalFailureException": return [3, 6];
|
|
2000
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
2001
|
+
case "NotFoundException": return [3, 8];
|
|
2002
|
+
case "com.amazonaws.appsync#NotFoundException": return [3, 8];
|
|
2003
|
+
case "UnauthorizedException": return [3, 10];
|
|
2004
|
+
case "com.amazonaws.appsync#UnauthorizedException": return [3, 10];
|
|
2005
|
+
}
|
|
2006
|
+
return [3, 12];
|
|
2007
|
+
case 2:
|
|
2008
|
+
_c = [{}];
|
|
2009
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
2010
|
+
case 3:
|
|
2011
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2012
|
+
return [3, 13];
|
|
2013
|
+
case 4:
|
|
2014
|
+
_d = [{}];
|
|
2015
|
+
return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
2016
|
+
case 5:
|
|
2017
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2018
|
+
return [3, 13];
|
|
2019
|
+
case 6:
|
|
2020
|
+
_e = [{}];
|
|
2021
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
2022
|
+
case 7:
|
|
2023
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2024
|
+
return [3, 13];
|
|
2025
|
+
case 8:
|
|
2026
|
+
_f = [{}];
|
|
2027
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2028
|
+
case 9:
|
|
2029
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2030
|
+
return [3, 13];
|
|
2031
|
+
case 10:
|
|
2032
|
+
_g = [{}];
|
|
2033
|
+
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
2034
|
+
case 11:
|
|
2035
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2036
|
+
return [3, 13];
|
|
2037
|
+
case 12:
|
|
2038
|
+
parsedBody = parsedOutput.body;
|
|
2039
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2040
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2041
|
+
_j.label = 13;
|
|
2042
|
+
case 13:
|
|
2043
|
+
message = response.message || response.Message || errorCode;
|
|
2044
|
+
response.message = message;
|
|
2045
|
+
delete response.Message;
|
|
2046
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2047
|
+
}
|
|
2048
|
+
});
|
|
2049
|
+
}); };
|
|
2050
|
+
export var deserializeAws_restJson1CreateApiKeyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2051
|
+
var contents, data, _a, _b;
|
|
2052
|
+
return __generator(this, function (_c) {
|
|
2053
|
+
switch (_c.label) {
|
|
2054
|
+
case 0:
|
|
2055
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2056
|
+
return [2, deserializeAws_restJson1CreateApiKeyCommandError(output, context)];
|
|
1731
2057
|
}
|
|
1732
2058
|
contents = {
|
|
1733
2059
|
$metadata: deserializeMetadata(output),
|
|
@@ -1925,6 +2251,84 @@ var deserializeAws_restJson1CreateDataSourceCommandError = function (output, con
|
|
|
1925
2251
|
}
|
|
1926
2252
|
});
|
|
1927
2253
|
}); };
|
|
2254
|
+
export var deserializeAws_restJson1CreateDomainNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2255
|
+
var contents, data, _a, _b;
|
|
2256
|
+
return __generator(this, function (_c) {
|
|
2257
|
+
switch (_c.label) {
|
|
2258
|
+
case 0:
|
|
2259
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2260
|
+
return [2, deserializeAws_restJson1CreateDomainNameCommandError(output, context)];
|
|
2261
|
+
}
|
|
2262
|
+
contents = {
|
|
2263
|
+
$metadata: deserializeMetadata(output),
|
|
2264
|
+
domainNameConfig: undefined,
|
|
2265
|
+
};
|
|
2266
|
+
_a = __expectNonNull;
|
|
2267
|
+
_b = __expectObject;
|
|
2268
|
+
return [4, parseBody(output.body, context)];
|
|
2269
|
+
case 1:
|
|
2270
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2271
|
+
if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
|
|
2272
|
+
contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
|
|
2273
|
+
}
|
|
2274
|
+
return [2, Promise.resolve(contents)];
|
|
2275
|
+
}
|
|
2276
|
+
});
|
|
2277
|
+
}); };
|
|
2278
|
+
var deserializeAws_restJson1CreateDomainNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2279
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
2280
|
+
var _f;
|
|
2281
|
+
return __generator(this, function (_g) {
|
|
2282
|
+
switch (_g.label) {
|
|
2283
|
+
case 0:
|
|
2284
|
+
_a = [__assign({}, output)];
|
|
2285
|
+
_f = {};
|
|
2286
|
+
return [4, parseBody(output.body, context)];
|
|
2287
|
+
case 1:
|
|
2288
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
2289
|
+
errorCode = "UnknownError";
|
|
2290
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2291
|
+
_b = errorCode;
|
|
2292
|
+
switch (_b) {
|
|
2293
|
+
case "AccessDeniedException": return [3, 2];
|
|
2294
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
2295
|
+
case "BadRequestException": return [3, 4];
|
|
2296
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
2297
|
+
case "InternalFailureException": return [3, 6];
|
|
2298
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
2299
|
+
}
|
|
2300
|
+
return [3, 8];
|
|
2301
|
+
case 2:
|
|
2302
|
+
_c = [{}];
|
|
2303
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2304
|
+
case 3:
|
|
2305
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2306
|
+
return [3, 9];
|
|
2307
|
+
case 4:
|
|
2308
|
+
_d = [{}];
|
|
2309
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
2310
|
+
case 5:
|
|
2311
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2312
|
+
return [3, 9];
|
|
2313
|
+
case 6:
|
|
2314
|
+
_e = [{}];
|
|
2315
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
2316
|
+
case 7:
|
|
2317
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2318
|
+
return [3, 9];
|
|
2319
|
+
case 8:
|
|
2320
|
+
parsedBody = parsedOutput.body;
|
|
2321
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2322
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2323
|
+
_g.label = 9;
|
|
2324
|
+
case 9:
|
|
2325
|
+
message = response.message || response.Message || errorCode;
|
|
2326
|
+
response.message = message;
|
|
2327
|
+
delete response.Message;
|
|
2328
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2329
|
+
}
|
|
2330
|
+
});
|
|
2331
|
+
}); };
|
|
1928
2332
|
export var deserializeAws_restJson1CreateFunctionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1929
2333
|
var contents, data, _a, _b;
|
|
1930
2334
|
return __generator(this, function (_c) {
|
|
@@ -2549,6 +2953,94 @@ var deserializeAws_restJson1DeleteDataSourceCommandError = function (output, con
|
|
|
2549
2953
|
}
|
|
2550
2954
|
});
|
|
2551
2955
|
}); };
|
|
2956
|
+
export var deserializeAws_restJson1DeleteDomainNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2957
|
+
var contents;
|
|
2958
|
+
return __generator(this, function (_a) {
|
|
2959
|
+
switch (_a.label) {
|
|
2960
|
+
case 0:
|
|
2961
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2962
|
+
return [2, deserializeAws_restJson1DeleteDomainNameCommandError(output, context)];
|
|
2963
|
+
}
|
|
2964
|
+
contents = {
|
|
2965
|
+
$metadata: deserializeMetadata(output),
|
|
2966
|
+
};
|
|
2967
|
+
return [4, collectBody(output.body, context)];
|
|
2968
|
+
case 1:
|
|
2969
|
+
_a.sent();
|
|
2970
|
+
return [2, Promise.resolve(contents)];
|
|
2971
|
+
}
|
|
2972
|
+
});
|
|
2973
|
+
}); };
|
|
2974
|
+
var deserializeAws_restJson1DeleteDomainNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2975
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2976
|
+
var _h;
|
|
2977
|
+
return __generator(this, function (_j) {
|
|
2978
|
+
switch (_j.label) {
|
|
2979
|
+
case 0:
|
|
2980
|
+
_a = [__assign({}, output)];
|
|
2981
|
+
_h = {};
|
|
2982
|
+
return [4, parseBody(output.body, context)];
|
|
2983
|
+
case 1:
|
|
2984
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2985
|
+
errorCode = "UnknownError";
|
|
2986
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2987
|
+
_b = errorCode;
|
|
2988
|
+
switch (_b) {
|
|
2989
|
+
case "AccessDeniedException": return [3, 2];
|
|
2990
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
2991
|
+
case "BadRequestException": return [3, 4];
|
|
2992
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
2993
|
+
case "ConcurrentModificationException": return [3, 6];
|
|
2994
|
+
case "com.amazonaws.appsync#ConcurrentModificationException": return [3, 6];
|
|
2995
|
+
case "InternalFailureException": return [3, 8];
|
|
2996
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 8];
|
|
2997
|
+
case "NotFoundException": return [3, 10];
|
|
2998
|
+
case "com.amazonaws.appsync#NotFoundException": return [3, 10];
|
|
2999
|
+
}
|
|
3000
|
+
return [3, 12];
|
|
3001
|
+
case 2:
|
|
3002
|
+
_c = [{}];
|
|
3003
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3004
|
+
case 3:
|
|
3005
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3006
|
+
return [3, 13];
|
|
3007
|
+
case 4:
|
|
3008
|
+
_d = [{}];
|
|
3009
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3010
|
+
case 5:
|
|
3011
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3012
|
+
return [3, 13];
|
|
3013
|
+
case 6:
|
|
3014
|
+
_e = [{}];
|
|
3015
|
+
return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
3016
|
+
case 7:
|
|
3017
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3018
|
+
return [3, 13];
|
|
3019
|
+
case 8:
|
|
3020
|
+
_f = [{}];
|
|
3021
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
3022
|
+
case 9:
|
|
3023
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3024
|
+
return [3, 13];
|
|
3025
|
+
case 10:
|
|
3026
|
+
_g = [{}];
|
|
3027
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3028
|
+
case 11:
|
|
3029
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3030
|
+
return [3, 13];
|
|
3031
|
+
case 12:
|
|
3032
|
+
parsedBody = parsedOutput.body;
|
|
3033
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3034
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3035
|
+
_j.label = 13;
|
|
3036
|
+
case 13:
|
|
3037
|
+
message = response.message || response.Message || errorCode;
|
|
3038
|
+
response.message = message;
|
|
3039
|
+
delete response.Message;
|
|
3040
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3041
|
+
}
|
|
3042
|
+
});
|
|
3043
|
+
}); };
|
|
2552
3044
|
export var deserializeAws_restJson1DeleteFunctionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2553
3045
|
var contents;
|
|
2554
3046
|
return __generator(this, function (_a) {
|
|
@@ -2893,6 +3385,94 @@ var deserializeAws_restJson1DeleteTypeCommandError = function (output, context)
|
|
|
2893
3385
|
}
|
|
2894
3386
|
});
|
|
2895
3387
|
}); };
|
|
3388
|
+
export var deserializeAws_restJson1DisassociateApiCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3389
|
+
var contents;
|
|
3390
|
+
return __generator(this, function (_a) {
|
|
3391
|
+
switch (_a.label) {
|
|
3392
|
+
case 0:
|
|
3393
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3394
|
+
return [2, deserializeAws_restJson1DisassociateApiCommandError(output, context)];
|
|
3395
|
+
}
|
|
3396
|
+
contents = {
|
|
3397
|
+
$metadata: deserializeMetadata(output),
|
|
3398
|
+
};
|
|
3399
|
+
return [4, collectBody(output.body, context)];
|
|
3400
|
+
case 1:
|
|
3401
|
+
_a.sent();
|
|
3402
|
+
return [2, Promise.resolve(contents)];
|
|
3403
|
+
}
|
|
3404
|
+
});
|
|
3405
|
+
}); };
|
|
3406
|
+
var deserializeAws_restJson1DisassociateApiCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3407
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
3408
|
+
var _h;
|
|
3409
|
+
return __generator(this, function (_j) {
|
|
3410
|
+
switch (_j.label) {
|
|
3411
|
+
case 0:
|
|
3412
|
+
_a = [__assign({}, output)];
|
|
3413
|
+
_h = {};
|
|
3414
|
+
return [4, parseBody(output.body, context)];
|
|
3415
|
+
case 1:
|
|
3416
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
3417
|
+
errorCode = "UnknownError";
|
|
3418
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3419
|
+
_b = errorCode;
|
|
3420
|
+
switch (_b) {
|
|
3421
|
+
case "AccessDeniedException": return [3, 2];
|
|
3422
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
3423
|
+
case "BadRequestException": return [3, 4];
|
|
3424
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
3425
|
+
case "ConcurrentModificationException": return [3, 6];
|
|
3426
|
+
case "com.amazonaws.appsync#ConcurrentModificationException": return [3, 6];
|
|
3427
|
+
case "InternalFailureException": return [3, 8];
|
|
3428
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 8];
|
|
3429
|
+
case "NotFoundException": return [3, 10];
|
|
3430
|
+
case "com.amazonaws.appsync#NotFoundException": return [3, 10];
|
|
3431
|
+
}
|
|
3432
|
+
return [3, 12];
|
|
3433
|
+
case 2:
|
|
3434
|
+
_c = [{}];
|
|
3435
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3436
|
+
case 3:
|
|
3437
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3438
|
+
return [3, 13];
|
|
3439
|
+
case 4:
|
|
3440
|
+
_d = [{}];
|
|
3441
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3442
|
+
case 5:
|
|
3443
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3444
|
+
return [3, 13];
|
|
3445
|
+
case 6:
|
|
3446
|
+
_e = [{}];
|
|
3447
|
+
return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
3448
|
+
case 7:
|
|
3449
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3450
|
+
return [3, 13];
|
|
3451
|
+
case 8:
|
|
3452
|
+
_f = [{}];
|
|
3453
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
3454
|
+
case 9:
|
|
3455
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3456
|
+
return [3, 13];
|
|
3457
|
+
case 10:
|
|
3458
|
+
_g = [{}];
|
|
3459
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3460
|
+
case 11:
|
|
3461
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3462
|
+
return [3, 13];
|
|
3463
|
+
case 12:
|
|
3464
|
+
parsedBody = parsedOutput.body;
|
|
3465
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3466
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3467
|
+
_j.label = 13;
|
|
3468
|
+
case 13:
|
|
3469
|
+
message = response.message || response.Message || errorCode;
|
|
3470
|
+
response.message = message;
|
|
3471
|
+
delete response.Message;
|
|
3472
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3473
|
+
}
|
|
3474
|
+
});
|
|
3475
|
+
}); };
|
|
2896
3476
|
export var deserializeAws_restJson1FlushApiCacheCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2897
3477
|
var contents;
|
|
2898
3478
|
return __generator(this, function (_a) {
|
|
@@ -2911,7 +3491,187 @@ export var deserializeAws_restJson1FlushApiCacheCommand = function (output, cont
|
|
|
2911
3491
|
}
|
|
2912
3492
|
});
|
|
2913
3493
|
}); };
|
|
2914
|
-
var deserializeAws_restJson1FlushApiCacheCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3494
|
+
var deserializeAws_restJson1FlushApiCacheCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3495
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
3496
|
+
var _h;
|
|
3497
|
+
return __generator(this, function (_j) {
|
|
3498
|
+
switch (_j.label) {
|
|
3499
|
+
case 0:
|
|
3500
|
+
_a = [__assign({}, output)];
|
|
3501
|
+
_h = {};
|
|
3502
|
+
return [4, parseBody(output.body, context)];
|
|
3503
|
+
case 1:
|
|
3504
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
3505
|
+
errorCode = "UnknownError";
|
|
3506
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3507
|
+
_b = errorCode;
|
|
3508
|
+
switch (_b) {
|
|
3509
|
+
case "BadRequestException": return [3, 2];
|
|
3510
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 2];
|
|
3511
|
+
case "ConcurrentModificationException": return [3, 4];
|
|
3512
|
+
case "com.amazonaws.appsync#ConcurrentModificationException": return [3, 4];
|
|
3513
|
+
case "InternalFailureException": return [3, 6];
|
|
3514
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
3515
|
+
case "NotFoundException": return [3, 8];
|
|
3516
|
+
case "com.amazonaws.appsync#NotFoundException": return [3, 8];
|
|
3517
|
+
case "UnauthorizedException": return [3, 10];
|
|
3518
|
+
case "com.amazonaws.appsync#UnauthorizedException": return [3, 10];
|
|
3519
|
+
}
|
|
3520
|
+
return [3, 12];
|
|
3521
|
+
case 2:
|
|
3522
|
+
_c = [{}];
|
|
3523
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3524
|
+
case 3:
|
|
3525
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3526
|
+
return [3, 13];
|
|
3527
|
+
case 4:
|
|
3528
|
+
_d = [{}];
|
|
3529
|
+
return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
3530
|
+
case 5:
|
|
3531
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3532
|
+
return [3, 13];
|
|
3533
|
+
case 6:
|
|
3534
|
+
_e = [{}];
|
|
3535
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
3536
|
+
case 7:
|
|
3537
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3538
|
+
return [3, 13];
|
|
3539
|
+
case 8:
|
|
3540
|
+
_f = [{}];
|
|
3541
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3542
|
+
case 9:
|
|
3543
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3544
|
+
return [3, 13];
|
|
3545
|
+
case 10:
|
|
3546
|
+
_g = [{}];
|
|
3547
|
+
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
3548
|
+
case 11:
|
|
3549
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3550
|
+
return [3, 13];
|
|
3551
|
+
case 12:
|
|
3552
|
+
parsedBody = parsedOutput.body;
|
|
3553
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3554
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3555
|
+
_j.label = 13;
|
|
3556
|
+
case 13:
|
|
3557
|
+
message = response.message || response.Message || errorCode;
|
|
3558
|
+
response.message = message;
|
|
3559
|
+
delete response.Message;
|
|
3560
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3561
|
+
}
|
|
3562
|
+
});
|
|
3563
|
+
}); };
|
|
3564
|
+
export var deserializeAws_restJson1GetApiAssociationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3565
|
+
var contents, data, _a, _b;
|
|
3566
|
+
return __generator(this, function (_c) {
|
|
3567
|
+
switch (_c.label) {
|
|
3568
|
+
case 0:
|
|
3569
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3570
|
+
return [2, deserializeAws_restJson1GetApiAssociationCommandError(output, context)];
|
|
3571
|
+
}
|
|
3572
|
+
contents = {
|
|
3573
|
+
$metadata: deserializeMetadata(output),
|
|
3574
|
+
apiAssociation: undefined,
|
|
3575
|
+
};
|
|
3576
|
+
_a = __expectNonNull;
|
|
3577
|
+
_b = __expectObject;
|
|
3578
|
+
return [4, parseBody(output.body, context)];
|
|
3579
|
+
case 1:
|
|
3580
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3581
|
+
if (data.apiAssociation !== undefined && data.apiAssociation !== null) {
|
|
3582
|
+
contents.apiAssociation = deserializeAws_restJson1ApiAssociation(data.apiAssociation, context);
|
|
3583
|
+
}
|
|
3584
|
+
return [2, Promise.resolve(contents)];
|
|
3585
|
+
}
|
|
3586
|
+
});
|
|
3587
|
+
}); };
|
|
3588
|
+
var deserializeAws_restJson1GetApiAssociationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3589
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
3590
|
+
var _g;
|
|
3591
|
+
return __generator(this, function (_h) {
|
|
3592
|
+
switch (_h.label) {
|
|
3593
|
+
case 0:
|
|
3594
|
+
_a = [__assign({}, output)];
|
|
3595
|
+
_g = {};
|
|
3596
|
+
return [4, parseBody(output.body, context)];
|
|
3597
|
+
case 1:
|
|
3598
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
3599
|
+
errorCode = "UnknownError";
|
|
3600
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3601
|
+
_b = errorCode;
|
|
3602
|
+
switch (_b) {
|
|
3603
|
+
case "AccessDeniedException": return [3, 2];
|
|
3604
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
3605
|
+
case "BadRequestException": return [3, 4];
|
|
3606
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
3607
|
+
case "InternalFailureException": return [3, 6];
|
|
3608
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
3609
|
+
case "NotFoundException": return [3, 8];
|
|
3610
|
+
case "com.amazonaws.appsync#NotFoundException": return [3, 8];
|
|
3611
|
+
}
|
|
3612
|
+
return [3, 10];
|
|
3613
|
+
case 2:
|
|
3614
|
+
_c = [{}];
|
|
3615
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3616
|
+
case 3:
|
|
3617
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3618
|
+
return [3, 11];
|
|
3619
|
+
case 4:
|
|
3620
|
+
_d = [{}];
|
|
3621
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3622
|
+
case 5:
|
|
3623
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3624
|
+
return [3, 11];
|
|
3625
|
+
case 6:
|
|
3626
|
+
_e = [{}];
|
|
3627
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
3628
|
+
case 7:
|
|
3629
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3630
|
+
return [3, 11];
|
|
3631
|
+
case 8:
|
|
3632
|
+
_f = [{}];
|
|
3633
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3634
|
+
case 9:
|
|
3635
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3636
|
+
return [3, 11];
|
|
3637
|
+
case 10:
|
|
3638
|
+
parsedBody = parsedOutput.body;
|
|
3639
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3640
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3641
|
+
_h.label = 11;
|
|
3642
|
+
case 11:
|
|
3643
|
+
message = response.message || response.Message || errorCode;
|
|
3644
|
+
response.message = message;
|
|
3645
|
+
delete response.Message;
|
|
3646
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3647
|
+
}
|
|
3648
|
+
});
|
|
3649
|
+
}); };
|
|
3650
|
+
export var deserializeAws_restJson1GetApiCacheCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3651
|
+
var contents, data, _a, _b;
|
|
3652
|
+
return __generator(this, function (_c) {
|
|
3653
|
+
switch (_c.label) {
|
|
3654
|
+
case 0:
|
|
3655
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3656
|
+
return [2, deserializeAws_restJson1GetApiCacheCommandError(output, context)];
|
|
3657
|
+
}
|
|
3658
|
+
contents = {
|
|
3659
|
+
$metadata: deserializeMetadata(output),
|
|
3660
|
+
apiCache: undefined,
|
|
3661
|
+
};
|
|
3662
|
+
_a = __expectNonNull;
|
|
3663
|
+
_b = __expectObject;
|
|
3664
|
+
return [4, parseBody(output.body, context)];
|
|
3665
|
+
case 1:
|
|
3666
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3667
|
+
if (data.apiCache !== undefined && data.apiCache !== null) {
|
|
3668
|
+
contents.apiCache = deserializeAws_restJson1ApiCache(data.apiCache, context);
|
|
3669
|
+
}
|
|
3670
|
+
return [2, Promise.resolve(contents)];
|
|
3671
|
+
}
|
|
3672
|
+
});
|
|
3673
|
+
}); };
|
|
3674
|
+
var deserializeAws_restJson1GetApiCacheCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2915
3675
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2916
3676
|
var _h;
|
|
2917
3677
|
return __generator(this, function (_j) {
|
|
@@ -2981,31 +3741,31 @@ var deserializeAws_restJson1FlushApiCacheCommandError = function (output, contex
|
|
|
2981
3741
|
}
|
|
2982
3742
|
});
|
|
2983
3743
|
}); };
|
|
2984
|
-
export var
|
|
3744
|
+
export var deserializeAws_restJson1GetDataSourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2985
3745
|
var contents, data, _a, _b;
|
|
2986
3746
|
return __generator(this, function (_c) {
|
|
2987
3747
|
switch (_c.label) {
|
|
2988
3748
|
case 0:
|
|
2989
3749
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2990
|
-
return [2,
|
|
3750
|
+
return [2, deserializeAws_restJson1GetDataSourceCommandError(output, context)];
|
|
2991
3751
|
}
|
|
2992
3752
|
contents = {
|
|
2993
3753
|
$metadata: deserializeMetadata(output),
|
|
2994
|
-
|
|
3754
|
+
dataSource: undefined,
|
|
2995
3755
|
};
|
|
2996
3756
|
_a = __expectNonNull;
|
|
2997
3757
|
_b = __expectObject;
|
|
2998
3758
|
return [4, parseBody(output.body, context)];
|
|
2999
3759
|
case 1:
|
|
3000
3760
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3001
|
-
if (data.
|
|
3002
|
-
contents.
|
|
3761
|
+
if (data.dataSource !== undefined && data.dataSource !== null) {
|
|
3762
|
+
contents.dataSource = deserializeAws_restJson1DataSource(data.dataSource, context);
|
|
3003
3763
|
}
|
|
3004
3764
|
return [2, Promise.resolve(contents)];
|
|
3005
3765
|
}
|
|
3006
3766
|
});
|
|
3007
3767
|
}); };
|
|
3008
|
-
var
|
|
3768
|
+
var deserializeAws_restJson1GetDataSourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3009
3769
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
3010
3770
|
var _h;
|
|
3011
3771
|
return __generator(this, function (_j) {
|
|
@@ -3075,93 +3835,85 @@ var deserializeAws_restJson1GetApiCacheCommandError = function (output, context)
|
|
|
3075
3835
|
}
|
|
3076
3836
|
});
|
|
3077
3837
|
}); };
|
|
3078
|
-
export var
|
|
3838
|
+
export var deserializeAws_restJson1GetDomainNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3079
3839
|
var contents, data, _a, _b;
|
|
3080
3840
|
return __generator(this, function (_c) {
|
|
3081
3841
|
switch (_c.label) {
|
|
3082
3842
|
case 0:
|
|
3083
3843
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3084
|
-
return [2,
|
|
3844
|
+
return [2, deserializeAws_restJson1GetDomainNameCommandError(output, context)];
|
|
3085
3845
|
}
|
|
3086
3846
|
contents = {
|
|
3087
3847
|
$metadata: deserializeMetadata(output),
|
|
3088
|
-
|
|
3848
|
+
domainNameConfig: undefined,
|
|
3089
3849
|
};
|
|
3090
3850
|
_a = __expectNonNull;
|
|
3091
3851
|
_b = __expectObject;
|
|
3092
3852
|
return [4, parseBody(output.body, context)];
|
|
3093
3853
|
case 1:
|
|
3094
3854
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3095
|
-
if (data.
|
|
3096
|
-
contents.
|
|
3855
|
+
if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
|
|
3856
|
+
contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
|
|
3097
3857
|
}
|
|
3098
3858
|
return [2, Promise.resolve(contents)];
|
|
3099
3859
|
}
|
|
3100
3860
|
});
|
|
3101
3861
|
}); };
|
|
3102
|
-
var
|
|
3103
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f,
|
|
3104
|
-
var
|
|
3105
|
-
return __generator(this, function (
|
|
3106
|
-
switch (
|
|
3862
|
+
var deserializeAws_restJson1GetDomainNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3863
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
3864
|
+
var _g;
|
|
3865
|
+
return __generator(this, function (_h) {
|
|
3866
|
+
switch (_h.label) {
|
|
3107
3867
|
case 0:
|
|
3108
3868
|
_a = [__assign({}, output)];
|
|
3109
|
-
|
|
3869
|
+
_g = {};
|
|
3110
3870
|
return [4, parseBody(output.body, context)];
|
|
3111
3871
|
case 1:
|
|
3112
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
3872
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
3113
3873
|
errorCode = "UnknownError";
|
|
3114
3874
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3115
3875
|
_b = errorCode;
|
|
3116
3876
|
switch (_b) {
|
|
3117
|
-
case "
|
|
3118
|
-
case "com.amazonaws.appsync#
|
|
3119
|
-
case "
|
|
3120
|
-
case "com.amazonaws.appsync#
|
|
3877
|
+
case "AccessDeniedException": return [3, 2];
|
|
3878
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
3879
|
+
case "BadRequestException": return [3, 4];
|
|
3880
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
3121
3881
|
case "InternalFailureException": return [3, 6];
|
|
3122
3882
|
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
3123
3883
|
case "NotFoundException": return [3, 8];
|
|
3124
3884
|
case "com.amazonaws.appsync#NotFoundException": return [3, 8];
|
|
3125
|
-
case "UnauthorizedException": return [3, 10];
|
|
3126
|
-
case "com.amazonaws.appsync#UnauthorizedException": return [3, 10];
|
|
3127
3885
|
}
|
|
3128
|
-
return [3,
|
|
3886
|
+
return [3, 10];
|
|
3129
3887
|
case 2:
|
|
3130
3888
|
_c = [{}];
|
|
3131
|
-
return [4,
|
|
3889
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3132
3890
|
case 3:
|
|
3133
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
3134
|
-
return [3,
|
|
3891
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3892
|
+
return [3, 11];
|
|
3135
3893
|
case 4:
|
|
3136
3894
|
_d = [{}];
|
|
3137
|
-
return [4,
|
|
3895
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
3138
3896
|
case 5:
|
|
3139
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
3140
|
-
return [3,
|
|
3897
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3898
|
+
return [3, 11];
|
|
3141
3899
|
case 6:
|
|
3142
3900
|
_e = [{}];
|
|
3143
3901
|
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
3144
3902
|
case 7:
|
|
3145
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
3146
|
-
return [3,
|
|
3903
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3904
|
+
return [3, 11];
|
|
3147
3905
|
case 8:
|
|
3148
3906
|
_f = [{}];
|
|
3149
3907
|
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
3150
3908
|
case 9:
|
|
3151
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
3152
|
-
return [3,
|
|
3909
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3910
|
+
return [3, 11];
|
|
3153
3911
|
case 10:
|
|
3154
|
-
_g = [{}];
|
|
3155
|
-
return [4, deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)];
|
|
3156
|
-
case 11:
|
|
3157
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3158
|
-
return [3, 13];
|
|
3159
|
-
case 12:
|
|
3160
3912
|
parsedBody = parsedOutput.body;
|
|
3161
3913
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3162
3914
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3163
|
-
|
|
3164
|
-
case
|
|
3915
|
+
_h.label = 11;
|
|
3916
|
+
case 11:
|
|
3165
3917
|
message = response.message || response.Message || errorCode;
|
|
3166
3918
|
response.message = message;
|
|
3167
3919
|
delete response.Message;
|
|
@@ -3865,6 +4617,88 @@ var deserializeAws_restJson1ListDataSourcesCommandError = function (output, cont
|
|
|
3865
4617
|
}
|
|
3866
4618
|
});
|
|
3867
4619
|
}); };
|
|
4620
|
+
export var deserializeAws_restJson1ListDomainNamesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4621
|
+
var contents, data, _a, _b;
|
|
4622
|
+
return __generator(this, function (_c) {
|
|
4623
|
+
switch (_c.label) {
|
|
4624
|
+
case 0:
|
|
4625
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4626
|
+
return [2, deserializeAws_restJson1ListDomainNamesCommandError(output, context)];
|
|
4627
|
+
}
|
|
4628
|
+
contents = {
|
|
4629
|
+
$metadata: deserializeMetadata(output),
|
|
4630
|
+
domainNameConfigs: undefined,
|
|
4631
|
+
nextToken: undefined,
|
|
4632
|
+
};
|
|
4633
|
+
_a = __expectNonNull;
|
|
4634
|
+
_b = __expectObject;
|
|
4635
|
+
return [4, parseBody(output.body, context)];
|
|
4636
|
+
case 1:
|
|
4637
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
4638
|
+
if (data.domainNameConfigs !== undefined && data.domainNameConfigs !== null) {
|
|
4639
|
+
contents.domainNameConfigs = deserializeAws_restJson1DomainNameConfigs(data.domainNameConfigs, context);
|
|
4640
|
+
}
|
|
4641
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
4642
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
4643
|
+
}
|
|
4644
|
+
return [2, Promise.resolve(contents)];
|
|
4645
|
+
}
|
|
4646
|
+
});
|
|
4647
|
+
}); };
|
|
4648
|
+
var deserializeAws_restJson1ListDomainNamesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4649
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
4650
|
+
var _f;
|
|
4651
|
+
return __generator(this, function (_g) {
|
|
4652
|
+
switch (_g.label) {
|
|
4653
|
+
case 0:
|
|
4654
|
+
_a = [__assign({}, output)];
|
|
4655
|
+
_f = {};
|
|
4656
|
+
return [4, parseBody(output.body, context)];
|
|
4657
|
+
case 1:
|
|
4658
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
4659
|
+
errorCode = "UnknownError";
|
|
4660
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4661
|
+
_b = errorCode;
|
|
4662
|
+
switch (_b) {
|
|
4663
|
+
case "AccessDeniedException": return [3, 2];
|
|
4664
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
4665
|
+
case "BadRequestException": return [3, 4];
|
|
4666
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
4667
|
+
case "InternalFailureException": return [3, 6];
|
|
4668
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 6];
|
|
4669
|
+
}
|
|
4670
|
+
return [3, 8];
|
|
4671
|
+
case 2:
|
|
4672
|
+
_c = [{}];
|
|
4673
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
4674
|
+
case 3:
|
|
4675
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4676
|
+
return [3, 9];
|
|
4677
|
+
case 4:
|
|
4678
|
+
_d = [{}];
|
|
4679
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
4680
|
+
case 5:
|
|
4681
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4682
|
+
return [3, 9];
|
|
4683
|
+
case 6:
|
|
4684
|
+
_e = [{}];
|
|
4685
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
4686
|
+
case 7:
|
|
4687
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
4688
|
+
return [3, 9];
|
|
4689
|
+
case 8:
|
|
4690
|
+
parsedBody = parsedOutput.body;
|
|
4691
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4692
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
4693
|
+
_g.label = 9;
|
|
4694
|
+
case 9:
|
|
4695
|
+
message = response.message || response.Message || errorCode;
|
|
4696
|
+
response.message = message;
|
|
4697
|
+
delete response.Message;
|
|
4698
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
4699
|
+
}
|
|
4700
|
+
});
|
|
4701
|
+
}); };
|
|
3868
4702
|
export var deserializeAws_restJson1ListFunctionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3869
4703
|
var contents, data, _a, _b;
|
|
3870
4704
|
return __generator(this, function (_c) {
|
|
@@ -4993,6 +5827,100 @@ var deserializeAws_restJson1UpdateDataSourceCommandError = function (output, con
|
|
|
4993
5827
|
}
|
|
4994
5828
|
});
|
|
4995
5829
|
}); };
|
|
5830
|
+
export var deserializeAws_restJson1UpdateDomainNameCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5831
|
+
var contents, data, _a, _b;
|
|
5832
|
+
return __generator(this, function (_c) {
|
|
5833
|
+
switch (_c.label) {
|
|
5834
|
+
case 0:
|
|
5835
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5836
|
+
return [2, deserializeAws_restJson1UpdateDomainNameCommandError(output, context)];
|
|
5837
|
+
}
|
|
5838
|
+
contents = {
|
|
5839
|
+
$metadata: deserializeMetadata(output),
|
|
5840
|
+
domainNameConfig: undefined,
|
|
5841
|
+
};
|
|
5842
|
+
_a = __expectNonNull;
|
|
5843
|
+
_b = __expectObject;
|
|
5844
|
+
return [4, parseBody(output.body, context)];
|
|
5845
|
+
case 1:
|
|
5846
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
5847
|
+
if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
|
|
5848
|
+
contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
|
|
5849
|
+
}
|
|
5850
|
+
return [2, Promise.resolve(contents)];
|
|
5851
|
+
}
|
|
5852
|
+
});
|
|
5853
|
+
}); };
|
|
5854
|
+
var deserializeAws_restJson1UpdateDomainNameCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5855
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
5856
|
+
var _h;
|
|
5857
|
+
return __generator(this, function (_j) {
|
|
5858
|
+
switch (_j.label) {
|
|
5859
|
+
case 0:
|
|
5860
|
+
_a = [__assign({}, output)];
|
|
5861
|
+
_h = {};
|
|
5862
|
+
return [4, parseBody(output.body, context)];
|
|
5863
|
+
case 1:
|
|
5864
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
5865
|
+
errorCode = "UnknownError";
|
|
5866
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5867
|
+
_b = errorCode;
|
|
5868
|
+
switch (_b) {
|
|
5869
|
+
case "AccessDeniedException": return [3, 2];
|
|
5870
|
+
case "com.amazonaws.appsync#AccessDeniedException": return [3, 2];
|
|
5871
|
+
case "BadRequestException": return [3, 4];
|
|
5872
|
+
case "com.amazonaws.appsync#BadRequestException": return [3, 4];
|
|
5873
|
+
case "ConcurrentModificationException": return [3, 6];
|
|
5874
|
+
case "com.amazonaws.appsync#ConcurrentModificationException": return [3, 6];
|
|
5875
|
+
case "InternalFailureException": return [3, 8];
|
|
5876
|
+
case "com.amazonaws.appsync#InternalFailureException": return [3, 8];
|
|
5877
|
+
case "NotFoundException": return [3, 10];
|
|
5878
|
+
case "com.amazonaws.appsync#NotFoundException": return [3, 10];
|
|
5879
|
+
}
|
|
5880
|
+
return [3, 12];
|
|
5881
|
+
case 2:
|
|
5882
|
+
_c = [{}];
|
|
5883
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
5884
|
+
case 3:
|
|
5885
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5886
|
+
return [3, 13];
|
|
5887
|
+
case 4:
|
|
5888
|
+
_d = [{}];
|
|
5889
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
5890
|
+
case 5:
|
|
5891
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5892
|
+
return [3, 13];
|
|
5893
|
+
case 6:
|
|
5894
|
+
_e = [{}];
|
|
5895
|
+
return [4, deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)];
|
|
5896
|
+
case 7:
|
|
5897
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5898
|
+
return [3, 13];
|
|
5899
|
+
case 8:
|
|
5900
|
+
_f = [{}];
|
|
5901
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
5902
|
+
case 9:
|
|
5903
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5904
|
+
return [3, 13];
|
|
5905
|
+
case 10:
|
|
5906
|
+
_g = [{}];
|
|
5907
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
5908
|
+
case 11:
|
|
5909
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
5910
|
+
return [3, 13];
|
|
5911
|
+
case 12:
|
|
5912
|
+
parsedBody = parsedOutput.body;
|
|
5913
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5914
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
5915
|
+
_j.label = 13;
|
|
5916
|
+
case 13:
|
|
5917
|
+
message = response.message || response.Message || errorCode;
|
|
5918
|
+
response.message = message;
|
|
5919
|
+
delete response.Message;
|
|
5920
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
5921
|
+
}
|
|
5922
|
+
});
|
|
5923
|
+
}); };
|
|
4996
5924
|
export var deserializeAws_restJson1UpdateFunctionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4997
5925
|
var contents, data, _a, _b;
|
|
4998
5926
|
return __generator(this, function (_c) {
|
|
@@ -5710,6 +6638,14 @@ var deserializeAws_restJson1AdditionalAuthenticationProviders = function (output
|
|
|
5710
6638
|
return deserializeAws_restJson1AdditionalAuthenticationProvider(entry, context);
|
|
5711
6639
|
});
|
|
5712
6640
|
};
|
|
6641
|
+
var deserializeAws_restJson1ApiAssociation = function (output, context) {
|
|
6642
|
+
return {
|
|
6643
|
+
apiId: __expectString(output.apiId),
|
|
6644
|
+
associationStatus: __expectString(output.associationStatus),
|
|
6645
|
+
deploymentDetail: __expectString(output.deploymentDetail),
|
|
6646
|
+
domainName: __expectString(output.domainName),
|
|
6647
|
+
};
|
|
6648
|
+
};
|
|
5713
6649
|
var deserializeAws_restJson1ApiCache = function (output, context) {
|
|
5714
6650
|
return {
|
|
5715
6651
|
apiCachingBehavior: __expectString(output.apiCachingBehavior),
|
|
@@ -5821,6 +6757,25 @@ var deserializeAws_restJson1DeltaSyncConfig = function (output, context) {
|
|
|
5821
6757
|
deltaSyncTableTTL: __expectLong(output.deltaSyncTableTTL),
|
|
5822
6758
|
};
|
|
5823
6759
|
};
|
|
6760
|
+
var deserializeAws_restJson1DomainNameConfig = function (output, context) {
|
|
6761
|
+
return {
|
|
6762
|
+
appsyncDomainName: __expectString(output.appsyncDomainName),
|
|
6763
|
+
certificateArn: __expectString(output.certificateArn),
|
|
6764
|
+
description: __expectString(output.description),
|
|
6765
|
+
domainName: __expectString(output.domainName),
|
|
6766
|
+
hostedZoneId: __expectString(output.hostedZoneId),
|
|
6767
|
+
};
|
|
6768
|
+
};
|
|
6769
|
+
var deserializeAws_restJson1DomainNameConfigs = function (output, context) {
|
|
6770
|
+
return (output || [])
|
|
6771
|
+
.filter(function (e) { return e != null; })
|
|
6772
|
+
.map(function (entry) {
|
|
6773
|
+
if (entry === null) {
|
|
6774
|
+
return null;
|
|
6775
|
+
}
|
|
6776
|
+
return deserializeAws_restJson1DomainNameConfig(entry, context);
|
|
6777
|
+
});
|
|
6778
|
+
};
|
|
5824
6779
|
var deserializeAws_restJson1DynamodbDataSourceConfig = function (output, context) {
|
|
5825
6780
|
return {
|
|
5826
6781
|
awsRegion: __expectString(output.awsRegion),
|
|
@@ -5845,6 +6800,7 @@ var deserializeAws_restJson1FunctionConfiguration = function (output, context) {
|
|
|
5845
6800
|
functionArn: __expectString(output.functionArn),
|
|
5846
6801
|
functionId: __expectString(output.functionId),
|
|
5847
6802
|
functionVersion: __expectString(output.functionVersion),
|
|
6803
|
+
maxBatchSize: __expectInt32(output.maxBatchSize),
|
|
5848
6804
|
name: __expectString(output.name),
|
|
5849
6805
|
requestMappingTemplate: __expectString(output.requestMappingTemplate),
|
|
5850
6806
|
responseMappingTemplate: __expectString(output.responseMappingTemplate),
|
|
@@ -6002,6 +6958,7 @@ var deserializeAws_restJson1Resolver = function (output, context) {
|
|
|
6002
6958
|
dataSourceName: __expectString(output.dataSourceName),
|
|
6003
6959
|
fieldName: __expectString(output.fieldName),
|
|
6004
6960
|
kind: __expectString(output.kind),
|
|
6961
|
+
maxBatchSize: __expectInt32(output.maxBatchSize),
|
|
6005
6962
|
pipelineConfig: output.pipelineConfig !== undefined && output.pipelineConfig !== null
|
|
6006
6963
|
? deserializeAws_restJson1PipelineConfig(output.pipelineConfig, context)
|
|
6007
6964
|
: undefined,
|