@aws-sdk/client-m2 3.107.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 +11 -0
- package/LICENSE +201 -0
- package/README.md +209 -0
- package/dist-cjs/M2.js +487 -0
- package/dist-cjs/M2Client.js +37 -0
- package/dist-cjs/commands/CancelBatchJobExecutionCommand.js +36 -0
- package/dist-cjs/commands/CreateApplicationCommand.js +36 -0
- package/dist-cjs/commands/CreateDataSetImportTaskCommand.js +36 -0
- package/dist-cjs/commands/CreateDeploymentCommand.js +36 -0
- package/dist-cjs/commands/CreateEnvironmentCommand.js +36 -0
- package/dist-cjs/commands/DeleteApplicationCommand.js +36 -0
- package/dist-cjs/commands/DeleteApplicationFromEnvironmentCommand.js +36 -0
- package/dist-cjs/commands/DeleteEnvironmentCommand.js +36 -0
- package/dist-cjs/commands/GetApplicationCommand.js +36 -0
- package/dist-cjs/commands/GetApplicationVersionCommand.js +36 -0
- package/dist-cjs/commands/GetBatchJobExecutionCommand.js +36 -0
- package/dist-cjs/commands/GetDataSetDetailsCommand.js +36 -0
- package/dist-cjs/commands/GetDataSetImportTaskCommand.js +36 -0
- package/dist-cjs/commands/GetDeploymentCommand.js +36 -0
- package/dist-cjs/commands/GetEnvironmentCommand.js +36 -0
- package/dist-cjs/commands/ListApplicationVersionsCommand.js +36 -0
- package/dist-cjs/commands/ListApplicationsCommand.js +36 -0
- package/dist-cjs/commands/ListBatchJobDefinitionsCommand.js +36 -0
- package/dist-cjs/commands/ListBatchJobExecutionsCommand.js +36 -0
- package/dist-cjs/commands/ListDataSetImportHistoryCommand.js +36 -0
- package/dist-cjs/commands/ListDataSetsCommand.js +36 -0
- package/dist-cjs/commands/ListDeploymentsCommand.js +36 -0
- package/dist-cjs/commands/ListEngineVersionsCommand.js +36 -0
- package/dist-cjs/commands/ListEnvironmentsCommand.js +36 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +36 -0
- package/dist-cjs/commands/StartApplicationCommand.js +36 -0
- package/dist-cjs/commands/StartBatchJobCommand.js +36 -0
- package/dist-cjs/commands/StopApplicationCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/dist-cjs/commands/UntagResourceCommand.js +36 -0
- package/dist-cjs/commands/UpdateApplicationCommand.js +36 -0
- package/dist-cjs/commands/UpdateEnvironmentCommand.js +36 -0
- package/dist-cjs/commands/index.js +35 -0
- package/dist-cjs/endpoints.js +131 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/M2ServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +911 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListApplicationVersionsPaginator.js +36 -0
- package/dist-cjs/pagination/ListApplicationsPaginator.js +36 -0
- package/dist-cjs/pagination/ListBatchJobDefinitionsPaginator.js +36 -0
- package/dist-cjs/pagination/ListBatchJobExecutionsPaginator.js +36 -0
- package/dist-cjs/pagination/ListDataSetImportHistoryPaginator.js +36 -0
- package/dist-cjs/pagination/ListDataSetsPaginator.js +36 -0
- package/dist-cjs/pagination/ListDeploymentsPaginator.js +36 -0
- package/dist-cjs/pagination/ListEngineVersionsPaginator.js +36 -0
- package/dist-cjs/pagination/ListEnvironmentsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +13 -0
- package/dist-cjs/protocols/Aws_restJson1.js +3744 -0
- package/dist-cjs/runtimeConfig.browser.js +45 -0
- package/dist-cjs/runtimeConfig.js +52 -0
- package/dist-cjs/runtimeConfig.native.js +16 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/M2.js +490 -0
- package/dist-es/M2Client.js +39 -0
- package/dist-es/commands/CancelBatchJobExecutionCommand.js +39 -0
- package/dist-es/commands/CreateApplicationCommand.js +39 -0
- package/dist-es/commands/CreateDataSetImportTaskCommand.js +39 -0
- package/dist-es/commands/CreateDeploymentCommand.js +39 -0
- package/dist-es/commands/CreateEnvironmentCommand.js +39 -0
- package/dist-es/commands/DeleteApplicationCommand.js +39 -0
- package/dist-es/commands/DeleteApplicationFromEnvironmentCommand.js +39 -0
- package/dist-es/commands/DeleteEnvironmentCommand.js +39 -0
- package/dist-es/commands/GetApplicationCommand.js +39 -0
- package/dist-es/commands/GetApplicationVersionCommand.js +39 -0
- package/dist-es/commands/GetBatchJobExecutionCommand.js +39 -0
- package/dist-es/commands/GetDataSetDetailsCommand.js +39 -0
- package/dist-es/commands/GetDataSetImportTaskCommand.js +39 -0
- package/dist-es/commands/GetDeploymentCommand.js +39 -0
- package/dist-es/commands/GetEnvironmentCommand.js +39 -0
- package/dist-es/commands/ListApplicationVersionsCommand.js +39 -0
- package/dist-es/commands/ListApplicationsCommand.js +39 -0
- package/dist-es/commands/ListBatchJobDefinitionsCommand.js +39 -0
- package/dist-es/commands/ListBatchJobExecutionsCommand.js +39 -0
- package/dist-es/commands/ListDataSetImportHistoryCommand.js +39 -0
- package/dist-es/commands/ListDataSetsCommand.js +39 -0
- package/dist-es/commands/ListDeploymentsCommand.js +39 -0
- package/dist-es/commands/ListEngineVersionsCommand.js +39 -0
- package/dist-es/commands/ListEnvironmentsCommand.js +39 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +39 -0
- package/dist-es/commands/StartApplicationCommand.js +39 -0
- package/dist-es/commands/StartBatchJobCommand.js +39 -0
- package/dist-es/commands/StopApplicationCommand.js +39 -0
- package/dist-es/commands/TagResourceCommand.js +39 -0
- package/dist-es/commands/UntagResourceCommand.js +39 -0
- package/dist-es/commands/UpdateApplicationCommand.js +39 -0
- package/dist-es/commands/UpdateEnvironmentCommand.js +39 -0
- package/dist-es/commands/index.js +32 -0
- package/dist-es/endpoints.js +127 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/M2ServiceException.js +12 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +709 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListApplicationVersionsPaginator.js +75 -0
- package/dist-es/pagination/ListApplicationsPaginator.js +75 -0
- package/dist-es/pagination/ListBatchJobDefinitionsPaginator.js +75 -0
- package/dist-es/pagination/ListBatchJobExecutionsPaginator.js +75 -0
- package/dist-es/pagination/ListDataSetImportHistoryPaginator.js +75 -0
- package/dist-es/pagination/ListDataSetsPaginator.js +75 -0
- package/dist-es/pagination/ListDeploymentsPaginator.js +75 -0
- package/dist-es/pagination/ListEngineVersionsPaginator.js +75 -0
- package/dist-es/pagination/ListEnvironmentsPaginator.js +75 -0
- package/dist-es/pagination/index.js +10 -0
- package/dist-es/protocols/Aws_restJson1.js +4508 -0
- package/dist-es/runtimeConfig.browser.js +26 -0
- package/dist-es/runtimeConfig.js +30 -0
- package/dist-es/runtimeConfig.native.js +8 -0
- package/dist-es/runtimeConfig.shared.js +13 -0
- package/dist-types/M2.d.ts +250 -0
- package/dist-types/M2Client.d.ts +180 -0
- package/dist-types/commands/CancelBatchJobExecutionCommand.d.ts +35 -0
- package/dist-types/commands/CreateApplicationCommand.d.ts +36 -0
- package/dist-types/commands/CreateDataSetImportTaskCommand.d.ts +35 -0
- package/dist-types/commands/CreateDeploymentCommand.d.ts +35 -0
- package/dist-types/commands/CreateEnvironmentCommand.d.ts +35 -0
- package/dist-types/commands/DeleteApplicationCommand.d.ts +35 -0
- package/dist-types/commands/DeleteApplicationFromEnvironmentCommand.d.ts +38 -0
- package/dist-types/commands/DeleteEnvironmentCommand.d.ts +36 -0
- package/dist-types/commands/GetApplicationCommand.d.ts +35 -0
- package/dist-types/commands/GetApplicationVersionCommand.d.ts +35 -0
- package/dist-types/commands/GetBatchJobExecutionCommand.d.ts +35 -0
- package/dist-types/commands/GetDataSetDetailsCommand.d.ts +35 -0
- package/dist-types/commands/GetDataSetImportTaskCommand.d.ts +35 -0
- package/dist-types/commands/GetDeploymentCommand.d.ts +35 -0
- package/dist-types/commands/GetEnvironmentCommand.d.ts +35 -0
- package/dist-types/commands/ListApplicationVersionsCommand.d.ts +35 -0
- package/dist-types/commands/ListApplicationsCommand.d.ts +37 -0
- package/dist-types/commands/ListBatchJobDefinitionsCommand.d.ts +37 -0
- package/dist-types/commands/ListBatchJobExecutionsCommand.d.ts +36 -0
- package/dist-types/commands/ListDataSetImportHistoryCommand.d.ts +35 -0
- package/dist-types/commands/ListDataSetsCommand.d.ts +37 -0
- package/dist-types/commands/ListDeploymentsCommand.d.ts +37 -0
- package/dist-types/commands/ListEngineVersionsCommand.d.ts +35 -0
- package/dist-types/commands/ListEnvironmentsCommand.d.ts +35 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
- package/dist-types/commands/StartApplicationCommand.d.ts +35 -0
- package/dist-types/commands/StartBatchJobCommand.d.ts +36 -0
- package/dist-types/commands/StopApplicationCommand.d.ts +35 -0
- package/dist-types/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UpdateApplicationCommand.d.ts +35 -0
- package/dist-types/commands/UpdateEnvironmentCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +32 -0
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/M2ServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2682 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListApplicationVersionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListApplicationsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListBatchJobDefinitionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListBatchJobExecutionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListDataSetImportHistoryPaginator.d.ts +4 -0
- package/dist-types/pagination/ListDataSetsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListDeploymentsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListEngineVersionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListEnvironmentsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +10 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +98 -0
- package/dist-types/runtimeConfig.browser.d.ts +40 -0
- package/dist-types/runtimeConfig.d.ts +40 -0
- package/dist-types/runtimeConfig.native.d.ts +39 -0
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/M2.d.ts +165 -0
- package/dist-types/ts3.4/M2Client.d.ts +105 -0
- package/dist-types/ts3.4/commands/CancelBatchJobExecutionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateApplicationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateDataSetImportTaskCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateDeploymentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateEnvironmentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteApplicationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteApplicationFromEnvironmentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteEnvironmentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetApplicationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetApplicationVersionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetBatchJobExecutionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDataSetDetailsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDataSetImportTaskCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDeploymentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetEnvironmentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListApplicationVersionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListApplicationsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListBatchJobDefinitionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListBatchJobExecutionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDataSetImportHistoryCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDataSetsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDeploymentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListEngineVersionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListEnvironmentsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartApplicationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartBatchJobCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopApplicationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateApplicationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateEnvironmentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +32 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/M2ServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1609 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListApplicationVersionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListApplicationsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListBatchJobDefinitionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListBatchJobExecutionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListDataSetImportHistoryPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListDataSetsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListDeploymentsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListEngineVersionsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListEnvironmentsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +10 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +98 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +96 -0
|
@@ -0,0 +1,4508 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
|
+
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
|
+
import { M2ServiceException as __BaseException } from "../models/M2ServiceException";
|
|
6
|
+
import { AccessDeniedException, BatchJobIdentifier, ConflictException, DataSetImportConfig, DatasetOrgAttributes, Definition, ExternalLocation, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, StorageConfiguration, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
+
export var serializeAws_restJson1CancelBatchJobExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
9
|
+
return __generator(this, function (_c) {
|
|
10
|
+
switch (_c.label) {
|
|
11
|
+
case 0: return [4, context.endpoint()];
|
|
12
|
+
case 1:
|
|
13
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
14
|
+
headers = {};
|
|
15
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
16
|
+
"/applications/{applicationId}/batch-job-executions/{executionId}/cancel";
|
|
17
|
+
if (input.applicationId !== undefined) {
|
|
18
|
+
labelValue = input.applicationId;
|
|
19
|
+
if (labelValue.length <= 0) {
|
|
20
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
21
|
+
}
|
|
22
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
26
|
+
}
|
|
27
|
+
if (input.executionId !== undefined) {
|
|
28
|
+
labelValue = input.executionId;
|
|
29
|
+
if (labelValue.length <= 0) {
|
|
30
|
+
throw new Error("Empty value provided for input HTTP label: executionId.");
|
|
31
|
+
}
|
|
32
|
+
resolvedPath = resolvedPath.replace("{executionId}", __extendedEncodeURIComponent(labelValue));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
throw new Error("No value provided for input HTTP label: executionId.");
|
|
36
|
+
}
|
|
37
|
+
return [2, new __HttpRequest({
|
|
38
|
+
protocol: protocol,
|
|
39
|
+
hostname: hostname,
|
|
40
|
+
port: port,
|
|
41
|
+
method: "POST",
|
|
42
|
+
headers: headers,
|
|
43
|
+
path: resolvedPath,
|
|
44
|
+
body: body,
|
|
45
|
+
})];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}); };
|
|
49
|
+
export var serializeAws_restJson1CreateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
51
|
+
var _c;
|
|
52
|
+
return __generator(this, function (_d) {
|
|
53
|
+
switch (_d.label) {
|
|
54
|
+
case 0: return [4, context.endpoint()];
|
|
55
|
+
case 1:
|
|
56
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
57
|
+
headers = {
|
|
58
|
+
"content-type": "application/json",
|
|
59
|
+
};
|
|
60
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
61
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.definition !== undefined &&
|
|
62
|
+
input.definition !== null && { definition: serializeAws_restJson1Definition(input.definition, context) })), (input.description !== undefined && input.description !== null && { description: input.description })), (input.engineType !== undefined && input.engineType !== null && { engineType: input.engineType })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
63
|
+
return [2, new __HttpRequest({
|
|
64
|
+
protocol: protocol,
|
|
65
|
+
hostname: hostname,
|
|
66
|
+
port: port,
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers: headers,
|
|
69
|
+
path: resolvedPath,
|
|
70
|
+
body: body,
|
|
71
|
+
})];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}); };
|
|
75
|
+
export var serializeAws_restJson1CreateDataSetImportTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
77
|
+
var _c;
|
|
78
|
+
return __generator(this, function (_d) {
|
|
79
|
+
switch (_d.label) {
|
|
80
|
+
case 0: return [4, context.endpoint()];
|
|
81
|
+
case 1:
|
|
82
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
83
|
+
headers = {
|
|
84
|
+
"content-type": "application/json",
|
|
85
|
+
};
|
|
86
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
87
|
+
"/applications/{applicationId}/dataset-import-task";
|
|
88
|
+
if (input.applicationId !== undefined) {
|
|
89
|
+
labelValue = input.applicationId;
|
|
90
|
+
if (labelValue.length <= 0) {
|
|
91
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
92
|
+
}
|
|
93
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
97
|
+
}
|
|
98
|
+
body = JSON.stringify(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.importConfig !== undefined &&
|
|
99
|
+
input.importConfig !== null && {
|
|
100
|
+
importConfig: serializeAws_restJson1DataSetImportConfig(input.importConfig, context),
|
|
101
|
+
})));
|
|
102
|
+
return [2, new __HttpRequest({
|
|
103
|
+
protocol: protocol,
|
|
104
|
+
hostname: hostname,
|
|
105
|
+
port: port,
|
|
106
|
+
method: "POST",
|
|
107
|
+
headers: headers,
|
|
108
|
+
path: resolvedPath,
|
|
109
|
+
body: body,
|
|
110
|
+
})];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}); };
|
|
114
|
+
export var serializeAws_restJson1CreateDeploymentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
115
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
116
|
+
var _c;
|
|
117
|
+
return __generator(this, function (_d) {
|
|
118
|
+
switch (_d.label) {
|
|
119
|
+
case 0: return [4, context.endpoint()];
|
|
120
|
+
case 1:
|
|
121
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
122
|
+
headers = {
|
|
123
|
+
"content-type": "application/json",
|
|
124
|
+
};
|
|
125
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/deployments";
|
|
126
|
+
if (input.applicationId !== undefined) {
|
|
127
|
+
labelValue = input.applicationId;
|
|
128
|
+
if (labelValue.length <= 0) {
|
|
129
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
130
|
+
}
|
|
131
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
135
|
+
}
|
|
136
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.applicationVersion !== undefined &&
|
|
137
|
+
input.applicationVersion !== null && { applicationVersion: input.applicationVersion })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.environmentId !== undefined && input.environmentId !== null && { environmentId: input.environmentId })));
|
|
138
|
+
return [2, new __HttpRequest({
|
|
139
|
+
protocol: protocol,
|
|
140
|
+
hostname: hostname,
|
|
141
|
+
port: port,
|
|
142
|
+
method: "POST",
|
|
143
|
+
headers: headers,
|
|
144
|
+
path: resolvedPath,
|
|
145
|
+
body: body,
|
|
146
|
+
})];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}); };
|
|
150
|
+
export var serializeAws_restJson1CreateEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
151
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
152
|
+
var _c;
|
|
153
|
+
return __generator(this, function (_d) {
|
|
154
|
+
switch (_d.label) {
|
|
155
|
+
case 0: return [4, context.endpoint()];
|
|
156
|
+
case 1:
|
|
157
|
+
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
158
|
+
headers = {
|
|
159
|
+
"content-type": "application/json",
|
|
160
|
+
};
|
|
161
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments";
|
|
162
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.description !== undefined && input.description !== null && { description: input.description })), (input.engineType !== undefined && input.engineType !== null && { engineType: input.engineType })), (input.engineVersion !== undefined && input.engineVersion !== null && { engineVersion: input.engineVersion })), (input.highAvailabilityConfig !== undefined &&
|
|
163
|
+
input.highAvailabilityConfig !== null && {
|
|
164
|
+
highAvailabilityConfig: serializeAws_restJson1HighAvailabilityConfig(input.highAvailabilityConfig, context),
|
|
165
|
+
})), (input.instanceType !== undefined && input.instanceType !== null && { instanceType: input.instanceType })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.preferredMaintenanceWindow !== undefined &&
|
|
166
|
+
input.preferredMaintenanceWindow !== null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow })), (input.publiclyAccessible !== undefined &&
|
|
167
|
+
input.publiclyAccessible !== null && { publiclyAccessible: input.publiclyAccessible })), (input.securityGroupIds !== undefined &&
|
|
168
|
+
input.securityGroupIds !== null && {
|
|
169
|
+
securityGroupIds: serializeAws_restJson1String50List(input.securityGroupIds, context),
|
|
170
|
+
})), (input.storageConfigurations !== undefined &&
|
|
171
|
+
input.storageConfigurations !== null && {
|
|
172
|
+
storageConfigurations: serializeAws_restJson1StorageConfigurationList(input.storageConfigurations, context),
|
|
173
|
+
})), (input.subnetIds !== undefined &&
|
|
174
|
+
input.subnetIds !== null && { subnetIds: serializeAws_restJson1String50List(input.subnetIds, context) })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
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
|
+
}); };
|
|
187
|
+
export var serializeAws_restJson1DeleteApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
188
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
189
|
+
return __generator(this, function (_c) {
|
|
190
|
+
switch (_c.label) {
|
|
191
|
+
case 0: return [4, context.endpoint()];
|
|
192
|
+
case 1:
|
|
193
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
194
|
+
headers = {};
|
|
195
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
196
|
+
if (input.applicationId !== undefined) {
|
|
197
|
+
labelValue = input.applicationId;
|
|
198
|
+
if (labelValue.length <= 0) {
|
|
199
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
200
|
+
}
|
|
201
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
205
|
+
}
|
|
206
|
+
return [2, new __HttpRequest({
|
|
207
|
+
protocol: protocol,
|
|
208
|
+
hostname: hostname,
|
|
209
|
+
port: port,
|
|
210
|
+
method: "DELETE",
|
|
211
|
+
headers: headers,
|
|
212
|
+
path: resolvedPath,
|
|
213
|
+
body: body,
|
|
214
|
+
})];
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}); };
|
|
218
|
+
export var serializeAws_restJson1DeleteApplicationFromEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
219
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
220
|
+
return __generator(this, function (_c) {
|
|
221
|
+
switch (_c.label) {
|
|
222
|
+
case 0: return [4, context.endpoint()];
|
|
223
|
+
case 1:
|
|
224
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
225
|
+
headers = {};
|
|
226
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
227
|
+
"/applications/{applicationId}/environment/{environmentId}";
|
|
228
|
+
if (input.applicationId !== undefined) {
|
|
229
|
+
labelValue = input.applicationId;
|
|
230
|
+
if (labelValue.length <= 0) {
|
|
231
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
232
|
+
}
|
|
233
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
237
|
+
}
|
|
238
|
+
if (input.environmentId !== undefined) {
|
|
239
|
+
labelValue = input.environmentId;
|
|
240
|
+
if (labelValue.length <= 0) {
|
|
241
|
+
throw new Error("Empty value provided for input HTTP label: environmentId.");
|
|
242
|
+
}
|
|
243
|
+
resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
throw new Error("No value provided for input HTTP label: environmentId.");
|
|
247
|
+
}
|
|
248
|
+
return [2, new __HttpRequest({
|
|
249
|
+
protocol: protocol,
|
|
250
|
+
hostname: hostname,
|
|
251
|
+
port: port,
|
|
252
|
+
method: "DELETE",
|
|
253
|
+
headers: headers,
|
|
254
|
+
path: resolvedPath,
|
|
255
|
+
body: body,
|
|
256
|
+
})];
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}); };
|
|
260
|
+
export var serializeAws_restJson1DeleteEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
261
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
262
|
+
return __generator(this, function (_c) {
|
|
263
|
+
switch (_c.label) {
|
|
264
|
+
case 0: return [4, context.endpoint()];
|
|
265
|
+
case 1:
|
|
266
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
267
|
+
headers = {};
|
|
268
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{environmentId}";
|
|
269
|
+
if (input.environmentId !== undefined) {
|
|
270
|
+
labelValue = input.environmentId;
|
|
271
|
+
if (labelValue.length <= 0) {
|
|
272
|
+
throw new Error("Empty value provided for input HTTP label: environmentId.");
|
|
273
|
+
}
|
|
274
|
+
resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
throw new Error("No value provided for input HTTP label: environmentId.");
|
|
278
|
+
}
|
|
279
|
+
return [2, new __HttpRequest({
|
|
280
|
+
protocol: protocol,
|
|
281
|
+
hostname: hostname,
|
|
282
|
+
port: port,
|
|
283
|
+
method: "DELETE",
|
|
284
|
+
headers: headers,
|
|
285
|
+
path: resolvedPath,
|
|
286
|
+
body: body,
|
|
287
|
+
})];
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}); };
|
|
291
|
+
export var serializeAws_restJson1GetApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
292
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
293
|
+
return __generator(this, function (_c) {
|
|
294
|
+
switch (_c.label) {
|
|
295
|
+
case 0: return [4, context.endpoint()];
|
|
296
|
+
case 1:
|
|
297
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
298
|
+
headers = {};
|
|
299
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
300
|
+
if (input.applicationId !== undefined) {
|
|
301
|
+
labelValue = input.applicationId;
|
|
302
|
+
if (labelValue.length <= 0) {
|
|
303
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
304
|
+
}
|
|
305
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
309
|
+
}
|
|
310
|
+
return [2, new __HttpRequest({
|
|
311
|
+
protocol: protocol,
|
|
312
|
+
hostname: hostname,
|
|
313
|
+
port: port,
|
|
314
|
+
method: "GET",
|
|
315
|
+
headers: headers,
|
|
316
|
+
path: resolvedPath,
|
|
317
|
+
body: body,
|
|
318
|
+
})];
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
}); };
|
|
322
|
+
export var serializeAws_restJson1GetApplicationVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
323
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
324
|
+
return __generator(this, function (_c) {
|
|
325
|
+
switch (_c.label) {
|
|
326
|
+
case 0: return [4, context.endpoint()];
|
|
327
|
+
case 1:
|
|
328
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
329
|
+
headers = {};
|
|
330
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
331
|
+
"/applications/{applicationId}/versions/{applicationVersion}";
|
|
332
|
+
if (input.applicationId !== undefined) {
|
|
333
|
+
labelValue = input.applicationId;
|
|
334
|
+
if (labelValue.length <= 0) {
|
|
335
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
336
|
+
}
|
|
337
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
341
|
+
}
|
|
342
|
+
if (input.applicationVersion !== undefined) {
|
|
343
|
+
labelValue = input.applicationVersion.toString();
|
|
344
|
+
if (labelValue.length <= 0) {
|
|
345
|
+
throw new Error("Empty value provided for input HTTP label: applicationVersion.");
|
|
346
|
+
}
|
|
347
|
+
resolvedPath = resolvedPath.replace("{applicationVersion}", __extendedEncodeURIComponent(labelValue));
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
throw new Error("No value provided for input HTTP label: applicationVersion.");
|
|
351
|
+
}
|
|
352
|
+
return [2, new __HttpRequest({
|
|
353
|
+
protocol: protocol,
|
|
354
|
+
hostname: hostname,
|
|
355
|
+
port: port,
|
|
356
|
+
method: "GET",
|
|
357
|
+
headers: headers,
|
|
358
|
+
path: resolvedPath,
|
|
359
|
+
body: body,
|
|
360
|
+
})];
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
}); };
|
|
364
|
+
export var serializeAws_restJson1GetBatchJobExecutionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
365
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
366
|
+
return __generator(this, function (_c) {
|
|
367
|
+
switch (_c.label) {
|
|
368
|
+
case 0: return [4, context.endpoint()];
|
|
369
|
+
case 1:
|
|
370
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
371
|
+
headers = {};
|
|
372
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
373
|
+
"/applications/{applicationId}/batch-job-executions/{executionId}";
|
|
374
|
+
if (input.applicationId !== undefined) {
|
|
375
|
+
labelValue = input.applicationId;
|
|
376
|
+
if (labelValue.length <= 0) {
|
|
377
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
378
|
+
}
|
|
379
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
383
|
+
}
|
|
384
|
+
if (input.executionId !== undefined) {
|
|
385
|
+
labelValue = input.executionId;
|
|
386
|
+
if (labelValue.length <= 0) {
|
|
387
|
+
throw new Error("Empty value provided for input HTTP label: executionId.");
|
|
388
|
+
}
|
|
389
|
+
resolvedPath = resolvedPath.replace("{executionId}", __extendedEncodeURIComponent(labelValue));
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
throw new Error("No value provided for input HTTP label: executionId.");
|
|
393
|
+
}
|
|
394
|
+
return [2, new __HttpRequest({
|
|
395
|
+
protocol: protocol,
|
|
396
|
+
hostname: hostname,
|
|
397
|
+
port: port,
|
|
398
|
+
method: "GET",
|
|
399
|
+
headers: headers,
|
|
400
|
+
path: resolvedPath,
|
|
401
|
+
body: body,
|
|
402
|
+
})];
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
}); };
|
|
406
|
+
export var serializeAws_restJson1GetDataSetDetailsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
407
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
408
|
+
return __generator(this, function (_c) {
|
|
409
|
+
switch (_c.label) {
|
|
410
|
+
case 0: return [4, context.endpoint()];
|
|
411
|
+
case 1:
|
|
412
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
413
|
+
headers = {};
|
|
414
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
415
|
+
"/applications/{applicationId}/datasets/{dataSetName}";
|
|
416
|
+
if (input.applicationId !== undefined) {
|
|
417
|
+
labelValue = input.applicationId;
|
|
418
|
+
if (labelValue.length <= 0) {
|
|
419
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
420
|
+
}
|
|
421
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
425
|
+
}
|
|
426
|
+
if (input.dataSetName !== undefined) {
|
|
427
|
+
labelValue = input.dataSetName;
|
|
428
|
+
if (labelValue.length <= 0) {
|
|
429
|
+
throw new Error("Empty value provided for input HTTP label: dataSetName.");
|
|
430
|
+
}
|
|
431
|
+
resolvedPath = resolvedPath.replace("{dataSetName}", __extendedEncodeURIComponent(labelValue));
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
throw new Error("No value provided for input HTTP label: dataSetName.");
|
|
435
|
+
}
|
|
436
|
+
return [2, new __HttpRequest({
|
|
437
|
+
protocol: protocol,
|
|
438
|
+
hostname: hostname,
|
|
439
|
+
port: port,
|
|
440
|
+
method: "GET",
|
|
441
|
+
headers: headers,
|
|
442
|
+
path: resolvedPath,
|
|
443
|
+
body: body,
|
|
444
|
+
})];
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
}); };
|
|
448
|
+
export var serializeAws_restJson1GetDataSetImportTaskCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
449
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
450
|
+
return __generator(this, function (_c) {
|
|
451
|
+
switch (_c.label) {
|
|
452
|
+
case 0: return [4, context.endpoint()];
|
|
453
|
+
case 1:
|
|
454
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
455
|
+
headers = {};
|
|
456
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
457
|
+
"/applications/{applicationId}/dataset-import-tasks/{taskId}";
|
|
458
|
+
if (input.applicationId !== undefined) {
|
|
459
|
+
labelValue = input.applicationId;
|
|
460
|
+
if (labelValue.length <= 0) {
|
|
461
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
462
|
+
}
|
|
463
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
467
|
+
}
|
|
468
|
+
if (input.taskId !== undefined) {
|
|
469
|
+
labelValue = input.taskId;
|
|
470
|
+
if (labelValue.length <= 0) {
|
|
471
|
+
throw new Error("Empty value provided for input HTTP label: taskId.");
|
|
472
|
+
}
|
|
473
|
+
resolvedPath = resolvedPath.replace("{taskId}", __extendedEncodeURIComponent(labelValue));
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
throw new Error("No value provided for input HTTP label: taskId.");
|
|
477
|
+
}
|
|
478
|
+
return [2, new __HttpRequest({
|
|
479
|
+
protocol: protocol,
|
|
480
|
+
hostname: hostname,
|
|
481
|
+
port: port,
|
|
482
|
+
method: "GET",
|
|
483
|
+
headers: headers,
|
|
484
|
+
path: resolvedPath,
|
|
485
|
+
body: body,
|
|
486
|
+
})];
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
}); };
|
|
490
|
+
export var serializeAws_restJson1GetDeploymentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
491
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
492
|
+
return __generator(this, function (_c) {
|
|
493
|
+
switch (_c.label) {
|
|
494
|
+
case 0: return [4, context.endpoint()];
|
|
495
|
+
case 1:
|
|
496
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
497
|
+
headers = {};
|
|
498
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
499
|
+
"/applications/{applicationId}/deployments/{deploymentId}";
|
|
500
|
+
if (input.deploymentId !== undefined) {
|
|
501
|
+
labelValue = input.deploymentId;
|
|
502
|
+
if (labelValue.length <= 0) {
|
|
503
|
+
throw new Error("Empty value provided for input HTTP label: deploymentId.");
|
|
504
|
+
}
|
|
505
|
+
resolvedPath = resolvedPath.replace("{deploymentId}", __extendedEncodeURIComponent(labelValue));
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
throw new Error("No value provided for input HTTP label: deploymentId.");
|
|
509
|
+
}
|
|
510
|
+
if (input.applicationId !== undefined) {
|
|
511
|
+
labelValue = input.applicationId;
|
|
512
|
+
if (labelValue.length <= 0) {
|
|
513
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
514
|
+
}
|
|
515
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
519
|
+
}
|
|
520
|
+
return [2, new __HttpRequest({
|
|
521
|
+
protocol: protocol,
|
|
522
|
+
hostname: hostname,
|
|
523
|
+
port: port,
|
|
524
|
+
method: "GET",
|
|
525
|
+
headers: headers,
|
|
526
|
+
path: resolvedPath,
|
|
527
|
+
body: body,
|
|
528
|
+
})];
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
}); };
|
|
532
|
+
export var serializeAws_restJson1GetEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
533
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
534
|
+
return __generator(this, function (_c) {
|
|
535
|
+
switch (_c.label) {
|
|
536
|
+
case 0: return [4, context.endpoint()];
|
|
537
|
+
case 1:
|
|
538
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
539
|
+
headers = {};
|
|
540
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{environmentId}";
|
|
541
|
+
if (input.environmentId !== undefined) {
|
|
542
|
+
labelValue = input.environmentId;
|
|
543
|
+
if (labelValue.length <= 0) {
|
|
544
|
+
throw new Error("Empty value provided for input HTTP label: environmentId.");
|
|
545
|
+
}
|
|
546
|
+
resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
throw new Error("No value provided for input HTTP label: environmentId.");
|
|
550
|
+
}
|
|
551
|
+
return [2, new __HttpRequest({
|
|
552
|
+
protocol: protocol,
|
|
553
|
+
hostname: hostname,
|
|
554
|
+
port: port,
|
|
555
|
+
method: "GET",
|
|
556
|
+
headers: headers,
|
|
557
|
+
path: resolvedPath,
|
|
558
|
+
body: body,
|
|
559
|
+
})];
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
}); };
|
|
563
|
+
export var serializeAws_restJson1ListApplicationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
564
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
565
|
+
return __generator(this, function (_c) {
|
|
566
|
+
switch (_c.label) {
|
|
567
|
+
case 0: return [4, context.endpoint()];
|
|
568
|
+
case 1:
|
|
569
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
570
|
+
headers = {};
|
|
571
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
572
|
+
query = __assign(__assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.names !== undefined && { names: (input.names || []).map(function (_entry) { return _entry; }) })), (input.environmentId !== undefined && { environmentId: input.environmentId }));
|
|
573
|
+
return [2, new __HttpRequest({
|
|
574
|
+
protocol: protocol,
|
|
575
|
+
hostname: hostname,
|
|
576
|
+
port: port,
|
|
577
|
+
method: "GET",
|
|
578
|
+
headers: headers,
|
|
579
|
+
path: resolvedPath,
|
|
580
|
+
query: query,
|
|
581
|
+
body: body,
|
|
582
|
+
})];
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
}); };
|
|
586
|
+
export var serializeAws_restJson1ListApplicationVersionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
587
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
588
|
+
return __generator(this, function (_c) {
|
|
589
|
+
switch (_c.label) {
|
|
590
|
+
case 0: return [4, context.endpoint()];
|
|
591
|
+
case 1:
|
|
592
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
593
|
+
headers = {};
|
|
594
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/versions";
|
|
595
|
+
if (input.applicationId !== undefined) {
|
|
596
|
+
labelValue = input.applicationId;
|
|
597
|
+
if (labelValue.length <= 0) {
|
|
598
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
599
|
+
}
|
|
600
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
601
|
+
}
|
|
602
|
+
else {
|
|
603
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
604
|
+
}
|
|
605
|
+
query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
|
|
606
|
+
return [2, new __HttpRequest({
|
|
607
|
+
protocol: protocol,
|
|
608
|
+
hostname: hostname,
|
|
609
|
+
port: port,
|
|
610
|
+
method: "GET",
|
|
611
|
+
headers: headers,
|
|
612
|
+
path: resolvedPath,
|
|
613
|
+
query: query,
|
|
614
|
+
body: body,
|
|
615
|
+
})];
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
}); };
|
|
619
|
+
export var serializeAws_restJson1ListBatchJobDefinitionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
620
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
621
|
+
return __generator(this, function (_c) {
|
|
622
|
+
switch (_c.label) {
|
|
623
|
+
case 0: return [4, context.endpoint()];
|
|
624
|
+
case 1:
|
|
625
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
626
|
+
headers = {};
|
|
627
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
628
|
+
"/applications/{applicationId}/batch-job-definitions";
|
|
629
|
+
if (input.applicationId !== undefined) {
|
|
630
|
+
labelValue = input.applicationId;
|
|
631
|
+
if (labelValue.length <= 0) {
|
|
632
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
633
|
+
}
|
|
634
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
635
|
+
}
|
|
636
|
+
else {
|
|
637
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
638
|
+
}
|
|
639
|
+
query = __assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.prefix !== undefined && { prefix: input.prefix }));
|
|
640
|
+
return [2, new __HttpRequest({
|
|
641
|
+
protocol: protocol,
|
|
642
|
+
hostname: hostname,
|
|
643
|
+
port: port,
|
|
644
|
+
method: "GET",
|
|
645
|
+
headers: headers,
|
|
646
|
+
path: resolvedPath,
|
|
647
|
+
query: query,
|
|
648
|
+
body: body,
|
|
649
|
+
})];
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
}); };
|
|
653
|
+
export var serializeAws_restJson1ListBatchJobExecutionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
654
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
655
|
+
return __generator(this, function (_c) {
|
|
656
|
+
switch (_c.label) {
|
|
657
|
+
case 0: return [4, context.endpoint()];
|
|
658
|
+
case 1:
|
|
659
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
660
|
+
headers = {};
|
|
661
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
662
|
+
"/applications/{applicationId}/batch-job-executions";
|
|
663
|
+
if (input.applicationId !== undefined) {
|
|
664
|
+
labelValue = input.applicationId;
|
|
665
|
+
if (labelValue.length <= 0) {
|
|
666
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
667
|
+
}
|
|
668
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
669
|
+
}
|
|
670
|
+
else {
|
|
671
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
672
|
+
}
|
|
673
|
+
query = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.executionIds !== undefined && {
|
|
674
|
+
executionIds: (input.executionIds || []).map(function (_entry) { return _entry; }),
|
|
675
|
+
})), (input.jobName !== undefined && { jobName: input.jobName })), (input.status !== undefined && { status: input.status })), (input.startedAfter !== undefined && {
|
|
676
|
+
startedAfter: (input.startedAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
677
|
+
})), (input.startedBefore !== undefined && {
|
|
678
|
+
startedBefore: (input.startedBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
679
|
+
}));
|
|
680
|
+
return [2, new __HttpRequest({
|
|
681
|
+
protocol: protocol,
|
|
682
|
+
hostname: hostname,
|
|
683
|
+
port: port,
|
|
684
|
+
method: "GET",
|
|
685
|
+
headers: headers,
|
|
686
|
+
path: resolvedPath,
|
|
687
|
+
query: query,
|
|
688
|
+
body: body,
|
|
689
|
+
})];
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}); };
|
|
693
|
+
export var serializeAws_restJson1ListDataSetImportHistoryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
694
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
695
|
+
return __generator(this, function (_c) {
|
|
696
|
+
switch (_c.label) {
|
|
697
|
+
case 0: return [4, context.endpoint()];
|
|
698
|
+
case 1:
|
|
699
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
700
|
+
headers = {};
|
|
701
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
702
|
+
"/applications/{applicationId}/dataset-import-tasks";
|
|
703
|
+
if (input.applicationId !== undefined) {
|
|
704
|
+
labelValue = input.applicationId;
|
|
705
|
+
if (labelValue.length <= 0) {
|
|
706
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
707
|
+
}
|
|
708
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
712
|
+
}
|
|
713
|
+
query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
|
|
714
|
+
return [2, new __HttpRequest({
|
|
715
|
+
protocol: protocol,
|
|
716
|
+
hostname: hostname,
|
|
717
|
+
port: port,
|
|
718
|
+
method: "GET",
|
|
719
|
+
headers: headers,
|
|
720
|
+
path: resolvedPath,
|
|
721
|
+
query: query,
|
|
722
|
+
body: body,
|
|
723
|
+
})];
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
}); };
|
|
727
|
+
export var serializeAws_restJson1ListDataSetsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
728
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
729
|
+
return __generator(this, function (_c) {
|
|
730
|
+
switch (_c.label) {
|
|
731
|
+
case 0: return [4, context.endpoint()];
|
|
732
|
+
case 1:
|
|
733
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
734
|
+
headers = {};
|
|
735
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/datasets";
|
|
736
|
+
if (input.applicationId !== undefined) {
|
|
737
|
+
labelValue = input.applicationId;
|
|
738
|
+
if (labelValue.length <= 0) {
|
|
739
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
740
|
+
}
|
|
741
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
745
|
+
}
|
|
746
|
+
query = __assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.prefix !== undefined && { prefix: input.prefix }));
|
|
747
|
+
return [2, new __HttpRequest({
|
|
748
|
+
protocol: protocol,
|
|
749
|
+
hostname: hostname,
|
|
750
|
+
port: port,
|
|
751
|
+
method: "GET",
|
|
752
|
+
headers: headers,
|
|
753
|
+
path: resolvedPath,
|
|
754
|
+
query: query,
|
|
755
|
+
body: body,
|
|
756
|
+
})];
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
}); };
|
|
760
|
+
export var serializeAws_restJson1ListDeploymentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
761
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
762
|
+
return __generator(this, function (_c) {
|
|
763
|
+
switch (_c.label) {
|
|
764
|
+
case 0: return [4, context.endpoint()];
|
|
765
|
+
case 1:
|
|
766
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
767
|
+
headers = {};
|
|
768
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/deployments";
|
|
769
|
+
if (input.applicationId !== undefined) {
|
|
770
|
+
labelValue = input.applicationId;
|
|
771
|
+
if (labelValue.length <= 0) {
|
|
772
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
773
|
+
}
|
|
774
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
778
|
+
}
|
|
779
|
+
query = __assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
|
|
780
|
+
return [2, new __HttpRequest({
|
|
781
|
+
protocol: protocol,
|
|
782
|
+
hostname: hostname,
|
|
783
|
+
port: port,
|
|
784
|
+
method: "GET",
|
|
785
|
+
headers: headers,
|
|
786
|
+
path: resolvedPath,
|
|
787
|
+
query: query,
|
|
788
|
+
body: body,
|
|
789
|
+
})];
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
}); };
|
|
793
|
+
export var serializeAws_restJson1ListEngineVersionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
794
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
795
|
+
return __generator(this, function (_c) {
|
|
796
|
+
switch (_c.label) {
|
|
797
|
+
case 0: return [4, context.endpoint()];
|
|
798
|
+
case 1:
|
|
799
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
800
|
+
headers = {};
|
|
801
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/engine-versions";
|
|
802
|
+
query = __assign(__assign(__assign({}, (input.engineType !== undefined && { engineType: input.engineType })), (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() }));
|
|
803
|
+
return [2, new __HttpRequest({
|
|
804
|
+
protocol: protocol,
|
|
805
|
+
hostname: hostname,
|
|
806
|
+
port: port,
|
|
807
|
+
method: "GET",
|
|
808
|
+
headers: headers,
|
|
809
|
+
path: resolvedPath,
|
|
810
|
+
query: query,
|
|
811
|
+
body: body,
|
|
812
|
+
})];
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
}); };
|
|
816
|
+
export var serializeAws_restJson1ListEnvironmentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
817
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
818
|
+
return __generator(this, function (_c) {
|
|
819
|
+
switch (_c.label) {
|
|
820
|
+
case 0: return [4, context.endpoint()];
|
|
821
|
+
case 1:
|
|
822
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
823
|
+
headers = {};
|
|
824
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments";
|
|
825
|
+
query = __assign(__assign(__assign(__assign({}, (input.nextToken !== undefined && { nextToken: input.nextToken })), (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.names !== undefined && { names: (input.names || []).map(function (_entry) { return _entry; }) })), (input.engineType !== undefined && { engineType: input.engineType }));
|
|
826
|
+
return [2, new __HttpRequest({
|
|
827
|
+
protocol: protocol,
|
|
828
|
+
hostname: hostname,
|
|
829
|
+
port: port,
|
|
830
|
+
method: "GET",
|
|
831
|
+
headers: headers,
|
|
832
|
+
path: resolvedPath,
|
|
833
|
+
query: query,
|
|
834
|
+
body: body,
|
|
835
|
+
})];
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
}); };
|
|
839
|
+
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
840
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
841
|
+
return __generator(this, function (_c) {
|
|
842
|
+
switch (_c.label) {
|
|
843
|
+
case 0: return [4, context.endpoint()];
|
|
844
|
+
case 1:
|
|
845
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
846
|
+
headers = {};
|
|
847
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
848
|
+
if (input.resourceArn !== undefined) {
|
|
849
|
+
labelValue = input.resourceArn;
|
|
850
|
+
if (labelValue.length <= 0) {
|
|
851
|
+
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
852
|
+
}
|
|
853
|
+
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
857
|
+
}
|
|
858
|
+
return [2, new __HttpRequest({
|
|
859
|
+
protocol: protocol,
|
|
860
|
+
hostname: hostname,
|
|
861
|
+
port: port,
|
|
862
|
+
method: "GET",
|
|
863
|
+
headers: headers,
|
|
864
|
+
path: resolvedPath,
|
|
865
|
+
body: body,
|
|
866
|
+
})];
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
}); };
|
|
870
|
+
export var serializeAws_restJson1StartApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
871
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
872
|
+
return __generator(this, function (_c) {
|
|
873
|
+
switch (_c.label) {
|
|
874
|
+
case 0: return [4, context.endpoint()];
|
|
875
|
+
case 1:
|
|
876
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
877
|
+
headers = {};
|
|
878
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/start";
|
|
879
|
+
if (input.applicationId !== undefined) {
|
|
880
|
+
labelValue = input.applicationId;
|
|
881
|
+
if (labelValue.length <= 0) {
|
|
882
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
883
|
+
}
|
|
884
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
885
|
+
}
|
|
886
|
+
else {
|
|
887
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
888
|
+
}
|
|
889
|
+
return [2, new __HttpRequest({
|
|
890
|
+
protocol: protocol,
|
|
891
|
+
hostname: hostname,
|
|
892
|
+
port: port,
|
|
893
|
+
method: "POST",
|
|
894
|
+
headers: headers,
|
|
895
|
+
path: resolvedPath,
|
|
896
|
+
body: body,
|
|
897
|
+
})];
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
}); };
|
|
901
|
+
export var serializeAws_restJson1StartBatchJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
902
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
903
|
+
return __generator(this, function (_c) {
|
|
904
|
+
switch (_c.label) {
|
|
905
|
+
case 0: return [4, context.endpoint()];
|
|
906
|
+
case 1:
|
|
907
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
908
|
+
headers = {
|
|
909
|
+
"content-type": "application/json",
|
|
910
|
+
};
|
|
911
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/batch-job";
|
|
912
|
+
if (input.applicationId !== undefined) {
|
|
913
|
+
labelValue = input.applicationId;
|
|
914
|
+
if (labelValue.length <= 0) {
|
|
915
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
916
|
+
}
|
|
917
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
918
|
+
}
|
|
919
|
+
else {
|
|
920
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
921
|
+
}
|
|
922
|
+
body = JSON.stringify(__assign(__assign({}, (input.batchJobIdentifier !== undefined &&
|
|
923
|
+
input.batchJobIdentifier !== null && {
|
|
924
|
+
batchJobIdentifier: serializeAws_restJson1BatchJobIdentifier(input.batchJobIdentifier, context),
|
|
925
|
+
})), (input.jobParams !== undefined &&
|
|
926
|
+
input.jobParams !== null && { jobParams: serializeAws_restJson1BatchJobParametersMap(input.jobParams, context) })));
|
|
927
|
+
return [2, new __HttpRequest({
|
|
928
|
+
protocol: protocol,
|
|
929
|
+
hostname: hostname,
|
|
930
|
+
port: port,
|
|
931
|
+
method: "POST",
|
|
932
|
+
headers: headers,
|
|
933
|
+
path: resolvedPath,
|
|
934
|
+
body: body,
|
|
935
|
+
})];
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
}); };
|
|
939
|
+
export var serializeAws_restJson1StopApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
940
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
941
|
+
return __generator(this, function (_c) {
|
|
942
|
+
switch (_c.label) {
|
|
943
|
+
case 0: return [4, context.endpoint()];
|
|
944
|
+
case 1:
|
|
945
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
946
|
+
headers = {
|
|
947
|
+
"content-type": "application/json",
|
|
948
|
+
};
|
|
949
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/stop";
|
|
950
|
+
if (input.applicationId !== undefined) {
|
|
951
|
+
labelValue = input.applicationId;
|
|
952
|
+
if (labelValue.length <= 0) {
|
|
953
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
954
|
+
}
|
|
955
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
956
|
+
}
|
|
957
|
+
else {
|
|
958
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
959
|
+
}
|
|
960
|
+
body = JSON.stringify(__assign({}, (input.forceStop !== undefined && input.forceStop !== null && { forceStop: input.forceStop })));
|
|
961
|
+
return [2, new __HttpRequest({
|
|
962
|
+
protocol: protocol,
|
|
963
|
+
hostname: hostname,
|
|
964
|
+
port: port,
|
|
965
|
+
method: "POST",
|
|
966
|
+
headers: headers,
|
|
967
|
+
path: resolvedPath,
|
|
968
|
+
body: body,
|
|
969
|
+
})];
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
}); };
|
|
973
|
+
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
974
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, 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 = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
984
|
+
if (input.resourceArn !== undefined) {
|
|
985
|
+
labelValue = input.resourceArn;
|
|
986
|
+
if (labelValue.length <= 0) {
|
|
987
|
+
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
988
|
+
}
|
|
989
|
+
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
990
|
+
}
|
|
991
|
+
else {
|
|
992
|
+
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
993
|
+
}
|
|
994
|
+
body = JSON.stringify(__assign({}, (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
995
|
+
return [2, new __HttpRequest({
|
|
996
|
+
protocol: protocol,
|
|
997
|
+
hostname: hostname,
|
|
998
|
+
port: port,
|
|
999
|
+
method: "POST",
|
|
1000
|
+
headers: headers,
|
|
1001
|
+
path: resolvedPath,
|
|
1002
|
+
body: body,
|
|
1003
|
+
})];
|
|
1004
|
+
}
|
|
1005
|
+
});
|
|
1006
|
+
}); };
|
|
1007
|
+
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1008
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
1009
|
+
return __generator(this, function (_c) {
|
|
1010
|
+
switch (_c.label) {
|
|
1011
|
+
case 0: return [4, context.endpoint()];
|
|
1012
|
+
case 1:
|
|
1013
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1014
|
+
headers = {};
|
|
1015
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
1016
|
+
if (input.resourceArn !== undefined) {
|
|
1017
|
+
labelValue = input.resourceArn;
|
|
1018
|
+
if (labelValue.length <= 0) {
|
|
1019
|
+
throw new Error("Empty value provided for input HTTP label: resourceArn.");
|
|
1020
|
+
}
|
|
1021
|
+
resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
throw new Error("No value provided for input HTTP label: resourceArn.");
|
|
1025
|
+
}
|
|
1026
|
+
query = __assign({}, (input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map(function (_entry) { return _entry; }) }));
|
|
1027
|
+
return [2, new __HttpRequest({
|
|
1028
|
+
protocol: protocol,
|
|
1029
|
+
hostname: hostname,
|
|
1030
|
+
port: port,
|
|
1031
|
+
method: "DELETE",
|
|
1032
|
+
headers: headers,
|
|
1033
|
+
path: resolvedPath,
|
|
1034
|
+
query: query,
|
|
1035
|
+
body: body,
|
|
1036
|
+
})];
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
}); };
|
|
1040
|
+
export var serializeAws_restJson1UpdateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1041
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
1042
|
+
return __generator(this, function (_c) {
|
|
1043
|
+
switch (_c.label) {
|
|
1044
|
+
case 0: return [4, context.endpoint()];
|
|
1045
|
+
case 1:
|
|
1046
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1047
|
+
headers = {
|
|
1048
|
+
"content-type": "application/json",
|
|
1049
|
+
};
|
|
1050
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
1051
|
+
if (input.applicationId !== undefined) {
|
|
1052
|
+
labelValue = input.applicationId;
|
|
1053
|
+
if (labelValue.length <= 0) {
|
|
1054
|
+
throw new Error("Empty value provided for input HTTP label: applicationId.");
|
|
1055
|
+
}
|
|
1056
|
+
resolvedPath = resolvedPath.replace("{applicationId}", __extendedEncodeURIComponent(labelValue));
|
|
1057
|
+
}
|
|
1058
|
+
else {
|
|
1059
|
+
throw new Error("No value provided for input HTTP label: applicationId.");
|
|
1060
|
+
}
|
|
1061
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.currentApplicationVersion !== undefined &&
|
|
1062
|
+
input.currentApplicationVersion !== null && { currentApplicationVersion: input.currentApplicationVersion })), (input.definition !== undefined &&
|
|
1063
|
+
input.definition !== null && { definition: serializeAws_restJson1Definition(input.definition, context) })), (input.description !== undefined && input.description !== null && { description: input.description })));
|
|
1064
|
+
return [2, new __HttpRequest({
|
|
1065
|
+
protocol: protocol,
|
|
1066
|
+
hostname: hostname,
|
|
1067
|
+
port: port,
|
|
1068
|
+
method: "PATCH",
|
|
1069
|
+
headers: headers,
|
|
1070
|
+
path: resolvedPath,
|
|
1071
|
+
body: body,
|
|
1072
|
+
})];
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1075
|
+
}); };
|
|
1076
|
+
export var serializeAws_restJson1UpdateEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1077
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
1078
|
+
return __generator(this, function (_c) {
|
|
1079
|
+
switch (_c.label) {
|
|
1080
|
+
case 0: return [4, context.endpoint()];
|
|
1081
|
+
case 1:
|
|
1082
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1083
|
+
headers = {
|
|
1084
|
+
"content-type": "application/json",
|
|
1085
|
+
};
|
|
1086
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{environmentId}";
|
|
1087
|
+
if (input.environmentId !== undefined) {
|
|
1088
|
+
labelValue = input.environmentId;
|
|
1089
|
+
if (labelValue.length <= 0) {
|
|
1090
|
+
throw new Error("Empty value provided for input HTTP label: environmentId.");
|
|
1091
|
+
}
|
|
1092
|
+
resolvedPath = resolvedPath.replace("{environmentId}", __extendedEncodeURIComponent(labelValue));
|
|
1093
|
+
}
|
|
1094
|
+
else {
|
|
1095
|
+
throw new Error("No value provided for input HTTP label: environmentId.");
|
|
1096
|
+
}
|
|
1097
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.applyDuringMaintenanceWindow !== undefined &&
|
|
1098
|
+
input.applyDuringMaintenanceWindow !== null && {
|
|
1099
|
+
applyDuringMaintenanceWindow: input.applyDuringMaintenanceWindow,
|
|
1100
|
+
})), (input.desiredCapacity !== undefined &&
|
|
1101
|
+
input.desiredCapacity !== null && { desiredCapacity: input.desiredCapacity })), (input.engineVersion !== undefined && input.engineVersion !== null && { engineVersion: input.engineVersion })), (input.instanceType !== undefined && input.instanceType !== null && { instanceType: input.instanceType })), (input.preferredMaintenanceWindow !== undefined &&
|
|
1102
|
+
input.preferredMaintenanceWindow !== null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow })));
|
|
1103
|
+
return [2, new __HttpRequest({
|
|
1104
|
+
protocol: protocol,
|
|
1105
|
+
hostname: hostname,
|
|
1106
|
+
port: port,
|
|
1107
|
+
method: "PATCH",
|
|
1108
|
+
headers: headers,
|
|
1109
|
+
path: resolvedPath,
|
|
1110
|
+
body: body,
|
|
1111
|
+
})];
|
|
1112
|
+
}
|
|
1113
|
+
});
|
|
1114
|
+
}); };
|
|
1115
|
+
export var deserializeAws_restJson1CancelBatchJobExecutionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1116
|
+
var contents;
|
|
1117
|
+
return __generator(this, function (_a) {
|
|
1118
|
+
switch (_a.label) {
|
|
1119
|
+
case 0:
|
|
1120
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1121
|
+
return [2, deserializeAws_restJson1CancelBatchJobExecutionCommandError(output, context)];
|
|
1122
|
+
}
|
|
1123
|
+
contents = {
|
|
1124
|
+
$metadata: deserializeMetadata(output),
|
|
1125
|
+
};
|
|
1126
|
+
return [4, collectBody(output.body, context)];
|
|
1127
|
+
case 1:
|
|
1128
|
+
_a.sent();
|
|
1129
|
+
return [2, Promise.resolve(contents)];
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
}); };
|
|
1133
|
+
var deserializeAws_restJson1CancelBatchJobExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1134
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1135
|
+
var _c;
|
|
1136
|
+
return __generator(this, function (_d) {
|
|
1137
|
+
switch (_d.label) {
|
|
1138
|
+
case 0:
|
|
1139
|
+
_a = [__assign({}, output)];
|
|
1140
|
+
_c = {};
|
|
1141
|
+
return [4, parseBody(output.body, context)];
|
|
1142
|
+
case 1:
|
|
1143
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1144
|
+
errorCode = "UnknownError";
|
|
1145
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1146
|
+
_b = errorCode;
|
|
1147
|
+
switch (_b) {
|
|
1148
|
+
case "AccessDeniedException": return [3, 2];
|
|
1149
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1150
|
+
case "ConflictException": return [3, 4];
|
|
1151
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1152
|
+
case "InternalServerException": return [3, 6];
|
|
1153
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1154
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1155
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
1156
|
+
case "ThrottlingException": return [3, 10];
|
|
1157
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
1158
|
+
case "ValidationException": return [3, 12];
|
|
1159
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
1160
|
+
}
|
|
1161
|
+
return [3, 14];
|
|
1162
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1163
|
+
case 3: throw _d.sent();
|
|
1164
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1165
|
+
case 5: throw _d.sent();
|
|
1166
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1167
|
+
case 7: throw _d.sent();
|
|
1168
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1169
|
+
case 9: throw _d.sent();
|
|
1170
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1171
|
+
case 11: throw _d.sent();
|
|
1172
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1173
|
+
case 13: throw _d.sent();
|
|
1174
|
+
case 14:
|
|
1175
|
+
parsedBody = parsedOutput.body;
|
|
1176
|
+
response = new __BaseException({
|
|
1177
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1178
|
+
$fault: "client",
|
|
1179
|
+
$metadata: deserializeMetadata(output),
|
|
1180
|
+
});
|
|
1181
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1182
|
+
}
|
|
1183
|
+
});
|
|
1184
|
+
}); };
|
|
1185
|
+
export var deserializeAws_restJson1CreateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1186
|
+
var contents, data, _a, _b;
|
|
1187
|
+
return __generator(this, function (_c) {
|
|
1188
|
+
switch (_c.label) {
|
|
1189
|
+
case 0:
|
|
1190
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1191
|
+
return [2, deserializeAws_restJson1CreateApplicationCommandError(output, context)];
|
|
1192
|
+
}
|
|
1193
|
+
contents = {
|
|
1194
|
+
$metadata: deserializeMetadata(output),
|
|
1195
|
+
applicationArn: undefined,
|
|
1196
|
+
applicationId: undefined,
|
|
1197
|
+
applicationVersion: undefined,
|
|
1198
|
+
};
|
|
1199
|
+
_a = __expectNonNull;
|
|
1200
|
+
_b = __expectObject;
|
|
1201
|
+
return [4, parseBody(output.body, context)];
|
|
1202
|
+
case 1:
|
|
1203
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1204
|
+
if (data.applicationArn !== undefined && data.applicationArn !== null) {
|
|
1205
|
+
contents.applicationArn = __expectString(data.applicationArn);
|
|
1206
|
+
}
|
|
1207
|
+
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
1208
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
1209
|
+
}
|
|
1210
|
+
if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
|
|
1211
|
+
contents.applicationVersion = __expectInt32(data.applicationVersion);
|
|
1212
|
+
}
|
|
1213
|
+
return [2, Promise.resolve(contents)];
|
|
1214
|
+
}
|
|
1215
|
+
});
|
|
1216
|
+
}); };
|
|
1217
|
+
var deserializeAws_restJson1CreateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1218
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1219
|
+
var _c;
|
|
1220
|
+
return __generator(this, function (_d) {
|
|
1221
|
+
switch (_d.label) {
|
|
1222
|
+
case 0:
|
|
1223
|
+
_a = [__assign({}, output)];
|
|
1224
|
+
_c = {};
|
|
1225
|
+
return [4, parseBody(output.body, context)];
|
|
1226
|
+
case 1:
|
|
1227
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1228
|
+
errorCode = "UnknownError";
|
|
1229
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1230
|
+
_b = errorCode;
|
|
1231
|
+
switch (_b) {
|
|
1232
|
+
case "AccessDeniedException": return [3, 2];
|
|
1233
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1234
|
+
case "ConflictException": return [3, 4];
|
|
1235
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1236
|
+
case "InternalServerException": return [3, 6];
|
|
1237
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1238
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
1239
|
+
case "com.amazonaws.m2#ServiceQuotaExceededException": return [3, 8];
|
|
1240
|
+
case "ThrottlingException": return [3, 10];
|
|
1241
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
1242
|
+
case "ValidationException": return [3, 12];
|
|
1243
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
1244
|
+
}
|
|
1245
|
+
return [3, 14];
|
|
1246
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1247
|
+
case 3: throw _d.sent();
|
|
1248
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1249
|
+
case 5: throw _d.sent();
|
|
1250
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1251
|
+
case 7: throw _d.sent();
|
|
1252
|
+
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1253
|
+
case 9: throw _d.sent();
|
|
1254
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1255
|
+
case 11: throw _d.sent();
|
|
1256
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1257
|
+
case 13: throw _d.sent();
|
|
1258
|
+
case 14:
|
|
1259
|
+
parsedBody = parsedOutput.body;
|
|
1260
|
+
response = new __BaseException({
|
|
1261
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1262
|
+
$fault: "client",
|
|
1263
|
+
$metadata: deserializeMetadata(output),
|
|
1264
|
+
});
|
|
1265
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
}); };
|
|
1269
|
+
export var deserializeAws_restJson1CreateDataSetImportTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1270
|
+
var contents, data, _a, _b;
|
|
1271
|
+
return __generator(this, function (_c) {
|
|
1272
|
+
switch (_c.label) {
|
|
1273
|
+
case 0:
|
|
1274
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1275
|
+
return [2, deserializeAws_restJson1CreateDataSetImportTaskCommandError(output, context)];
|
|
1276
|
+
}
|
|
1277
|
+
contents = {
|
|
1278
|
+
$metadata: deserializeMetadata(output),
|
|
1279
|
+
taskId: undefined,
|
|
1280
|
+
};
|
|
1281
|
+
_a = __expectNonNull;
|
|
1282
|
+
_b = __expectObject;
|
|
1283
|
+
return [4, parseBody(output.body, context)];
|
|
1284
|
+
case 1:
|
|
1285
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1286
|
+
if (data.taskId !== undefined && data.taskId !== null) {
|
|
1287
|
+
contents.taskId = __expectString(data.taskId);
|
|
1288
|
+
}
|
|
1289
|
+
return [2, Promise.resolve(contents)];
|
|
1290
|
+
}
|
|
1291
|
+
});
|
|
1292
|
+
}); };
|
|
1293
|
+
var deserializeAws_restJson1CreateDataSetImportTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1294
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1295
|
+
var _c;
|
|
1296
|
+
return __generator(this, function (_d) {
|
|
1297
|
+
switch (_d.label) {
|
|
1298
|
+
case 0:
|
|
1299
|
+
_a = [__assign({}, output)];
|
|
1300
|
+
_c = {};
|
|
1301
|
+
return [4, parseBody(output.body, context)];
|
|
1302
|
+
case 1:
|
|
1303
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1304
|
+
errorCode = "UnknownError";
|
|
1305
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1306
|
+
_b = errorCode;
|
|
1307
|
+
switch (_b) {
|
|
1308
|
+
case "AccessDeniedException": return [3, 2];
|
|
1309
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1310
|
+
case "ConflictException": return [3, 4];
|
|
1311
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1312
|
+
case "InternalServerException": return [3, 6];
|
|
1313
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1314
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1315
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
1316
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
1317
|
+
case "com.amazonaws.m2#ServiceQuotaExceededException": return [3, 10];
|
|
1318
|
+
case "ThrottlingException": return [3, 12];
|
|
1319
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 12];
|
|
1320
|
+
case "ValidationException": return [3, 14];
|
|
1321
|
+
case "com.amazonaws.m2#ValidationException": return [3, 14];
|
|
1322
|
+
}
|
|
1323
|
+
return [3, 16];
|
|
1324
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1325
|
+
case 3: throw _d.sent();
|
|
1326
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1327
|
+
case 5: throw _d.sent();
|
|
1328
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1329
|
+
case 7: throw _d.sent();
|
|
1330
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1331
|
+
case 9: throw _d.sent();
|
|
1332
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1333
|
+
case 11: throw _d.sent();
|
|
1334
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1335
|
+
case 13: throw _d.sent();
|
|
1336
|
+
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1337
|
+
case 15: throw _d.sent();
|
|
1338
|
+
case 16:
|
|
1339
|
+
parsedBody = parsedOutput.body;
|
|
1340
|
+
response = new __BaseException({
|
|
1341
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1342
|
+
$fault: "client",
|
|
1343
|
+
$metadata: deserializeMetadata(output),
|
|
1344
|
+
});
|
|
1345
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1346
|
+
}
|
|
1347
|
+
});
|
|
1348
|
+
}); };
|
|
1349
|
+
export var deserializeAws_restJson1CreateDeploymentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1350
|
+
var contents, data, _a, _b;
|
|
1351
|
+
return __generator(this, function (_c) {
|
|
1352
|
+
switch (_c.label) {
|
|
1353
|
+
case 0:
|
|
1354
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1355
|
+
return [2, deserializeAws_restJson1CreateDeploymentCommandError(output, context)];
|
|
1356
|
+
}
|
|
1357
|
+
contents = {
|
|
1358
|
+
$metadata: deserializeMetadata(output),
|
|
1359
|
+
deploymentId: undefined,
|
|
1360
|
+
};
|
|
1361
|
+
_a = __expectNonNull;
|
|
1362
|
+
_b = __expectObject;
|
|
1363
|
+
return [4, parseBody(output.body, context)];
|
|
1364
|
+
case 1:
|
|
1365
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1366
|
+
if (data.deploymentId !== undefined && data.deploymentId !== null) {
|
|
1367
|
+
contents.deploymentId = __expectString(data.deploymentId);
|
|
1368
|
+
}
|
|
1369
|
+
return [2, Promise.resolve(contents)];
|
|
1370
|
+
}
|
|
1371
|
+
});
|
|
1372
|
+
}); };
|
|
1373
|
+
var deserializeAws_restJson1CreateDeploymentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1374
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1375
|
+
var _c;
|
|
1376
|
+
return __generator(this, function (_d) {
|
|
1377
|
+
switch (_d.label) {
|
|
1378
|
+
case 0:
|
|
1379
|
+
_a = [__assign({}, output)];
|
|
1380
|
+
_c = {};
|
|
1381
|
+
return [4, parseBody(output.body, context)];
|
|
1382
|
+
case 1:
|
|
1383
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1384
|
+
errorCode = "UnknownError";
|
|
1385
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1386
|
+
_b = errorCode;
|
|
1387
|
+
switch (_b) {
|
|
1388
|
+
case "AccessDeniedException": return [3, 2];
|
|
1389
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1390
|
+
case "ConflictException": return [3, 4];
|
|
1391
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1392
|
+
case "InternalServerException": return [3, 6];
|
|
1393
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1394
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1395
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
1396
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
1397
|
+
case "com.amazonaws.m2#ServiceQuotaExceededException": return [3, 10];
|
|
1398
|
+
case "ThrottlingException": return [3, 12];
|
|
1399
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 12];
|
|
1400
|
+
case "ValidationException": return [3, 14];
|
|
1401
|
+
case "com.amazonaws.m2#ValidationException": return [3, 14];
|
|
1402
|
+
}
|
|
1403
|
+
return [3, 16];
|
|
1404
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1405
|
+
case 3: throw _d.sent();
|
|
1406
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1407
|
+
case 5: throw _d.sent();
|
|
1408
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1409
|
+
case 7: throw _d.sent();
|
|
1410
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1411
|
+
case 9: throw _d.sent();
|
|
1412
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1413
|
+
case 11: throw _d.sent();
|
|
1414
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1415
|
+
case 13: throw _d.sent();
|
|
1416
|
+
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1417
|
+
case 15: throw _d.sent();
|
|
1418
|
+
case 16:
|
|
1419
|
+
parsedBody = parsedOutput.body;
|
|
1420
|
+
response = new __BaseException({
|
|
1421
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1422
|
+
$fault: "client",
|
|
1423
|
+
$metadata: deserializeMetadata(output),
|
|
1424
|
+
});
|
|
1425
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
}); };
|
|
1429
|
+
export var deserializeAws_restJson1CreateEnvironmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1430
|
+
var contents, data, _a, _b;
|
|
1431
|
+
return __generator(this, function (_c) {
|
|
1432
|
+
switch (_c.label) {
|
|
1433
|
+
case 0:
|
|
1434
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1435
|
+
return [2, deserializeAws_restJson1CreateEnvironmentCommandError(output, context)];
|
|
1436
|
+
}
|
|
1437
|
+
contents = {
|
|
1438
|
+
$metadata: deserializeMetadata(output),
|
|
1439
|
+
environmentId: undefined,
|
|
1440
|
+
};
|
|
1441
|
+
_a = __expectNonNull;
|
|
1442
|
+
_b = __expectObject;
|
|
1443
|
+
return [4, parseBody(output.body, context)];
|
|
1444
|
+
case 1:
|
|
1445
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1446
|
+
if (data.environmentId !== undefined && data.environmentId !== null) {
|
|
1447
|
+
contents.environmentId = __expectString(data.environmentId);
|
|
1448
|
+
}
|
|
1449
|
+
return [2, Promise.resolve(contents)];
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
}); };
|
|
1453
|
+
var deserializeAws_restJson1CreateEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1454
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1455
|
+
var _c;
|
|
1456
|
+
return __generator(this, function (_d) {
|
|
1457
|
+
switch (_d.label) {
|
|
1458
|
+
case 0:
|
|
1459
|
+
_a = [__assign({}, output)];
|
|
1460
|
+
_c = {};
|
|
1461
|
+
return [4, parseBody(output.body, context)];
|
|
1462
|
+
case 1:
|
|
1463
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1464
|
+
errorCode = "UnknownError";
|
|
1465
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1466
|
+
_b = errorCode;
|
|
1467
|
+
switch (_b) {
|
|
1468
|
+
case "AccessDeniedException": return [3, 2];
|
|
1469
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1470
|
+
case "ConflictException": return [3, 4];
|
|
1471
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1472
|
+
case "InternalServerException": return [3, 6];
|
|
1473
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1474
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
1475
|
+
case "com.amazonaws.m2#ServiceQuotaExceededException": return [3, 8];
|
|
1476
|
+
case "ThrottlingException": return [3, 10];
|
|
1477
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
1478
|
+
case "ValidationException": return [3, 12];
|
|
1479
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
1480
|
+
}
|
|
1481
|
+
return [3, 14];
|
|
1482
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1483
|
+
case 3: throw _d.sent();
|
|
1484
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1485
|
+
case 5: throw _d.sent();
|
|
1486
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1487
|
+
case 7: throw _d.sent();
|
|
1488
|
+
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1489
|
+
case 9: throw _d.sent();
|
|
1490
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1491
|
+
case 11: throw _d.sent();
|
|
1492
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1493
|
+
case 13: throw _d.sent();
|
|
1494
|
+
case 14:
|
|
1495
|
+
parsedBody = parsedOutput.body;
|
|
1496
|
+
response = new __BaseException({
|
|
1497
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1498
|
+
$fault: "client",
|
|
1499
|
+
$metadata: deserializeMetadata(output),
|
|
1500
|
+
});
|
|
1501
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
}); };
|
|
1505
|
+
export var deserializeAws_restJson1DeleteApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1506
|
+
var contents;
|
|
1507
|
+
return __generator(this, function (_a) {
|
|
1508
|
+
switch (_a.label) {
|
|
1509
|
+
case 0:
|
|
1510
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1511
|
+
return [2, deserializeAws_restJson1DeleteApplicationCommandError(output, context)];
|
|
1512
|
+
}
|
|
1513
|
+
contents = {
|
|
1514
|
+
$metadata: deserializeMetadata(output),
|
|
1515
|
+
};
|
|
1516
|
+
return [4, collectBody(output.body, context)];
|
|
1517
|
+
case 1:
|
|
1518
|
+
_a.sent();
|
|
1519
|
+
return [2, Promise.resolve(contents)];
|
|
1520
|
+
}
|
|
1521
|
+
});
|
|
1522
|
+
}); };
|
|
1523
|
+
var deserializeAws_restJson1DeleteApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1524
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1525
|
+
var _c;
|
|
1526
|
+
return __generator(this, function (_d) {
|
|
1527
|
+
switch (_d.label) {
|
|
1528
|
+
case 0:
|
|
1529
|
+
_a = [__assign({}, output)];
|
|
1530
|
+
_c = {};
|
|
1531
|
+
return [4, parseBody(output.body, context)];
|
|
1532
|
+
case 1:
|
|
1533
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1534
|
+
errorCode = "UnknownError";
|
|
1535
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1536
|
+
_b = errorCode;
|
|
1537
|
+
switch (_b) {
|
|
1538
|
+
case "AccessDeniedException": return [3, 2];
|
|
1539
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1540
|
+
case "ConflictException": return [3, 4];
|
|
1541
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1542
|
+
case "InternalServerException": return [3, 6];
|
|
1543
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1544
|
+
case "ThrottlingException": return [3, 8];
|
|
1545
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
1546
|
+
case "ValidationException": return [3, 10];
|
|
1547
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
1548
|
+
}
|
|
1549
|
+
return [3, 12];
|
|
1550
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1551
|
+
case 3: throw _d.sent();
|
|
1552
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1553
|
+
case 5: throw _d.sent();
|
|
1554
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1555
|
+
case 7: throw _d.sent();
|
|
1556
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1557
|
+
case 9: throw _d.sent();
|
|
1558
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1559
|
+
case 11: throw _d.sent();
|
|
1560
|
+
case 12:
|
|
1561
|
+
parsedBody = parsedOutput.body;
|
|
1562
|
+
response = new __BaseException({
|
|
1563
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1564
|
+
$fault: "client",
|
|
1565
|
+
$metadata: deserializeMetadata(output),
|
|
1566
|
+
});
|
|
1567
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
}); };
|
|
1571
|
+
export var deserializeAws_restJson1DeleteApplicationFromEnvironmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1572
|
+
var contents;
|
|
1573
|
+
return __generator(this, function (_a) {
|
|
1574
|
+
switch (_a.label) {
|
|
1575
|
+
case 0:
|
|
1576
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1577
|
+
return [2, deserializeAws_restJson1DeleteApplicationFromEnvironmentCommandError(output, context)];
|
|
1578
|
+
}
|
|
1579
|
+
contents = {
|
|
1580
|
+
$metadata: deserializeMetadata(output),
|
|
1581
|
+
};
|
|
1582
|
+
return [4, collectBody(output.body, context)];
|
|
1583
|
+
case 1:
|
|
1584
|
+
_a.sent();
|
|
1585
|
+
return [2, Promise.resolve(contents)];
|
|
1586
|
+
}
|
|
1587
|
+
});
|
|
1588
|
+
}); };
|
|
1589
|
+
var deserializeAws_restJson1DeleteApplicationFromEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1590
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1591
|
+
var _c;
|
|
1592
|
+
return __generator(this, function (_d) {
|
|
1593
|
+
switch (_d.label) {
|
|
1594
|
+
case 0:
|
|
1595
|
+
_a = [__assign({}, output)];
|
|
1596
|
+
_c = {};
|
|
1597
|
+
return [4, parseBody(output.body, context)];
|
|
1598
|
+
case 1:
|
|
1599
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1600
|
+
errorCode = "UnknownError";
|
|
1601
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1602
|
+
_b = errorCode;
|
|
1603
|
+
switch (_b) {
|
|
1604
|
+
case "AccessDeniedException": return [3, 2];
|
|
1605
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1606
|
+
case "ConflictException": return [3, 4];
|
|
1607
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1608
|
+
case "InternalServerException": return [3, 6];
|
|
1609
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1610
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
1611
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
1612
|
+
case "ThrottlingException": return [3, 10];
|
|
1613
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
1614
|
+
case "ValidationException": return [3, 12];
|
|
1615
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
1616
|
+
}
|
|
1617
|
+
return [3, 14];
|
|
1618
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1619
|
+
case 3: throw _d.sent();
|
|
1620
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1621
|
+
case 5: throw _d.sent();
|
|
1622
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1623
|
+
case 7: throw _d.sent();
|
|
1624
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1625
|
+
case 9: throw _d.sent();
|
|
1626
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1627
|
+
case 11: throw _d.sent();
|
|
1628
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1629
|
+
case 13: throw _d.sent();
|
|
1630
|
+
case 14:
|
|
1631
|
+
parsedBody = parsedOutput.body;
|
|
1632
|
+
response = new __BaseException({
|
|
1633
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1634
|
+
$fault: "client",
|
|
1635
|
+
$metadata: deserializeMetadata(output),
|
|
1636
|
+
});
|
|
1637
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
}); };
|
|
1641
|
+
export var deserializeAws_restJson1DeleteEnvironmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1642
|
+
var contents;
|
|
1643
|
+
return __generator(this, function (_a) {
|
|
1644
|
+
switch (_a.label) {
|
|
1645
|
+
case 0:
|
|
1646
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1647
|
+
return [2, deserializeAws_restJson1DeleteEnvironmentCommandError(output, context)];
|
|
1648
|
+
}
|
|
1649
|
+
contents = {
|
|
1650
|
+
$metadata: deserializeMetadata(output),
|
|
1651
|
+
};
|
|
1652
|
+
return [4, collectBody(output.body, context)];
|
|
1653
|
+
case 1:
|
|
1654
|
+
_a.sent();
|
|
1655
|
+
return [2, Promise.resolve(contents)];
|
|
1656
|
+
}
|
|
1657
|
+
});
|
|
1658
|
+
}); };
|
|
1659
|
+
var deserializeAws_restJson1DeleteEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1660
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1661
|
+
var _c;
|
|
1662
|
+
return __generator(this, function (_d) {
|
|
1663
|
+
switch (_d.label) {
|
|
1664
|
+
case 0:
|
|
1665
|
+
_a = [__assign({}, output)];
|
|
1666
|
+
_c = {};
|
|
1667
|
+
return [4, parseBody(output.body, context)];
|
|
1668
|
+
case 1:
|
|
1669
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1670
|
+
errorCode = "UnknownError";
|
|
1671
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1672
|
+
_b = errorCode;
|
|
1673
|
+
switch (_b) {
|
|
1674
|
+
case "AccessDeniedException": return [3, 2];
|
|
1675
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1676
|
+
case "ConflictException": return [3, 4];
|
|
1677
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
1678
|
+
case "InternalServerException": return [3, 6];
|
|
1679
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
1680
|
+
case "ThrottlingException": return [3, 8];
|
|
1681
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
1682
|
+
case "ValidationException": return [3, 10];
|
|
1683
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
1684
|
+
}
|
|
1685
|
+
return [3, 12];
|
|
1686
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1687
|
+
case 3: throw _d.sent();
|
|
1688
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1689
|
+
case 5: throw _d.sent();
|
|
1690
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1691
|
+
case 7: throw _d.sent();
|
|
1692
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1693
|
+
case 9: throw _d.sent();
|
|
1694
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1695
|
+
case 11: throw _d.sent();
|
|
1696
|
+
case 12:
|
|
1697
|
+
parsedBody = parsedOutput.body;
|
|
1698
|
+
response = new __BaseException({
|
|
1699
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1700
|
+
$fault: "client",
|
|
1701
|
+
$metadata: deserializeMetadata(output),
|
|
1702
|
+
});
|
|
1703
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
}); };
|
|
1707
|
+
export var deserializeAws_restJson1GetApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1708
|
+
var contents, data, _a, _b;
|
|
1709
|
+
return __generator(this, function (_c) {
|
|
1710
|
+
switch (_c.label) {
|
|
1711
|
+
case 0:
|
|
1712
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1713
|
+
return [2, deserializeAws_restJson1GetApplicationCommandError(output, context)];
|
|
1714
|
+
}
|
|
1715
|
+
contents = {
|
|
1716
|
+
$metadata: deserializeMetadata(output),
|
|
1717
|
+
applicationArn: undefined,
|
|
1718
|
+
applicationId: undefined,
|
|
1719
|
+
creationTime: undefined,
|
|
1720
|
+
deployedVersion: undefined,
|
|
1721
|
+
description: undefined,
|
|
1722
|
+
engineType: undefined,
|
|
1723
|
+
environmentId: undefined,
|
|
1724
|
+
lastStartTime: undefined,
|
|
1725
|
+
latestVersion: undefined,
|
|
1726
|
+
listenerArns: undefined,
|
|
1727
|
+
listenerPorts: undefined,
|
|
1728
|
+
loadBalancerDnsName: undefined,
|
|
1729
|
+
logGroups: undefined,
|
|
1730
|
+
name: undefined,
|
|
1731
|
+
status: undefined,
|
|
1732
|
+
statusReason: undefined,
|
|
1733
|
+
tags: undefined,
|
|
1734
|
+
targetGroupArns: undefined,
|
|
1735
|
+
};
|
|
1736
|
+
_a = __expectNonNull;
|
|
1737
|
+
_b = __expectObject;
|
|
1738
|
+
return [4, parseBody(output.body, context)];
|
|
1739
|
+
case 1:
|
|
1740
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1741
|
+
if (data.applicationArn !== undefined && data.applicationArn !== null) {
|
|
1742
|
+
contents.applicationArn = __expectString(data.applicationArn);
|
|
1743
|
+
}
|
|
1744
|
+
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
1745
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
1746
|
+
}
|
|
1747
|
+
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
1748
|
+
contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
|
|
1749
|
+
}
|
|
1750
|
+
if (data.deployedVersion !== undefined && data.deployedVersion !== null) {
|
|
1751
|
+
contents.deployedVersion = deserializeAws_restJson1DeployedVersionSummary(data.deployedVersion, context);
|
|
1752
|
+
}
|
|
1753
|
+
if (data.description !== undefined && data.description !== null) {
|
|
1754
|
+
contents.description = __expectString(data.description);
|
|
1755
|
+
}
|
|
1756
|
+
if (data.engineType !== undefined && data.engineType !== null) {
|
|
1757
|
+
contents.engineType = __expectString(data.engineType);
|
|
1758
|
+
}
|
|
1759
|
+
if (data.environmentId !== undefined && data.environmentId !== null) {
|
|
1760
|
+
contents.environmentId = __expectString(data.environmentId);
|
|
1761
|
+
}
|
|
1762
|
+
if (data.lastStartTime !== undefined && data.lastStartTime !== null) {
|
|
1763
|
+
contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime)));
|
|
1764
|
+
}
|
|
1765
|
+
if (data.latestVersion !== undefined && data.latestVersion !== null) {
|
|
1766
|
+
contents.latestVersion = deserializeAws_restJson1ApplicationVersionSummary(data.latestVersion, context);
|
|
1767
|
+
}
|
|
1768
|
+
if (data.listenerArns !== undefined && data.listenerArns !== null) {
|
|
1769
|
+
contents.listenerArns = deserializeAws_restJson1ArnList(data.listenerArns, context);
|
|
1770
|
+
}
|
|
1771
|
+
if (data.listenerPorts !== undefined && data.listenerPorts !== null) {
|
|
1772
|
+
contents.listenerPorts = deserializeAws_restJson1PortList(data.listenerPorts, context);
|
|
1773
|
+
}
|
|
1774
|
+
if (data.loadBalancerDnsName !== undefined && data.loadBalancerDnsName !== null) {
|
|
1775
|
+
contents.loadBalancerDnsName = __expectString(data.loadBalancerDnsName);
|
|
1776
|
+
}
|
|
1777
|
+
if (data.logGroups !== undefined && data.logGroups !== null) {
|
|
1778
|
+
contents.logGroups = deserializeAws_restJson1LogGroupSummaries(data.logGroups, context);
|
|
1779
|
+
}
|
|
1780
|
+
if (data.name !== undefined && data.name !== null) {
|
|
1781
|
+
contents.name = __expectString(data.name);
|
|
1782
|
+
}
|
|
1783
|
+
if (data.status !== undefined && data.status !== null) {
|
|
1784
|
+
contents.status = __expectString(data.status);
|
|
1785
|
+
}
|
|
1786
|
+
if (data.statusReason !== undefined && data.statusReason !== null) {
|
|
1787
|
+
contents.statusReason = __expectString(data.statusReason);
|
|
1788
|
+
}
|
|
1789
|
+
if (data.tags !== undefined && data.tags !== null) {
|
|
1790
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
1791
|
+
}
|
|
1792
|
+
if (data.targetGroupArns !== undefined && data.targetGroupArns !== null) {
|
|
1793
|
+
contents.targetGroupArns = deserializeAws_restJson1ArnList(data.targetGroupArns, context);
|
|
1794
|
+
}
|
|
1795
|
+
return [2, Promise.resolve(contents)];
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1798
|
+
}); };
|
|
1799
|
+
var deserializeAws_restJson1GetApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1800
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1801
|
+
var _c;
|
|
1802
|
+
return __generator(this, function (_d) {
|
|
1803
|
+
switch (_d.label) {
|
|
1804
|
+
case 0:
|
|
1805
|
+
_a = [__assign({}, output)];
|
|
1806
|
+
_c = {};
|
|
1807
|
+
return [4, parseBody(output.body, context)];
|
|
1808
|
+
case 1:
|
|
1809
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1810
|
+
errorCode = "UnknownError";
|
|
1811
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1812
|
+
_b = errorCode;
|
|
1813
|
+
switch (_b) {
|
|
1814
|
+
case "AccessDeniedException": return [3, 2];
|
|
1815
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1816
|
+
case "InternalServerException": return [3, 4];
|
|
1817
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
1818
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1819
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
1820
|
+
case "ThrottlingException": return [3, 8];
|
|
1821
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
1822
|
+
case "ValidationException": return [3, 10];
|
|
1823
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
1824
|
+
}
|
|
1825
|
+
return [3, 12];
|
|
1826
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1827
|
+
case 3: throw _d.sent();
|
|
1828
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1829
|
+
case 5: throw _d.sent();
|
|
1830
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1831
|
+
case 7: throw _d.sent();
|
|
1832
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1833
|
+
case 9: throw _d.sent();
|
|
1834
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1835
|
+
case 11: throw _d.sent();
|
|
1836
|
+
case 12:
|
|
1837
|
+
parsedBody = parsedOutput.body;
|
|
1838
|
+
response = new __BaseException({
|
|
1839
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1840
|
+
$fault: "client",
|
|
1841
|
+
$metadata: deserializeMetadata(output),
|
|
1842
|
+
});
|
|
1843
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1844
|
+
}
|
|
1845
|
+
});
|
|
1846
|
+
}); };
|
|
1847
|
+
export var deserializeAws_restJson1GetApplicationVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1848
|
+
var contents, data, _a, _b;
|
|
1849
|
+
return __generator(this, function (_c) {
|
|
1850
|
+
switch (_c.label) {
|
|
1851
|
+
case 0:
|
|
1852
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1853
|
+
return [2, deserializeAws_restJson1GetApplicationVersionCommandError(output, context)];
|
|
1854
|
+
}
|
|
1855
|
+
contents = {
|
|
1856
|
+
$metadata: deserializeMetadata(output),
|
|
1857
|
+
applicationVersion: undefined,
|
|
1858
|
+
creationTime: undefined,
|
|
1859
|
+
definitionContent: undefined,
|
|
1860
|
+
description: undefined,
|
|
1861
|
+
name: undefined,
|
|
1862
|
+
status: undefined,
|
|
1863
|
+
statusReason: undefined,
|
|
1864
|
+
};
|
|
1865
|
+
_a = __expectNonNull;
|
|
1866
|
+
_b = __expectObject;
|
|
1867
|
+
return [4, parseBody(output.body, context)];
|
|
1868
|
+
case 1:
|
|
1869
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1870
|
+
if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
|
|
1871
|
+
contents.applicationVersion = __expectInt32(data.applicationVersion);
|
|
1872
|
+
}
|
|
1873
|
+
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
1874
|
+
contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
|
|
1875
|
+
}
|
|
1876
|
+
if (data.definitionContent !== undefined && data.definitionContent !== null) {
|
|
1877
|
+
contents.definitionContent = __expectString(data.definitionContent);
|
|
1878
|
+
}
|
|
1879
|
+
if (data.description !== undefined && data.description !== null) {
|
|
1880
|
+
contents.description = __expectString(data.description);
|
|
1881
|
+
}
|
|
1882
|
+
if (data.name !== undefined && data.name !== null) {
|
|
1883
|
+
contents.name = __expectString(data.name);
|
|
1884
|
+
}
|
|
1885
|
+
if (data.status !== undefined && data.status !== null) {
|
|
1886
|
+
contents.status = __expectString(data.status);
|
|
1887
|
+
}
|
|
1888
|
+
if (data.statusReason !== undefined && data.statusReason !== null) {
|
|
1889
|
+
contents.statusReason = __expectString(data.statusReason);
|
|
1890
|
+
}
|
|
1891
|
+
return [2, Promise.resolve(contents)];
|
|
1892
|
+
}
|
|
1893
|
+
});
|
|
1894
|
+
}); };
|
|
1895
|
+
var deserializeAws_restJson1GetApplicationVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1896
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1897
|
+
var _c;
|
|
1898
|
+
return __generator(this, function (_d) {
|
|
1899
|
+
switch (_d.label) {
|
|
1900
|
+
case 0:
|
|
1901
|
+
_a = [__assign({}, output)];
|
|
1902
|
+
_c = {};
|
|
1903
|
+
return [4, parseBody(output.body, context)];
|
|
1904
|
+
case 1:
|
|
1905
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1906
|
+
errorCode = "UnknownError";
|
|
1907
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1908
|
+
_b = errorCode;
|
|
1909
|
+
switch (_b) {
|
|
1910
|
+
case "AccessDeniedException": return [3, 2];
|
|
1911
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
1912
|
+
case "InternalServerException": return [3, 4];
|
|
1913
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
1914
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
1915
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
1916
|
+
case "ThrottlingException": return [3, 8];
|
|
1917
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
1918
|
+
case "ValidationException": return [3, 10];
|
|
1919
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
1920
|
+
}
|
|
1921
|
+
return [3, 12];
|
|
1922
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1923
|
+
case 3: throw _d.sent();
|
|
1924
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1925
|
+
case 5: throw _d.sent();
|
|
1926
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1927
|
+
case 7: throw _d.sent();
|
|
1928
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1929
|
+
case 9: throw _d.sent();
|
|
1930
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1931
|
+
case 11: throw _d.sent();
|
|
1932
|
+
case 12:
|
|
1933
|
+
parsedBody = parsedOutput.body;
|
|
1934
|
+
response = new __BaseException({
|
|
1935
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1936
|
+
$fault: "client",
|
|
1937
|
+
$metadata: deserializeMetadata(output),
|
|
1938
|
+
});
|
|
1939
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1940
|
+
}
|
|
1941
|
+
});
|
|
1942
|
+
}); };
|
|
1943
|
+
export var deserializeAws_restJson1GetBatchJobExecutionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1944
|
+
var contents, data, _a, _b;
|
|
1945
|
+
return __generator(this, function (_c) {
|
|
1946
|
+
switch (_c.label) {
|
|
1947
|
+
case 0:
|
|
1948
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1949
|
+
return [2, deserializeAws_restJson1GetBatchJobExecutionCommandError(output, context)];
|
|
1950
|
+
}
|
|
1951
|
+
contents = {
|
|
1952
|
+
$metadata: deserializeMetadata(output),
|
|
1953
|
+
applicationId: undefined,
|
|
1954
|
+
endTime: undefined,
|
|
1955
|
+
executionId: undefined,
|
|
1956
|
+
jobId: undefined,
|
|
1957
|
+
jobName: undefined,
|
|
1958
|
+
jobType: undefined,
|
|
1959
|
+
jobUser: undefined,
|
|
1960
|
+
startTime: undefined,
|
|
1961
|
+
status: undefined,
|
|
1962
|
+
statusReason: undefined,
|
|
1963
|
+
};
|
|
1964
|
+
_a = __expectNonNull;
|
|
1965
|
+
_b = __expectObject;
|
|
1966
|
+
return [4, parseBody(output.body, context)];
|
|
1967
|
+
case 1:
|
|
1968
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1969
|
+
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
1970
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
1971
|
+
}
|
|
1972
|
+
if (data.endTime !== undefined && data.endTime !== null) {
|
|
1973
|
+
contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
|
|
1974
|
+
}
|
|
1975
|
+
if (data.executionId !== undefined && data.executionId !== null) {
|
|
1976
|
+
contents.executionId = __expectString(data.executionId);
|
|
1977
|
+
}
|
|
1978
|
+
if (data.jobId !== undefined && data.jobId !== null) {
|
|
1979
|
+
contents.jobId = __expectString(data.jobId);
|
|
1980
|
+
}
|
|
1981
|
+
if (data.jobName !== undefined && data.jobName !== null) {
|
|
1982
|
+
contents.jobName = __expectString(data.jobName);
|
|
1983
|
+
}
|
|
1984
|
+
if (data.jobType !== undefined && data.jobType !== null) {
|
|
1985
|
+
contents.jobType = __expectString(data.jobType);
|
|
1986
|
+
}
|
|
1987
|
+
if (data.jobUser !== undefined && data.jobUser !== null) {
|
|
1988
|
+
contents.jobUser = __expectString(data.jobUser);
|
|
1989
|
+
}
|
|
1990
|
+
if (data.startTime !== undefined && data.startTime !== null) {
|
|
1991
|
+
contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
|
|
1992
|
+
}
|
|
1993
|
+
if (data.status !== undefined && data.status !== null) {
|
|
1994
|
+
contents.status = __expectString(data.status);
|
|
1995
|
+
}
|
|
1996
|
+
if (data.statusReason !== undefined && data.statusReason !== null) {
|
|
1997
|
+
contents.statusReason = __expectString(data.statusReason);
|
|
1998
|
+
}
|
|
1999
|
+
return [2, Promise.resolve(contents)];
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
}); };
|
|
2003
|
+
var deserializeAws_restJson1GetBatchJobExecutionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2004
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2005
|
+
var _c;
|
|
2006
|
+
return __generator(this, function (_d) {
|
|
2007
|
+
switch (_d.label) {
|
|
2008
|
+
case 0:
|
|
2009
|
+
_a = [__assign({}, output)];
|
|
2010
|
+
_c = {};
|
|
2011
|
+
return [4, parseBody(output.body, context)];
|
|
2012
|
+
case 1:
|
|
2013
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2014
|
+
errorCode = "UnknownError";
|
|
2015
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2016
|
+
_b = errorCode;
|
|
2017
|
+
switch (_b) {
|
|
2018
|
+
case "AccessDeniedException": return [3, 2];
|
|
2019
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2020
|
+
case "InternalServerException": return [3, 4];
|
|
2021
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2022
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2023
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2024
|
+
case "ThrottlingException": return [3, 8];
|
|
2025
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2026
|
+
case "ValidationException": return [3, 10];
|
|
2027
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2028
|
+
}
|
|
2029
|
+
return [3, 12];
|
|
2030
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2031
|
+
case 3: throw _d.sent();
|
|
2032
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2033
|
+
case 5: throw _d.sent();
|
|
2034
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2035
|
+
case 7: throw _d.sent();
|
|
2036
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2037
|
+
case 9: throw _d.sent();
|
|
2038
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2039
|
+
case 11: throw _d.sent();
|
|
2040
|
+
case 12:
|
|
2041
|
+
parsedBody = parsedOutput.body;
|
|
2042
|
+
response = new __BaseException({
|
|
2043
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2044
|
+
$fault: "client",
|
|
2045
|
+
$metadata: deserializeMetadata(output),
|
|
2046
|
+
});
|
|
2047
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
}); };
|
|
2051
|
+
export var deserializeAws_restJson1GetDataSetDetailsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2052
|
+
var contents, data, _a, _b;
|
|
2053
|
+
return __generator(this, function (_c) {
|
|
2054
|
+
switch (_c.label) {
|
|
2055
|
+
case 0:
|
|
2056
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2057
|
+
return [2, deserializeAws_restJson1GetDataSetDetailsCommandError(output, context)];
|
|
2058
|
+
}
|
|
2059
|
+
contents = {
|
|
2060
|
+
$metadata: deserializeMetadata(output),
|
|
2061
|
+
blocksize: undefined,
|
|
2062
|
+
creationTime: undefined,
|
|
2063
|
+
dataSetName: undefined,
|
|
2064
|
+
dataSetOrg: undefined,
|
|
2065
|
+
lastReferencedTime: undefined,
|
|
2066
|
+
lastUpdatedTime: undefined,
|
|
2067
|
+
location: undefined,
|
|
2068
|
+
recordLength: undefined,
|
|
2069
|
+
};
|
|
2070
|
+
_a = __expectNonNull;
|
|
2071
|
+
_b = __expectObject;
|
|
2072
|
+
return [4, parseBody(output.body, context)];
|
|
2073
|
+
case 1:
|
|
2074
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2075
|
+
if (data.blocksize !== undefined && data.blocksize !== null) {
|
|
2076
|
+
contents.blocksize = __expectInt32(data.blocksize);
|
|
2077
|
+
}
|
|
2078
|
+
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
2079
|
+
contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
|
|
2080
|
+
}
|
|
2081
|
+
if (data.dataSetName !== undefined && data.dataSetName !== null) {
|
|
2082
|
+
contents.dataSetName = __expectString(data.dataSetName);
|
|
2083
|
+
}
|
|
2084
|
+
if (data.dataSetOrg !== undefined && data.dataSetOrg !== null) {
|
|
2085
|
+
contents.dataSetOrg = deserializeAws_restJson1DatasetDetailOrgAttributes(__expectUnion(data.dataSetOrg), context);
|
|
2086
|
+
}
|
|
2087
|
+
if (data.lastReferencedTime !== undefined && data.lastReferencedTime !== null) {
|
|
2088
|
+
contents.lastReferencedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastReferencedTime)));
|
|
2089
|
+
}
|
|
2090
|
+
if (data.lastUpdatedTime !== undefined && data.lastUpdatedTime !== null) {
|
|
2091
|
+
contents.lastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedTime)));
|
|
2092
|
+
}
|
|
2093
|
+
if (data.location !== undefined && data.location !== null) {
|
|
2094
|
+
contents.location = __expectString(data.location);
|
|
2095
|
+
}
|
|
2096
|
+
if (data.recordLength !== undefined && data.recordLength !== null) {
|
|
2097
|
+
contents.recordLength = __expectInt32(data.recordLength);
|
|
2098
|
+
}
|
|
2099
|
+
return [2, Promise.resolve(contents)];
|
|
2100
|
+
}
|
|
2101
|
+
});
|
|
2102
|
+
}); };
|
|
2103
|
+
var deserializeAws_restJson1GetDataSetDetailsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2104
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2105
|
+
var _c;
|
|
2106
|
+
return __generator(this, function (_d) {
|
|
2107
|
+
switch (_d.label) {
|
|
2108
|
+
case 0:
|
|
2109
|
+
_a = [__assign({}, output)];
|
|
2110
|
+
_c = {};
|
|
2111
|
+
return [4, parseBody(output.body, context)];
|
|
2112
|
+
case 1:
|
|
2113
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2114
|
+
errorCode = "UnknownError";
|
|
2115
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2116
|
+
_b = errorCode;
|
|
2117
|
+
switch (_b) {
|
|
2118
|
+
case "AccessDeniedException": return [3, 2];
|
|
2119
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2120
|
+
case "InternalServerException": return [3, 4];
|
|
2121
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2122
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2123
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2124
|
+
case "ThrottlingException": return [3, 8];
|
|
2125
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2126
|
+
case "ValidationException": return [3, 10];
|
|
2127
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2128
|
+
}
|
|
2129
|
+
return [3, 12];
|
|
2130
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2131
|
+
case 3: throw _d.sent();
|
|
2132
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2133
|
+
case 5: throw _d.sent();
|
|
2134
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2135
|
+
case 7: throw _d.sent();
|
|
2136
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2137
|
+
case 9: throw _d.sent();
|
|
2138
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2139
|
+
case 11: throw _d.sent();
|
|
2140
|
+
case 12:
|
|
2141
|
+
parsedBody = parsedOutput.body;
|
|
2142
|
+
response = new __BaseException({
|
|
2143
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2144
|
+
$fault: "client",
|
|
2145
|
+
$metadata: deserializeMetadata(output),
|
|
2146
|
+
});
|
|
2147
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
}); };
|
|
2151
|
+
export var deserializeAws_restJson1GetDataSetImportTaskCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2152
|
+
var contents, data, _a, _b;
|
|
2153
|
+
return __generator(this, function (_c) {
|
|
2154
|
+
switch (_c.label) {
|
|
2155
|
+
case 0:
|
|
2156
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2157
|
+
return [2, deserializeAws_restJson1GetDataSetImportTaskCommandError(output, context)];
|
|
2158
|
+
}
|
|
2159
|
+
contents = {
|
|
2160
|
+
$metadata: deserializeMetadata(output),
|
|
2161
|
+
status: undefined,
|
|
2162
|
+
summary: undefined,
|
|
2163
|
+
taskId: undefined,
|
|
2164
|
+
};
|
|
2165
|
+
_a = __expectNonNull;
|
|
2166
|
+
_b = __expectObject;
|
|
2167
|
+
return [4, parseBody(output.body, context)];
|
|
2168
|
+
case 1:
|
|
2169
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2170
|
+
if (data.status !== undefined && data.status !== null) {
|
|
2171
|
+
contents.status = __expectString(data.status);
|
|
2172
|
+
}
|
|
2173
|
+
if (data.summary !== undefined && data.summary !== null) {
|
|
2174
|
+
contents.summary = deserializeAws_restJson1DataSetImportSummary(data.summary, context);
|
|
2175
|
+
}
|
|
2176
|
+
if (data.taskId !== undefined && data.taskId !== null) {
|
|
2177
|
+
contents.taskId = __expectString(data.taskId);
|
|
2178
|
+
}
|
|
2179
|
+
return [2, Promise.resolve(contents)];
|
|
2180
|
+
}
|
|
2181
|
+
});
|
|
2182
|
+
}); };
|
|
2183
|
+
var deserializeAws_restJson1GetDataSetImportTaskCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2184
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2185
|
+
var _c;
|
|
2186
|
+
return __generator(this, function (_d) {
|
|
2187
|
+
switch (_d.label) {
|
|
2188
|
+
case 0:
|
|
2189
|
+
_a = [__assign({}, output)];
|
|
2190
|
+
_c = {};
|
|
2191
|
+
return [4, parseBody(output.body, context)];
|
|
2192
|
+
case 1:
|
|
2193
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2194
|
+
errorCode = "UnknownError";
|
|
2195
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2196
|
+
_b = errorCode;
|
|
2197
|
+
switch (_b) {
|
|
2198
|
+
case "AccessDeniedException": return [3, 2];
|
|
2199
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2200
|
+
case "InternalServerException": return [3, 4];
|
|
2201
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2202
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2203
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2204
|
+
case "ThrottlingException": return [3, 8];
|
|
2205
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2206
|
+
case "ValidationException": return [3, 10];
|
|
2207
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2208
|
+
}
|
|
2209
|
+
return [3, 12];
|
|
2210
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2211
|
+
case 3: throw _d.sent();
|
|
2212
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2213
|
+
case 5: throw _d.sent();
|
|
2214
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2215
|
+
case 7: throw _d.sent();
|
|
2216
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2217
|
+
case 9: throw _d.sent();
|
|
2218
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2219
|
+
case 11: throw _d.sent();
|
|
2220
|
+
case 12:
|
|
2221
|
+
parsedBody = parsedOutput.body;
|
|
2222
|
+
response = new __BaseException({
|
|
2223
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2224
|
+
$fault: "client",
|
|
2225
|
+
$metadata: deserializeMetadata(output),
|
|
2226
|
+
});
|
|
2227
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2228
|
+
}
|
|
2229
|
+
});
|
|
2230
|
+
}); };
|
|
2231
|
+
export var deserializeAws_restJson1GetDeploymentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2232
|
+
var contents, data, _a, _b;
|
|
2233
|
+
return __generator(this, function (_c) {
|
|
2234
|
+
switch (_c.label) {
|
|
2235
|
+
case 0:
|
|
2236
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2237
|
+
return [2, deserializeAws_restJson1GetDeploymentCommandError(output, context)];
|
|
2238
|
+
}
|
|
2239
|
+
contents = {
|
|
2240
|
+
$metadata: deserializeMetadata(output),
|
|
2241
|
+
applicationId: undefined,
|
|
2242
|
+
applicationVersion: undefined,
|
|
2243
|
+
creationTime: undefined,
|
|
2244
|
+
deploymentId: undefined,
|
|
2245
|
+
environmentId: undefined,
|
|
2246
|
+
status: undefined,
|
|
2247
|
+
statusReason: undefined,
|
|
2248
|
+
};
|
|
2249
|
+
_a = __expectNonNull;
|
|
2250
|
+
_b = __expectObject;
|
|
2251
|
+
return [4, parseBody(output.body, context)];
|
|
2252
|
+
case 1:
|
|
2253
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2254
|
+
if (data.applicationId !== undefined && data.applicationId !== null) {
|
|
2255
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
2256
|
+
}
|
|
2257
|
+
if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
|
|
2258
|
+
contents.applicationVersion = __expectInt32(data.applicationVersion);
|
|
2259
|
+
}
|
|
2260
|
+
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
2261
|
+
contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
|
|
2262
|
+
}
|
|
2263
|
+
if (data.deploymentId !== undefined && data.deploymentId !== null) {
|
|
2264
|
+
contents.deploymentId = __expectString(data.deploymentId);
|
|
2265
|
+
}
|
|
2266
|
+
if (data.environmentId !== undefined && data.environmentId !== null) {
|
|
2267
|
+
contents.environmentId = __expectString(data.environmentId);
|
|
2268
|
+
}
|
|
2269
|
+
if (data.status !== undefined && data.status !== null) {
|
|
2270
|
+
contents.status = __expectString(data.status);
|
|
2271
|
+
}
|
|
2272
|
+
if (data.statusReason !== undefined && data.statusReason !== null) {
|
|
2273
|
+
contents.statusReason = __expectString(data.statusReason);
|
|
2274
|
+
}
|
|
2275
|
+
return [2, Promise.resolve(contents)];
|
|
2276
|
+
}
|
|
2277
|
+
});
|
|
2278
|
+
}); };
|
|
2279
|
+
var deserializeAws_restJson1GetDeploymentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2280
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2281
|
+
var _c;
|
|
2282
|
+
return __generator(this, function (_d) {
|
|
2283
|
+
switch (_d.label) {
|
|
2284
|
+
case 0:
|
|
2285
|
+
_a = [__assign({}, output)];
|
|
2286
|
+
_c = {};
|
|
2287
|
+
return [4, parseBody(output.body, context)];
|
|
2288
|
+
case 1:
|
|
2289
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2290
|
+
errorCode = "UnknownError";
|
|
2291
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2292
|
+
_b = errorCode;
|
|
2293
|
+
switch (_b) {
|
|
2294
|
+
case "AccessDeniedException": return [3, 2];
|
|
2295
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2296
|
+
case "InternalServerException": return [3, 4];
|
|
2297
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2298
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2299
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2300
|
+
case "ThrottlingException": return [3, 8];
|
|
2301
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2302
|
+
case "ValidationException": return [3, 10];
|
|
2303
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2304
|
+
}
|
|
2305
|
+
return [3, 12];
|
|
2306
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2307
|
+
case 3: throw _d.sent();
|
|
2308
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2309
|
+
case 5: throw _d.sent();
|
|
2310
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2311
|
+
case 7: throw _d.sent();
|
|
2312
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2313
|
+
case 9: throw _d.sent();
|
|
2314
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2315
|
+
case 11: throw _d.sent();
|
|
2316
|
+
case 12:
|
|
2317
|
+
parsedBody = parsedOutput.body;
|
|
2318
|
+
response = new __BaseException({
|
|
2319
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2320
|
+
$fault: "client",
|
|
2321
|
+
$metadata: deserializeMetadata(output),
|
|
2322
|
+
});
|
|
2323
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2324
|
+
}
|
|
2325
|
+
});
|
|
2326
|
+
}); };
|
|
2327
|
+
export var deserializeAws_restJson1GetEnvironmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2328
|
+
var contents, data, _a, _b;
|
|
2329
|
+
return __generator(this, function (_c) {
|
|
2330
|
+
switch (_c.label) {
|
|
2331
|
+
case 0:
|
|
2332
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2333
|
+
return [2, deserializeAws_restJson1GetEnvironmentCommandError(output, context)];
|
|
2334
|
+
}
|
|
2335
|
+
contents = {
|
|
2336
|
+
$metadata: deserializeMetadata(output),
|
|
2337
|
+
actualCapacity: undefined,
|
|
2338
|
+
creationTime: undefined,
|
|
2339
|
+
description: undefined,
|
|
2340
|
+
engineType: undefined,
|
|
2341
|
+
engineVersion: undefined,
|
|
2342
|
+
environmentArn: undefined,
|
|
2343
|
+
environmentId: undefined,
|
|
2344
|
+
highAvailabilityConfig: undefined,
|
|
2345
|
+
instanceType: undefined,
|
|
2346
|
+
loadBalancerArn: undefined,
|
|
2347
|
+
name: undefined,
|
|
2348
|
+
pendingMaintenance: undefined,
|
|
2349
|
+
preferredMaintenanceWindow: undefined,
|
|
2350
|
+
publiclyAccessible: undefined,
|
|
2351
|
+
securityGroupIds: undefined,
|
|
2352
|
+
status: undefined,
|
|
2353
|
+
statusReason: undefined,
|
|
2354
|
+
storageConfigurations: undefined,
|
|
2355
|
+
subnetIds: undefined,
|
|
2356
|
+
tags: undefined,
|
|
2357
|
+
vpcId: undefined,
|
|
2358
|
+
};
|
|
2359
|
+
_a = __expectNonNull;
|
|
2360
|
+
_b = __expectObject;
|
|
2361
|
+
return [4, parseBody(output.body, context)];
|
|
2362
|
+
case 1:
|
|
2363
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2364
|
+
if (data.actualCapacity !== undefined && data.actualCapacity !== null) {
|
|
2365
|
+
contents.actualCapacity = __expectInt32(data.actualCapacity);
|
|
2366
|
+
}
|
|
2367
|
+
if (data.creationTime !== undefined && data.creationTime !== null) {
|
|
2368
|
+
contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime)));
|
|
2369
|
+
}
|
|
2370
|
+
if (data.description !== undefined && data.description !== null) {
|
|
2371
|
+
contents.description = __expectString(data.description);
|
|
2372
|
+
}
|
|
2373
|
+
if (data.engineType !== undefined && data.engineType !== null) {
|
|
2374
|
+
contents.engineType = __expectString(data.engineType);
|
|
2375
|
+
}
|
|
2376
|
+
if (data.engineVersion !== undefined && data.engineVersion !== null) {
|
|
2377
|
+
contents.engineVersion = __expectString(data.engineVersion);
|
|
2378
|
+
}
|
|
2379
|
+
if (data.environmentArn !== undefined && data.environmentArn !== null) {
|
|
2380
|
+
contents.environmentArn = __expectString(data.environmentArn);
|
|
2381
|
+
}
|
|
2382
|
+
if (data.environmentId !== undefined && data.environmentId !== null) {
|
|
2383
|
+
contents.environmentId = __expectString(data.environmentId);
|
|
2384
|
+
}
|
|
2385
|
+
if (data.highAvailabilityConfig !== undefined && data.highAvailabilityConfig !== null) {
|
|
2386
|
+
contents.highAvailabilityConfig = deserializeAws_restJson1HighAvailabilityConfig(data.highAvailabilityConfig, context);
|
|
2387
|
+
}
|
|
2388
|
+
if (data.instanceType !== undefined && data.instanceType !== null) {
|
|
2389
|
+
contents.instanceType = __expectString(data.instanceType);
|
|
2390
|
+
}
|
|
2391
|
+
if (data.loadBalancerArn !== undefined && data.loadBalancerArn !== null) {
|
|
2392
|
+
contents.loadBalancerArn = __expectString(data.loadBalancerArn);
|
|
2393
|
+
}
|
|
2394
|
+
if (data.name !== undefined && data.name !== null) {
|
|
2395
|
+
contents.name = __expectString(data.name);
|
|
2396
|
+
}
|
|
2397
|
+
if (data.pendingMaintenance !== undefined && data.pendingMaintenance !== null) {
|
|
2398
|
+
contents.pendingMaintenance = deserializeAws_restJson1PendingMaintenance(data.pendingMaintenance, context);
|
|
2399
|
+
}
|
|
2400
|
+
if (data.preferredMaintenanceWindow !== undefined && data.preferredMaintenanceWindow !== null) {
|
|
2401
|
+
contents.preferredMaintenanceWindow = __expectString(data.preferredMaintenanceWindow);
|
|
2402
|
+
}
|
|
2403
|
+
if (data.publiclyAccessible !== undefined && data.publiclyAccessible !== null) {
|
|
2404
|
+
contents.publiclyAccessible = __expectBoolean(data.publiclyAccessible);
|
|
2405
|
+
}
|
|
2406
|
+
if (data.securityGroupIds !== undefined && data.securityGroupIds !== null) {
|
|
2407
|
+
contents.securityGroupIds = deserializeAws_restJson1String50List(data.securityGroupIds, context);
|
|
2408
|
+
}
|
|
2409
|
+
if (data.status !== undefined && data.status !== null) {
|
|
2410
|
+
contents.status = __expectString(data.status);
|
|
2411
|
+
}
|
|
2412
|
+
if (data.statusReason !== undefined && data.statusReason !== null) {
|
|
2413
|
+
contents.statusReason = __expectString(data.statusReason);
|
|
2414
|
+
}
|
|
2415
|
+
if (data.storageConfigurations !== undefined && data.storageConfigurations !== null) {
|
|
2416
|
+
contents.storageConfigurations = deserializeAws_restJson1StorageConfigurationList(data.storageConfigurations, context);
|
|
2417
|
+
}
|
|
2418
|
+
if (data.subnetIds !== undefined && data.subnetIds !== null) {
|
|
2419
|
+
contents.subnetIds = deserializeAws_restJson1String50List(data.subnetIds, context);
|
|
2420
|
+
}
|
|
2421
|
+
if (data.tags !== undefined && data.tags !== null) {
|
|
2422
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
2423
|
+
}
|
|
2424
|
+
if (data.vpcId !== undefined && data.vpcId !== null) {
|
|
2425
|
+
contents.vpcId = __expectString(data.vpcId);
|
|
2426
|
+
}
|
|
2427
|
+
return [2, Promise.resolve(contents)];
|
|
2428
|
+
}
|
|
2429
|
+
});
|
|
2430
|
+
}); };
|
|
2431
|
+
var deserializeAws_restJson1GetEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2432
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2433
|
+
var _c;
|
|
2434
|
+
return __generator(this, function (_d) {
|
|
2435
|
+
switch (_d.label) {
|
|
2436
|
+
case 0:
|
|
2437
|
+
_a = [__assign({}, output)];
|
|
2438
|
+
_c = {};
|
|
2439
|
+
return [4, parseBody(output.body, context)];
|
|
2440
|
+
case 1:
|
|
2441
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2442
|
+
errorCode = "UnknownError";
|
|
2443
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2444
|
+
_b = errorCode;
|
|
2445
|
+
switch (_b) {
|
|
2446
|
+
case "AccessDeniedException": return [3, 2];
|
|
2447
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2448
|
+
case "InternalServerException": return [3, 4];
|
|
2449
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2450
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2451
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2452
|
+
case "ThrottlingException": return [3, 8];
|
|
2453
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2454
|
+
case "ValidationException": return [3, 10];
|
|
2455
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2456
|
+
}
|
|
2457
|
+
return [3, 12];
|
|
2458
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2459
|
+
case 3: throw _d.sent();
|
|
2460
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2461
|
+
case 5: throw _d.sent();
|
|
2462
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2463
|
+
case 7: throw _d.sent();
|
|
2464
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2465
|
+
case 9: throw _d.sent();
|
|
2466
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2467
|
+
case 11: throw _d.sent();
|
|
2468
|
+
case 12:
|
|
2469
|
+
parsedBody = parsedOutput.body;
|
|
2470
|
+
response = new __BaseException({
|
|
2471
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2472
|
+
$fault: "client",
|
|
2473
|
+
$metadata: deserializeMetadata(output),
|
|
2474
|
+
});
|
|
2475
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2476
|
+
}
|
|
2477
|
+
});
|
|
2478
|
+
}); };
|
|
2479
|
+
export var deserializeAws_restJson1ListApplicationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2480
|
+
var contents, data, _a, _b;
|
|
2481
|
+
return __generator(this, function (_c) {
|
|
2482
|
+
switch (_c.label) {
|
|
2483
|
+
case 0:
|
|
2484
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2485
|
+
return [2, deserializeAws_restJson1ListApplicationsCommandError(output, context)];
|
|
2486
|
+
}
|
|
2487
|
+
contents = {
|
|
2488
|
+
$metadata: deserializeMetadata(output),
|
|
2489
|
+
applications: undefined,
|
|
2490
|
+
nextToken: undefined,
|
|
2491
|
+
};
|
|
2492
|
+
_a = __expectNonNull;
|
|
2493
|
+
_b = __expectObject;
|
|
2494
|
+
return [4, parseBody(output.body, context)];
|
|
2495
|
+
case 1:
|
|
2496
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2497
|
+
if (data.applications !== undefined && data.applications !== null) {
|
|
2498
|
+
contents.applications = deserializeAws_restJson1ApplicationSummaryList(data.applications, context);
|
|
2499
|
+
}
|
|
2500
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2501
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2502
|
+
}
|
|
2503
|
+
return [2, Promise.resolve(contents)];
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
}); };
|
|
2507
|
+
var deserializeAws_restJson1ListApplicationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2508
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2509
|
+
var _c;
|
|
2510
|
+
return __generator(this, function (_d) {
|
|
2511
|
+
switch (_d.label) {
|
|
2512
|
+
case 0:
|
|
2513
|
+
_a = [__assign({}, output)];
|
|
2514
|
+
_c = {};
|
|
2515
|
+
return [4, parseBody(output.body, context)];
|
|
2516
|
+
case 1:
|
|
2517
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2518
|
+
errorCode = "UnknownError";
|
|
2519
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2520
|
+
_b = errorCode;
|
|
2521
|
+
switch (_b) {
|
|
2522
|
+
case "AccessDeniedException": return [3, 2];
|
|
2523
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2524
|
+
case "InternalServerException": return [3, 4];
|
|
2525
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2526
|
+
case "ThrottlingException": return [3, 6];
|
|
2527
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 6];
|
|
2528
|
+
case "ValidationException": return [3, 8];
|
|
2529
|
+
case "com.amazonaws.m2#ValidationException": return [3, 8];
|
|
2530
|
+
}
|
|
2531
|
+
return [3, 10];
|
|
2532
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2533
|
+
case 3: throw _d.sent();
|
|
2534
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2535
|
+
case 5: throw _d.sent();
|
|
2536
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2537
|
+
case 7: throw _d.sent();
|
|
2538
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2539
|
+
case 9: throw _d.sent();
|
|
2540
|
+
case 10:
|
|
2541
|
+
parsedBody = parsedOutput.body;
|
|
2542
|
+
response = new __BaseException({
|
|
2543
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2544
|
+
$fault: "client",
|
|
2545
|
+
$metadata: deserializeMetadata(output),
|
|
2546
|
+
});
|
|
2547
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
}); };
|
|
2551
|
+
export var deserializeAws_restJson1ListApplicationVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2552
|
+
var contents, data, _a, _b;
|
|
2553
|
+
return __generator(this, function (_c) {
|
|
2554
|
+
switch (_c.label) {
|
|
2555
|
+
case 0:
|
|
2556
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2557
|
+
return [2, deserializeAws_restJson1ListApplicationVersionsCommandError(output, context)];
|
|
2558
|
+
}
|
|
2559
|
+
contents = {
|
|
2560
|
+
$metadata: deserializeMetadata(output),
|
|
2561
|
+
applicationVersions: undefined,
|
|
2562
|
+
nextToken: undefined,
|
|
2563
|
+
};
|
|
2564
|
+
_a = __expectNonNull;
|
|
2565
|
+
_b = __expectObject;
|
|
2566
|
+
return [4, parseBody(output.body, context)];
|
|
2567
|
+
case 1:
|
|
2568
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2569
|
+
if (data.applicationVersions !== undefined && data.applicationVersions !== null) {
|
|
2570
|
+
contents.applicationVersions = deserializeAws_restJson1ApplicationVersionSummaryList(data.applicationVersions, context);
|
|
2571
|
+
}
|
|
2572
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2573
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2574
|
+
}
|
|
2575
|
+
return [2, Promise.resolve(contents)];
|
|
2576
|
+
}
|
|
2577
|
+
});
|
|
2578
|
+
}); };
|
|
2579
|
+
var deserializeAws_restJson1ListApplicationVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2580
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2581
|
+
var _c;
|
|
2582
|
+
return __generator(this, function (_d) {
|
|
2583
|
+
switch (_d.label) {
|
|
2584
|
+
case 0:
|
|
2585
|
+
_a = [__assign({}, output)];
|
|
2586
|
+
_c = {};
|
|
2587
|
+
return [4, parseBody(output.body, context)];
|
|
2588
|
+
case 1:
|
|
2589
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2590
|
+
errorCode = "UnknownError";
|
|
2591
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2592
|
+
_b = errorCode;
|
|
2593
|
+
switch (_b) {
|
|
2594
|
+
case "AccessDeniedException": return [3, 2];
|
|
2595
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2596
|
+
case "InternalServerException": return [3, 4];
|
|
2597
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2598
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2599
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2600
|
+
case "ThrottlingException": return [3, 8];
|
|
2601
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2602
|
+
case "ValidationException": return [3, 10];
|
|
2603
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2604
|
+
}
|
|
2605
|
+
return [3, 12];
|
|
2606
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2607
|
+
case 3: throw _d.sent();
|
|
2608
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2609
|
+
case 5: throw _d.sent();
|
|
2610
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2611
|
+
case 7: throw _d.sent();
|
|
2612
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2613
|
+
case 9: throw _d.sent();
|
|
2614
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2615
|
+
case 11: throw _d.sent();
|
|
2616
|
+
case 12:
|
|
2617
|
+
parsedBody = parsedOutput.body;
|
|
2618
|
+
response = new __BaseException({
|
|
2619
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2620
|
+
$fault: "client",
|
|
2621
|
+
$metadata: deserializeMetadata(output),
|
|
2622
|
+
});
|
|
2623
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2624
|
+
}
|
|
2625
|
+
});
|
|
2626
|
+
}); };
|
|
2627
|
+
export var deserializeAws_restJson1ListBatchJobDefinitionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2628
|
+
var contents, data, _a, _b;
|
|
2629
|
+
return __generator(this, function (_c) {
|
|
2630
|
+
switch (_c.label) {
|
|
2631
|
+
case 0:
|
|
2632
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2633
|
+
return [2, deserializeAws_restJson1ListBatchJobDefinitionsCommandError(output, context)];
|
|
2634
|
+
}
|
|
2635
|
+
contents = {
|
|
2636
|
+
$metadata: deserializeMetadata(output),
|
|
2637
|
+
batchJobDefinitions: undefined,
|
|
2638
|
+
nextToken: undefined,
|
|
2639
|
+
};
|
|
2640
|
+
_a = __expectNonNull;
|
|
2641
|
+
_b = __expectObject;
|
|
2642
|
+
return [4, parseBody(output.body, context)];
|
|
2643
|
+
case 1:
|
|
2644
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2645
|
+
if (data.batchJobDefinitions !== undefined && data.batchJobDefinitions !== null) {
|
|
2646
|
+
contents.batchJobDefinitions = deserializeAws_restJson1BatchJobDefinitions(data.batchJobDefinitions, context);
|
|
2647
|
+
}
|
|
2648
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2649
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2650
|
+
}
|
|
2651
|
+
return [2, Promise.resolve(contents)];
|
|
2652
|
+
}
|
|
2653
|
+
});
|
|
2654
|
+
}); };
|
|
2655
|
+
var deserializeAws_restJson1ListBatchJobDefinitionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2656
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2657
|
+
var _c;
|
|
2658
|
+
return __generator(this, function (_d) {
|
|
2659
|
+
switch (_d.label) {
|
|
2660
|
+
case 0:
|
|
2661
|
+
_a = [__assign({}, output)];
|
|
2662
|
+
_c = {};
|
|
2663
|
+
return [4, parseBody(output.body, context)];
|
|
2664
|
+
case 1:
|
|
2665
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2666
|
+
errorCode = "UnknownError";
|
|
2667
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2668
|
+
_b = errorCode;
|
|
2669
|
+
switch (_b) {
|
|
2670
|
+
case "AccessDeniedException": return [3, 2];
|
|
2671
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2672
|
+
case "InternalServerException": return [3, 4];
|
|
2673
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2674
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2675
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2676
|
+
case "ThrottlingException": return [3, 8];
|
|
2677
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2678
|
+
case "ValidationException": return [3, 10];
|
|
2679
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2680
|
+
}
|
|
2681
|
+
return [3, 12];
|
|
2682
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2683
|
+
case 3: throw _d.sent();
|
|
2684
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2685
|
+
case 5: throw _d.sent();
|
|
2686
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2687
|
+
case 7: throw _d.sent();
|
|
2688
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2689
|
+
case 9: throw _d.sent();
|
|
2690
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2691
|
+
case 11: throw _d.sent();
|
|
2692
|
+
case 12:
|
|
2693
|
+
parsedBody = parsedOutput.body;
|
|
2694
|
+
response = new __BaseException({
|
|
2695
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2696
|
+
$fault: "client",
|
|
2697
|
+
$metadata: deserializeMetadata(output),
|
|
2698
|
+
});
|
|
2699
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2700
|
+
}
|
|
2701
|
+
});
|
|
2702
|
+
}); };
|
|
2703
|
+
export var deserializeAws_restJson1ListBatchJobExecutionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2704
|
+
var contents, data, _a, _b;
|
|
2705
|
+
return __generator(this, function (_c) {
|
|
2706
|
+
switch (_c.label) {
|
|
2707
|
+
case 0:
|
|
2708
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2709
|
+
return [2, deserializeAws_restJson1ListBatchJobExecutionsCommandError(output, context)];
|
|
2710
|
+
}
|
|
2711
|
+
contents = {
|
|
2712
|
+
$metadata: deserializeMetadata(output),
|
|
2713
|
+
batchJobExecutions: undefined,
|
|
2714
|
+
nextToken: undefined,
|
|
2715
|
+
};
|
|
2716
|
+
_a = __expectNonNull;
|
|
2717
|
+
_b = __expectObject;
|
|
2718
|
+
return [4, parseBody(output.body, context)];
|
|
2719
|
+
case 1:
|
|
2720
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2721
|
+
if (data.batchJobExecutions !== undefined && data.batchJobExecutions !== null) {
|
|
2722
|
+
contents.batchJobExecutions = deserializeAws_restJson1BatchJobExecutionSummaryList(data.batchJobExecutions, context);
|
|
2723
|
+
}
|
|
2724
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2725
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2726
|
+
}
|
|
2727
|
+
return [2, Promise.resolve(contents)];
|
|
2728
|
+
}
|
|
2729
|
+
});
|
|
2730
|
+
}); };
|
|
2731
|
+
var deserializeAws_restJson1ListBatchJobExecutionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2732
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2733
|
+
var _c;
|
|
2734
|
+
return __generator(this, function (_d) {
|
|
2735
|
+
switch (_d.label) {
|
|
2736
|
+
case 0:
|
|
2737
|
+
_a = [__assign({}, output)];
|
|
2738
|
+
_c = {};
|
|
2739
|
+
return [4, parseBody(output.body, context)];
|
|
2740
|
+
case 1:
|
|
2741
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2742
|
+
errorCode = "UnknownError";
|
|
2743
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2744
|
+
_b = errorCode;
|
|
2745
|
+
switch (_b) {
|
|
2746
|
+
case "AccessDeniedException": return [3, 2];
|
|
2747
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2748
|
+
case "InternalServerException": return [3, 4];
|
|
2749
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2750
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2751
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2752
|
+
case "ThrottlingException": return [3, 8];
|
|
2753
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2754
|
+
case "ValidationException": return [3, 10];
|
|
2755
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2756
|
+
}
|
|
2757
|
+
return [3, 12];
|
|
2758
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2759
|
+
case 3: throw _d.sent();
|
|
2760
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2761
|
+
case 5: throw _d.sent();
|
|
2762
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2763
|
+
case 7: throw _d.sent();
|
|
2764
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2765
|
+
case 9: throw _d.sent();
|
|
2766
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2767
|
+
case 11: throw _d.sent();
|
|
2768
|
+
case 12:
|
|
2769
|
+
parsedBody = parsedOutput.body;
|
|
2770
|
+
response = new __BaseException({
|
|
2771
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2772
|
+
$fault: "client",
|
|
2773
|
+
$metadata: deserializeMetadata(output),
|
|
2774
|
+
});
|
|
2775
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2778
|
+
}); };
|
|
2779
|
+
export var deserializeAws_restJson1ListDataSetImportHistoryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2780
|
+
var contents, data, _a, _b;
|
|
2781
|
+
return __generator(this, function (_c) {
|
|
2782
|
+
switch (_c.label) {
|
|
2783
|
+
case 0:
|
|
2784
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2785
|
+
return [2, deserializeAws_restJson1ListDataSetImportHistoryCommandError(output, context)];
|
|
2786
|
+
}
|
|
2787
|
+
contents = {
|
|
2788
|
+
$metadata: deserializeMetadata(output),
|
|
2789
|
+
dataSetImportTasks: undefined,
|
|
2790
|
+
nextToken: undefined,
|
|
2791
|
+
};
|
|
2792
|
+
_a = __expectNonNull;
|
|
2793
|
+
_b = __expectObject;
|
|
2794
|
+
return [4, parseBody(output.body, context)];
|
|
2795
|
+
case 1:
|
|
2796
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2797
|
+
if (data.dataSetImportTasks !== undefined && data.dataSetImportTasks !== null) {
|
|
2798
|
+
contents.dataSetImportTasks = deserializeAws_restJson1DataSetImportTaskList(data.dataSetImportTasks, context);
|
|
2799
|
+
}
|
|
2800
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2801
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2802
|
+
}
|
|
2803
|
+
return [2, Promise.resolve(contents)];
|
|
2804
|
+
}
|
|
2805
|
+
});
|
|
2806
|
+
}); };
|
|
2807
|
+
var deserializeAws_restJson1ListDataSetImportHistoryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2808
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2809
|
+
var _c;
|
|
2810
|
+
return __generator(this, function (_d) {
|
|
2811
|
+
switch (_d.label) {
|
|
2812
|
+
case 0:
|
|
2813
|
+
_a = [__assign({}, output)];
|
|
2814
|
+
_c = {};
|
|
2815
|
+
return [4, parseBody(output.body, context)];
|
|
2816
|
+
case 1:
|
|
2817
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2818
|
+
errorCode = "UnknownError";
|
|
2819
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2820
|
+
_b = errorCode;
|
|
2821
|
+
switch (_b) {
|
|
2822
|
+
case "AccessDeniedException": return [3, 2];
|
|
2823
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2824
|
+
case "InternalServerException": return [3, 4];
|
|
2825
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2826
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2827
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2828
|
+
case "ThrottlingException": return [3, 8];
|
|
2829
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2830
|
+
case "ValidationException": return [3, 10];
|
|
2831
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2832
|
+
}
|
|
2833
|
+
return [3, 12];
|
|
2834
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2835
|
+
case 3: throw _d.sent();
|
|
2836
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2837
|
+
case 5: throw _d.sent();
|
|
2838
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2839
|
+
case 7: throw _d.sent();
|
|
2840
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2841
|
+
case 9: throw _d.sent();
|
|
2842
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2843
|
+
case 11: throw _d.sent();
|
|
2844
|
+
case 12:
|
|
2845
|
+
parsedBody = parsedOutput.body;
|
|
2846
|
+
response = new __BaseException({
|
|
2847
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2848
|
+
$fault: "client",
|
|
2849
|
+
$metadata: deserializeMetadata(output),
|
|
2850
|
+
});
|
|
2851
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2852
|
+
}
|
|
2853
|
+
});
|
|
2854
|
+
}); };
|
|
2855
|
+
export var deserializeAws_restJson1ListDataSetsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2856
|
+
var contents, data, _a, _b;
|
|
2857
|
+
return __generator(this, function (_c) {
|
|
2858
|
+
switch (_c.label) {
|
|
2859
|
+
case 0:
|
|
2860
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2861
|
+
return [2, deserializeAws_restJson1ListDataSetsCommandError(output, context)];
|
|
2862
|
+
}
|
|
2863
|
+
contents = {
|
|
2864
|
+
$metadata: deserializeMetadata(output),
|
|
2865
|
+
dataSets: undefined,
|
|
2866
|
+
nextToken: undefined,
|
|
2867
|
+
};
|
|
2868
|
+
_a = __expectNonNull;
|
|
2869
|
+
_b = __expectObject;
|
|
2870
|
+
return [4, parseBody(output.body, context)];
|
|
2871
|
+
case 1:
|
|
2872
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2873
|
+
if (data.dataSets !== undefined && data.dataSets !== null) {
|
|
2874
|
+
contents.dataSets = deserializeAws_restJson1DataSetsSummaryList(data.dataSets, context);
|
|
2875
|
+
}
|
|
2876
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2877
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2878
|
+
}
|
|
2879
|
+
return [2, Promise.resolve(contents)];
|
|
2880
|
+
}
|
|
2881
|
+
});
|
|
2882
|
+
}); };
|
|
2883
|
+
var deserializeAws_restJson1ListDataSetsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2884
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2885
|
+
var _c;
|
|
2886
|
+
return __generator(this, function (_d) {
|
|
2887
|
+
switch (_d.label) {
|
|
2888
|
+
case 0:
|
|
2889
|
+
_a = [__assign({}, output)];
|
|
2890
|
+
_c = {};
|
|
2891
|
+
return [4, parseBody(output.body, context)];
|
|
2892
|
+
case 1:
|
|
2893
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2894
|
+
errorCode = "UnknownError";
|
|
2895
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2896
|
+
_b = errorCode;
|
|
2897
|
+
switch (_b) {
|
|
2898
|
+
case "AccessDeniedException": return [3, 2];
|
|
2899
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2900
|
+
case "InternalServerException": return [3, 4];
|
|
2901
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2902
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2903
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2904
|
+
case "ThrottlingException": return [3, 8];
|
|
2905
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2906
|
+
case "ValidationException": return [3, 10];
|
|
2907
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2908
|
+
}
|
|
2909
|
+
return [3, 12];
|
|
2910
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2911
|
+
case 3: throw _d.sent();
|
|
2912
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2913
|
+
case 5: throw _d.sent();
|
|
2914
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2915
|
+
case 7: throw _d.sent();
|
|
2916
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2917
|
+
case 9: throw _d.sent();
|
|
2918
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2919
|
+
case 11: throw _d.sent();
|
|
2920
|
+
case 12:
|
|
2921
|
+
parsedBody = parsedOutput.body;
|
|
2922
|
+
response = new __BaseException({
|
|
2923
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2924
|
+
$fault: "client",
|
|
2925
|
+
$metadata: deserializeMetadata(output),
|
|
2926
|
+
});
|
|
2927
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2928
|
+
}
|
|
2929
|
+
});
|
|
2930
|
+
}); };
|
|
2931
|
+
export var deserializeAws_restJson1ListDeploymentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2932
|
+
var contents, data, _a, _b;
|
|
2933
|
+
return __generator(this, function (_c) {
|
|
2934
|
+
switch (_c.label) {
|
|
2935
|
+
case 0:
|
|
2936
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2937
|
+
return [2, deserializeAws_restJson1ListDeploymentsCommandError(output, context)];
|
|
2938
|
+
}
|
|
2939
|
+
contents = {
|
|
2940
|
+
$metadata: deserializeMetadata(output),
|
|
2941
|
+
deployments: undefined,
|
|
2942
|
+
nextToken: undefined,
|
|
2943
|
+
};
|
|
2944
|
+
_a = __expectNonNull;
|
|
2945
|
+
_b = __expectObject;
|
|
2946
|
+
return [4, parseBody(output.body, context)];
|
|
2947
|
+
case 1:
|
|
2948
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2949
|
+
if (data.deployments !== undefined && data.deployments !== null) {
|
|
2950
|
+
contents.deployments = deserializeAws_restJson1DeploymentList(data.deployments, context);
|
|
2951
|
+
}
|
|
2952
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2953
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2954
|
+
}
|
|
2955
|
+
return [2, Promise.resolve(contents)];
|
|
2956
|
+
}
|
|
2957
|
+
});
|
|
2958
|
+
}); };
|
|
2959
|
+
var deserializeAws_restJson1ListDeploymentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2960
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2961
|
+
var _c;
|
|
2962
|
+
return __generator(this, function (_d) {
|
|
2963
|
+
switch (_d.label) {
|
|
2964
|
+
case 0:
|
|
2965
|
+
_a = [__assign({}, output)];
|
|
2966
|
+
_c = {};
|
|
2967
|
+
return [4, parseBody(output.body, context)];
|
|
2968
|
+
case 1:
|
|
2969
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2970
|
+
errorCode = "UnknownError";
|
|
2971
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2972
|
+
_b = errorCode;
|
|
2973
|
+
switch (_b) {
|
|
2974
|
+
case "AccessDeniedException": return [3, 2];
|
|
2975
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
2976
|
+
case "InternalServerException": return [3, 4];
|
|
2977
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
2978
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2979
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
2980
|
+
case "ThrottlingException": return [3, 8];
|
|
2981
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
2982
|
+
case "ValidationException": return [3, 10];
|
|
2983
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
2984
|
+
}
|
|
2985
|
+
return [3, 12];
|
|
2986
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2987
|
+
case 3: throw _d.sent();
|
|
2988
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2989
|
+
case 5: throw _d.sent();
|
|
2990
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2991
|
+
case 7: throw _d.sent();
|
|
2992
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2993
|
+
case 9: throw _d.sent();
|
|
2994
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2995
|
+
case 11: throw _d.sent();
|
|
2996
|
+
case 12:
|
|
2997
|
+
parsedBody = parsedOutput.body;
|
|
2998
|
+
response = new __BaseException({
|
|
2999
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3000
|
+
$fault: "client",
|
|
3001
|
+
$metadata: deserializeMetadata(output),
|
|
3002
|
+
});
|
|
3003
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3004
|
+
}
|
|
3005
|
+
});
|
|
3006
|
+
}); };
|
|
3007
|
+
export var deserializeAws_restJson1ListEngineVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3008
|
+
var contents, data, _a, _b;
|
|
3009
|
+
return __generator(this, function (_c) {
|
|
3010
|
+
switch (_c.label) {
|
|
3011
|
+
case 0:
|
|
3012
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3013
|
+
return [2, deserializeAws_restJson1ListEngineVersionsCommandError(output, context)];
|
|
3014
|
+
}
|
|
3015
|
+
contents = {
|
|
3016
|
+
$metadata: deserializeMetadata(output),
|
|
3017
|
+
engineVersions: undefined,
|
|
3018
|
+
nextToken: undefined,
|
|
3019
|
+
};
|
|
3020
|
+
_a = __expectNonNull;
|
|
3021
|
+
_b = __expectObject;
|
|
3022
|
+
return [4, parseBody(output.body, context)];
|
|
3023
|
+
case 1:
|
|
3024
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3025
|
+
if (data.engineVersions !== undefined && data.engineVersions !== null) {
|
|
3026
|
+
contents.engineVersions = deserializeAws_restJson1EngineVersionsSummaryList(data.engineVersions, context);
|
|
3027
|
+
}
|
|
3028
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
3029
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
3030
|
+
}
|
|
3031
|
+
return [2, Promise.resolve(contents)];
|
|
3032
|
+
}
|
|
3033
|
+
});
|
|
3034
|
+
}); };
|
|
3035
|
+
var deserializeAws_restJson1ListEngineVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3036
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3037
|
+
var _c;
|
|
3038
|
+
return __generator(this, function (_d) {
|
|
3039
|
+
switch (_d.label) {
|
|
3040
|
+
case 0:
|
|
3041
|
+
_a = [__assign({}, output)];
|
|
3042
|
+
_c = {};
|
|
3043
|
+
return [4, parseBody(output.body, context)];
|
|
3044
|
+
case 1:
|
|
3045
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3046
|
+
errorCode = "UnknownError";
|
|
3047
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3048
|
+
_b = errorCode;
|
|
3049
|
+
switch (_b) {
|
|
3050
|
+
case "AccessDeniedException": return [3, 2];
|
|
3051
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3052
|
+
case "InternalServerException": return [3, 4];
|
|
3053
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
3054
|
+
case "ThrottlingException": return [3, 6];
|
|
3055
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 6];
|
|
3056
|
+
case "ValidationException": return [3, 8];
|
|
3057
|
+
case "com.amazonaws.m2#ValidationException": return [3, 8];
|
|
3058
|
+
}
|
|
3059
|
+
return [3, 10];
|
|
3060
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3061
|
+
case 3: throw _d.sent();
|
|
3062
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3063
|
+
case 5: throw _d.sent();
|
|
3064
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3065
|
+
case 7: throw _d.sent();
|
|
3066
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3067
|
+
case 9: throw _d.sent();
|
|
3068
|
+
case 10:
|
|
3069
|
+
parsedBody = parsedOutput.body;
|
|
3070
|
+
response = new __BaseException({
|
|
3071
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3072
|
+
$fault: "client",
|
|
3073
|
+
$metadata: deserializeMetadata(output),
|
|
3074
|
+
});
|
|
3075
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3076
|
+
}
|
|
3077
|
+
});
|
|
3078
|
+
}); };
|
|
3079
|
+
export var deserializeAws_restJson1ListEnvironmentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3080
|
+
var contents, data, _a, _b;
|
|
3081
|
+
return __generator(this, function (_c) {
|
|
3082
|
+
switch (_c.label) {
|
|
3083
|
+
case 0:
|
|
3084
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3085
|
+
return [2, deserializeAws_restJson1ListEnvironmentsCommandError(output, context)];
|
|
3086
|
+
}
|
|
3087
|
+
contents = {
|
|
3088
|
+
$metadata: deserializeMetadata(output),
|
|
3089
|
+
environments: undefined,
|
|
3090
|
+
nextToken: undefined,
|
|
3091
|
+
};
|
|
3092
|
+
_a = __expectNonNull;
|
|
3093
|
+
_b = __expectObject;
|
|
3094
|
+
return [4, parseBody(output.body, context)];
|
|
3095
|
+
case 1:
|
|
3096
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3097
|
+
if (data.environments !== undefined && data.environments !== null) {
|
|
3098
|
+
contents.environments = deserializeAws_restJson1EnvironmentSummaryList(data.environments, context);
|
|
3099
|
+
}
|
|
3100
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
3101
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
3102
|
+
}
|
|
3103
|
+
return [2, Promise.resolve(contents)];
|
|
3104
|
+
}
|
|
3105
|
+
});
|
|
3106
|
+
}); };
|
|
3107
|
+
var deserializeAws_restJson1ListEnvironmentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3108
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3109
|
+
var _c;
|
|
3110
|
+
return __generator(this, function (_d) {
|
|
3111
|
+
switch (_d.label) {
|
|
3112
|
+
case 0:
|
|
3113
|
+
_a = [__assign({}, output)];
|
|
3114
|
+
_c = {};
|
|
3115
|
+
return [4, parseBody(output.body, context)];
|
|
3116
|
+
case 1:
|
|
3117
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3118
|
+
errorCode = "UnknownError";
|
|
3119
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3120
|
+
_b = errorCode;
|
|
3121
|
+
switch (_b) {
|
|
3122
|
+
case "AccessDeniedException": return [3, 2];
|
|
3123
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3124
|
+
case "InternalServerException": return [3, 4];
|
|
3125
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
3126
|
+
case "ThrottlingException": return [3, 6];
|
|
3127
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 6];
|
|
3128
|
+
case "ValidationException": return [3, 8];
|
|
3129
|
+
case "com.amazonaws.m2#ValidationException": return [3, 8];
|
|
3130
|
+
}
|
|
3131
|
+
return [3, 10];
|
|
3132
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3133
|
+
case 3: throw _d.sent();
|
|
3134
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3135
|
+
case 5: throw _d.sent();
|
|
3136
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3137
|
+
case 7: throw _d.sent();
|
|
3138
|
+
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3139
|
+
case 9: throw _d.sent();
|
|
3140
|
+
case 10:
|
|
3141
|
+
parsedBody = parsedOutput.body;
|
|
3142
|
+
response = new __BaseException({
|
|
3143
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3144
|
+
$fault: "client",
|
|
3145
|
+
$metadata: deserializeMetadata(output),
|
|
3146
|
+
});
|
|
3147
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3148
|
+
}
|
|
3149
|
+
});
|
|
3150
|
+
}); };
|
|
3151
|
+
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3152
|
+
var contents, data, _a, _b;
|
|
3153
|
+
return __generator(this, function (_c) {
|
|
3154
|
+
switch (_c.label) {
|
|
3155
|
+
case 0:
|
|
3156
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3157
|
+
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
3158
|
+
}
|
|
3159
|
+
contents = {
|
|
3160
|
+
$metadata: deserializeMetadata(output),
|
|
3161
|
+
tags: undefined,
|
|
3162
|
+
};
|
|
3163
|
+
_a = __expectNonNull;
|
|
3164
|
+
_b = __expectObject;
|
|
3165
|
+
return [4, parseBody(output.body, context)];
|
|
3166
|
+
case 1:
|
|
3167
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3168
|
+
if (data.tags !== undefined && data.tags !== null) {
|
|
3169
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
3170
|
+
}
|
|
3171
|
+
return [2, Promise.resolve(contents)];
|
|
3172
|
+
}
|
|
3173
|
+
});
|
|
3174
|
+
}); };
|
|
3175
|
+
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3176
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3177
|
+
var _c;
|
|
3178
|
+
return __generator(this, function (_d) {
|
|
3179
|
+
switch (_d.label) {
|
|
3180
|
+
case 0:
|
|
3181
|
+
_a = [__assign({}, output)];
|
|
3182
|
+
_c = {};
|
|
3183
|
+
return [4, parseBody(output.body, context)];
|
|
3184
|
+
case 1:
|
|
3185
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3186
|
+
errorCode = "UnknownError";
|
|
3187
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3188
|
+
_b = errorCode;
|
|
3189
|
+
switch (_b) {
|
|
3190
|
+
case "AccessDeniedException": return [3, 2];
|
|
3191
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3192
|
+
case "InternalServerException": return [3, 4];
|
|
3193
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
3194
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
3195
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
3196
|
+
case "ThrottlingException": return [3, 8];
|
|
3197
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
3198
|
+
case "ValidationException": return [3, 10];
|
|
3199
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
3200
|
+
}
|
|
3201
|
+
return [3, 12];
|
|
3202
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3203
|
+
case 3: throw _d.sent();
|
|
3204
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3205
|
+
case 5: throw _d.sent();
|
|
3206
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3207
|
+
case 7: throw _d.sent();
|
|
3208
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3209
|
+
case 9: throw _d.sent();
|
|
3210
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3211
|
+
case 11: throw _d.sent();
|
|
3212
|
+
case 12:
|
|
3213
|
+
parsedBody = parsedOutput.body;
|
|
3214
|
+
response = new __BaseException({
|
|
3215
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3216
|
+
$fault: "client",
|
|
3217
|
+
$metadata: deserializeMetadata(output),
|
|
3218
|
+
});
|
|
3219
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3220
|
+
}
|
|
3221
|
+
});
|
|
3222
|
+
}); };
|
|
3223
|
+
export var deserializeAws_restJson1StartApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3224
|
+
var contents;
|
|
3225
|
+
return __generator(this, function (_a) {
|
|
3226
|
+
switch (_a.label) {
|
|
3227
|
+
case 0:
|
|
3228
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3229
|
+
return [2, deserializeAws_restJson1StartApplicationCommandError(output, context)];
|
|
3230
|
+
}
|
|
3231
|
+
contents = {
|
|
3232
|
+
$metadata: deserializeMetadata(output),
|
|
3233
|
+
};
|
|
3234
|
+
return [4, collectBody(output.body, context)];
|
|
3235
|
+
case 1:
|
|
3236
|
+
_a.sent();
|
|
3237
|
+
return [2, Promise.resolve(contents)];
|
|
3238
|
+
}
|
|
3239
|
+
});
|
|
3240
|
+
}); };
|
|
3241
|
+
var deserializeAws_restJson1StartApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3242
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3243
|
+
var _c;
|
|
3244
|
+
return __generator(this, function (_d) {
|
|
3245
|
+
switch (_d.label) {
|
|
3246
|
+
case 0:
|
|
3247
|
+
_a = [__assign({}, output)];
|
|
3248
|
+
_c = {};
|
|
3249
|
+
return [4, parseBody(output.body, context)];
|
|
3250
|
+
case 1:
|
|
3251
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3252
|
+
errorCode = "UnknownError";
|
|
3253
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3254
|
+
_b = errorCode;
|
|
3255
|
+
switch (_b) {
|
|
3256
|
+
case "AccessDeniedException": return [3, 2];
|
|
3257
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3258
|
+
case "ConflictException": return [3, 4];
|
|
3259
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
3260
|
+
case "InternalServerException": return [3, 6];
|
|
3261
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
3262
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
3263
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
3264
|
+
case "ThrottlingException": return [3, 10];
|
|
3265
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
3266
|
+
case "ValidationException": return [3, 12];
|
|
3267
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
3268
|
+
}
|
|
3269
|
+
return [3, 14];
|
|
3270
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3271
|
+
case 3: throw _d.sent();
|
|
3272
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
3273
|
+
case 5: throw _d.sent();
|
|
3274
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3275
|
+
case 7: throw _d.sent();
|
|
3276
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3277
|
+
case 9: throw _d.sent();
|
|
3278
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3279
|
+
case 11: throw _d.sent();
|
|
3280
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3281
|
+
case 13: throw _d.sent();
|
|
3282
|
+
case 14:
|
|
3283
|
+
parsedBody = parsedOutput.body;
|
|
3284
|
+
response = new __BaseException({
|
|
3285
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3286
|
+
$fault: "client",
|
|
3287
|
+
$metadata: deserializeMetadata(output),
|
|
3288
|
+
});
|
|
3289
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3290
|
+
}
|
|
3291
|
+
});
|
|
3292
|
+
}); };
|
|
3293
|
+
export var deserializeAws_restJson1StartBatchJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3294
|
+
var contents, data, _a, _b;
|
|
3295
|
+
return __generator(this, function (_c) {
|
|
3296
|
+
switch (_c.label) {
|
|
3297
|
+
case 0:
|
|
3298
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3299
|
+
return [2, deserializeAws_restJson1StartBatchJobCommandError(output, context)];
|
|
3300
|
+
}
|
|
3301
|
+
contents = {
|
|
3302
|
+
$metadata: deserializeMetadata(output),
|
|
3303
|
+
executionId: undefined,
|
|
3304
|
+
};
|
|
3305
|
+
_a = __expectNonNull;
|
|
3306
|
+
_b = __expectObject;
|
|
3307
|
+
return [4, parseBody(output.body, context)];
|
|
3308
|
+
case 1:
|
|
3309
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3310
|
+
if (data.executionId !== undefined && data.executionId !== null) {
|
|
3311
|
+
contents.executionId = __expectString(data.executionId);
|
|
3312
|
+
}
|
|
3313
|
+
return [2, Promise.resolve(contents)];
|
|
3314
|
+
}
|
|
3315
|
+
});
|
|
3316
|
+
}); };
|
|
3317
|
+
var deserializeAws_restJson1StartBatchJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3318
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3319
|
+
var _c;
|
|
3320
|
+
return __generator(this, function (_d) {
|
|
3321
|
+
switch (_d.label) {
|
|
3322
|
+
case 0:
|
|
3323
|
+
_a = [__assign({}, output)];
|
|
3324
|
+
_c = {};
|
|
3325
|
+
return [4, parseBody(output.body, context)];
|
|
3326
|
+
case 1:
|
|
3327
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3328
|
+
errorCode = "UnknownError";
|
|
3329
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3330
|
+
_b = errorCode;
|
|
3331
|
+
switch (_b) {
|
|
3332
|
+
case "AccessDeniedException": return [3, 2];
|
|
3333
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3334
|
+
case "ConflictException": return [3, 4];
|
|
3335
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
3336
|
+
case "InternalServerException": return [3, 6];
|
|
3337
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
3338
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
3339
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
3340
|
+
case "ThrottlingException": return [3, 10];
|
|
3341
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
3342
|
+
case "ValidationException": return [3, 12];
|
|
3343
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
3344
|
+
}
|
|
3345
|
+
return [3, 14];
|
|
3346
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3347
|
+
case 3: throw _d.sent();
|
|
3348
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
3349
|
+
case 5: throw _d.sent();
|
|
3350
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3351
|
+
case 7: throw _d.sent();
|
|
3352
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3353
|
+
case 9: throw _d.sent();
|
|
3354
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3355
|
+
case 11: throw _d.sent();
|
|
3356
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3357
|
+
case 13: throw _d.sent();
|
|
3358
|
+
case 14:
|
|
3359
|
+
parsedBody = parsedOutput.body;
|
|
3360
|
+
response = new __BaseException({
|
|
3361
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3362
|
+
$fault: "client",
|
|
3363
|
+
$metadata: deserializeMetadata(output),
|
|
3364
|
+
});
|
|
3365
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3366
|
+
}
|
|
3367
|
+
});
|
|
3368
|
+
}); };
|
|
3369
|
+
export var deserializeAws_restJson1StopApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3370
|
+
var contents;
|
|
3371
|
+
return __generator(this, function (_a) {
|
|
3372
|
+
switch (_a.label) {
|
|
3373
|
+
case 0:
|
|
3374
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3375
|
+
return [2, deserializeAws_restJson1StopApplicationCommandError(output, context)];
|
|
3376
|
+
}
|
|
3377
|
+
contents = {
|
|
3378
|
+
$metadata: deserializeMetadata(output),
|
|
3379
|
+
};
|
|
3380
|
+
return [4, collectBody(output.body, context)];
|
|
3381
|
+
case 1:
|
|
3382
|
+
_a.sent();
|
|
3383
|
+
return [2, Promise.resolve(contents)];
|
|
3384
|
+
}
|
|
3385
|
+
});
|
|
3386
|
+
}); };
|
|
3387
|
+
var deserializeAws_restJson1StopApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3388
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3389
|
+
var _c;
|
|
3390
|
+
return __generator(this, function (_d) {
|
|
3391
|
+
switch (_d.label) {
|
|
3392
|
+
case 0:
|
|
3393
|
+
_a = [__assign({}, output)];
|
|
3394
|
+
_c = {};
|
|
3395
|
+
return [4, parseBody(output.body, context)];
|
|
3396
|
+
case 1:
|
|
3397
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3398
|
+
errorCode = "UnknownError";
|
|
3399
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3400
|
+
_b = errorCode;
|
|
3401
|
+
switch (_b) {
|
|
3402
|
+
case "AccessDeniedException": return [3, 2];
|
|
3403
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3404
|
+
case "ConflictException": return [3, 4];
|
|
3405
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
3406
|
+
case "InternalServerException": return [3, 6];
|
|
3407
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
3408
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
3409
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
3410
|
+
case "ThrottlingException": return [3, 10];
|
|
3411
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
3412
|
+
case "ValidationException": return [3, 12];
|
|
3413
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
3414
|
+
}
|
|
3415
|
+
return [3, 14];
|
|
3416
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3417
|
+
case 3: throw _d.sent();
|
|
3418
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
3419
|
+
case 5: throw _d.sent();
|
|
3420
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3421
|
+
case 7: throw _d.sent();
|
|
3422
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3423
|
+
case 9: throw _d.sent();
|
|
3424
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3425
|
+
case 11: throw _d.sent();
|
|
3426
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3427
|
+
case 13: throw _d.sent();
|
|
3428
|
+
case 14:
|
|
3429
|
+
parsedBody = parsedOutput.body;
|
|
3430
|
+
response = new __BaseException({
|
|
3431
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3432
|
+
$fault: "client",
|
|
3433
|
+
$metadata: deserializeMetadata(output),
|
|
3434
|
+
});
|
|
3435
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3436
|
+
}
|
|
3437
|
+
});
|
|
3438
|
+
}); };
|
|
3439
|
+
export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3440
|
+
var contents;
|
|
3441
|
+
return __generator(this, function (_a) {
|
|
3442
|
+
switch (_a.label) {
|
|
3443
|
+
case 0:
|
|
3444
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3445
|
+
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
3446
|
+
}
|
|
3447
|
+
contents = {
|
|
3448
|
+
$metadata: deserializeMetadata(output),
|
|
3449
|
+
};
|
|
3450
|
+
return [4, collectBody(output.body, context)];
|
|
3451
|
+
case 1:
|
|
3452
|
+
_a.sent();
|
|
3453
|
+
return [2, Promise.resolve(contents)];
|
|
3454
|
+
}
|
|
3455
|
+
});
|
|
3456
|
+
}); };
|
|
3457
|
+
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3458
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3459
|
+
var _c;
|
|
3460
|
+
return __generator(this, function (_d) {
|
|
3461
|
+
switch (_d.label) {
|
|
3462
|
+
case 0:
|
|
3463
|
+
_a = [__assign({}, output)];
|
|
3464
|
+
_c = {};
|
|
3465
|
+
return [4, parseBody(output.body, context)];
|
|
3466
|
+
case 1:
|
|
3467
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3468
|
+
errorCode = "UnknownError";
|
|
3469
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3470
|
+
_b = errorCode;
|
|
3471
|
+
switch (_b) {
|
|
3472
|
+
case "AccessDeniedException": return [3, 2];
|
|
3473
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3474
|
+
case "InternalServerException": return [3, 4];
|
|
3475
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
3476
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
3477
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
3478
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
3479
|
+
case "com.amazonaws.m2#ServiceQuotaExceededException": return [3, 8];
|
|
3480
|
+
case "ThrottlingException": return [3, 10];
|
|
3481
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
3482
|
+
case "ValidationException": return [3, 12];
|
|
3483
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
3484
|
+
}
|
|
3485
|
+
return [3, 14];
|
|
3486
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3487
|
+
case 3: throw _d.sent();
|
|
3488
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3489
|
+
case 5: throw _d.sent();
|
|
3490
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3491
|
+
case 7: throw _d.sent();
|
|
3492
|
+
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
3493
|
+
case 9: throw _d.sent();
|
|
3494
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3495
|
+
case 11: throw _d.sent();
|
|
3496
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3497
|
+
case 13: throw _d.sent();
|
|
3498
|
+
case 14:
|
|
3499
|
+
parsedBody = parsedOutput.body;
|
|
3500
|
+
response = new __BaseException({
|
|
3501
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3502
|
+
$fault: "client",
|
|
3503
|
+
$metadata: deserializeMetadata(output),
|
|
3504
|
+
});
|
|
3505
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3506
|
+
}
|
|
3507
|
+
});
|
|
3508
|
+
}); };
|
|
3509
|
+
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3510
|
+
var contents;
|
|
3511
|
+
return __generator(this, function (_a) {
|
|
3512
|
+
switch (_a.label) {
|
|
3513
|
+
case 0:
|
|
3514
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3515
|
+
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
3516
|
+
}
|
|
3517
|
+
contents = {
|
|
3518
|
+
$metadata: deserializeMetadata(output),
|
|
3519
|
+
};
|
|
3520
|
+
return [4, collectBody(output.body, context)];
|
|
3521
|
+
case 1:
|
|
3522
|
+
_a.sent();
|
|
3523
|
+
return [2, Promise.resolve(contents)];
|
|
3524
|
+
}
|
|
3525
|
+
});
|
|
3526
|
+
}); };
|
|
3527
|
+
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3528
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3529
|
+
var _c;
|
|
3530
|
+
return __generator(this, function (_d) {
|
|
3531
|
+
switch (_d.label) {
|
|
3532
|
+
case 0:
|
|
3533
|
+
_a = [__assign({}, output)];
|
|
3534
|
+
_c = {};
|
|
3535
|
+
return [4, parseBody(output.body, context)];
|
|
3536
|
+
case 1:
|
|
3537
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3538
|
+
errorCode = "UnknownError";
|
|
3539
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3540
|
+
_b = errorCode;
|
|
3541
|
+
switch (_b) {
|
|
3542
|
+
case "AccessDeniedException": return [3, 2];
|
|
3543
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3544
|
+
case "InternalServerException": return [3, 4];
|
|
3545
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 4];
|
|
3546
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
3547
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 6];
|
|
3548
|
+
case "ThrottlingException": return [3, 8];
|
|
3549
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 8];
|
|
3550
|
+
case "ValidationException": return [3, 10];
|
|
3551
|
+
case "com.amazonaws.m2#ValidationException": return [3, 10];
|
|
3552
|
+
}
|
|
3553
|
+
return [3, 12];
|
|
3554
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3555
|
+
case 3: throw _d.sent();
|
|
3556
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3557
|
+
case 5: throw _d.sent();
|
|
3558
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3559
|
+
case 7: throw _d.sent();
|
|
3560
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3561
|
+
case 9: throw _d.sent();
|
|
3562
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3563
|
+
case 11: throw _d.sent();
|
|
3564
|
+
case 12:
|
|
3565
|
+
parsedBody = parsedOutput.body;
|
|
3566
|
+
response = new __BaseException({
|
|
3567
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3568
|
+
$fault: "client",
|
|
3569
|
+
$metadata: deserializeMetadata(output),
|
|
3570
|
+
});
|
|
3571
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3572
|
+
}
|
|
3573
|
+
});
|
|
3574
|
+
}); };
|
|
3575
|
+
export var deserializeAws_restJson1UpdateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3576
|
+
var contents, data, _a, _b;
|
|
3577
|
+
return __generator(this, function (_c) {
|
|
3578
|
+
switch (_c.label) {
|
|
3579
|
+
case 0:
|
|
3580
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3581
|
+
return [2, deserializeAws_restJson1UpdateApplicationCommandError(output, context)];
|
|
3582
|
+
}
|
|
3583
|
+
contents = {
|
|
3584
|
+
$metadata: deserializeMetadata(output),
|
|
3585
|
+
applicationVersion: undefined,
|
|
3586
|
+
};
|
|
3587
|
+
_a = __expectNonNull;
|
|
3588
|
+
_b = __expectObject;
|
|
3589
|
+
return [4, parseBody(output.body, context)];
|
|
3590
|
+
case 1:
|
|
3591
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3592
|
+
if (data.applicationVersion !== undefined && data.applicationVersion !== null) {
|
|
3593
|
+
contents.applicationVersion = __expectInt32(data.applicationVersion);
|
|
3594
|
+
}
|
|
3595
|
+
return [2, Promise.resolve(contents)];
|
|
3596
|
+
}
|
|
3597
|
+
});
|
|
3598
|
+
}); };
|
|
3599
|
+
var deserializeAws_restJson1UpdateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3600
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3601
|
+
var _c;
|
|
3602
|
+
return __generator(this, function (_d) {
|
|
3603
|
+
switch (_d.label) {
|
|
3604
|
+
case 0:
|
|
3605
|
+
_a = [__assign({}, output)];
|
|
3606
|
+
_c = {};
|
|
3607
|
+
return [4, parseBody(output.body, context)];
|
|
3608
|
+
case 1:
|
|
3609
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3610
|
+
errorCode = "UnknownError";
|
|
3611
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3612
|
+
_b = errorCode;
|
|
3613
|
+
switch (_b) {
|
|
3614
|
+
case "AccessDeniedException": return [3, 2];
|
|
3615
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3616
|
+
case "ConflictException": return [3, 4];
|
|
3617
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
3618
|
+
case "InternalServerException": return [3, 6];
|
|
3619
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
3620
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
3621
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
3622
|
+
case "ThrottlingException": return [3, 10];
|
|
3623
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 10];
|
|
3624
|
+
case "ValidationException": return [3, 12];
|
|
3625
|
+
case "com.amazonaws.m2#ValidationException": return [3, 12];
|
|
3626
|
+
}
|
|
3627
|
+
return [3, 14];
|
|
3628
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3629
|
+
case 3: throw _d.sent();
|
|
3630
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
3631
|
+
case 5: throw _d.sent();
|
|
3632
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3633
|
+
case 7: throw _d.sent();
|
|
3634
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3635
|
+
case 9: throw _d.sent();
|
|
3636
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3637
|
+
case 11: throw _d.sent();
|
|
3638
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3639
|
+
case 13: throw _d.sent();
|
|
3640
|
+
case 14:
|
|
3641
|
+
parsedBody = parsedOutput.body;
|
|
3642
|
+
response = new __BaseException({
|
|
3643
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3644
|
+
$fault: "client",
|
|
3645
|
+
$metadata: deserializeMetadata(output),
|
|
3646
|
+
});
|
|
3647
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3648
|
+
}
|
|
3649
|
+
});
|
|
3650
|
+
}); };
|
|
3651
|
+
export var deserializeAws_restJson1UpdateEnvironmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3652
|
+
var contents, data, _a, _b;
|
|
3653
|
+
return __generator(this, function (_c) {
|
|
3654
|
+
switch (_c.label) {
|
|
3655
|
+
case 0:
|
|
3656
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3657
|
+
return [2, deserializeAws_restJson1UpdateEnvironmentCommandError(output, context)];
|
|
3658
|
+
}
|
|
3659
|
+
contents = {
|
|
3660
|
+
$metadata: deserializeMetadata(output),
|
|
3661
|
+
environmentId: undefined,
|
|
3662
|
+
};
|
|
3663
|
+
_a = __expectNonNull;
|
|
3664
|
+
_b = __expectObject;
|
|
3665
|
+
return [4, parseBody(output.body, context)];
|
|
3666
|
+
case 1:
|
|
3667
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
3668
|
+
if (data.environmentId !== undefined && data.environmentId !== null) {
|
|
3669
|
+
contents.environmentId = __expectString(data.environmentId);
|
|
3670
|
+
}
|
|
3671
|
+
return [2, Promise.resolve(contents)];
|
|
3672
|
+
}
|
|
3673
|
+
});
|
|
3674
|
+
}); };
|
|
3675
|
+
var deserializeAws_restJson1UpdateEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3676
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
3677
|
+
var _c;
|
|
3678
|
+
return __generator(this, function (_d) {
|
|
3679
|
+
switch (_d.label) {
|
|
3680
|
+
case 0:
|
|
3681
|
+
_a = [__assign({}, output)];
|
|
3682
|
+
_c = {};
|
|
3683
|
+
return [4, parseBody(output.body, context)];
|
|
3684
|
+
case 1:
|
|
3685
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
3686
|
+
errorCode = "UnknownError";
|
|
3687
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3688
|
+
_b = errorCode;
|
|
3689
|
+
switch (_b) {
|
|
3690
|
+
case "AccessDeniedException": return [3, 2];
|
|
3691
|
+
case "com.amazonaws.m2#AccessDeniedException": return [3, 2];
|
|
3692
|
+
case "ConflictException": return [3, 4];
|
|
3693
|
+
case "com.amazonaws.m2#ConflictException": return [3, 4];
|
|
3694
|
+
case "InternalServerException": return [3, 6];
|
|
3695
|
+
case "com.amazonaws.m2#InternalServerException": return [3, 6];
|
|
3696
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
3697
|
+
case "com.amazonaws.m2#ResourceNotFoundException": return [3, 8];
|
|
3698
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
3699
|
+
case "com.amazonaws.m2#ServiceQuotaExceededException": return [3, 10];
|
|
3700
|
+
case "ThrottlingException": return [3, 12];
|
|
3701
|
+
case "com.amazonaws.m2#ThrottlingException": return [3, 12];
|
|
3702
|
+
case "ValidationException": return [3, 14];
|
|
3703
|
+
case "com.amazonaws.m2#ValidationException": return [3, 14];
|
|
3704
|
+
}
|
|
3705
|
+
return [3, 16];
|
|
3706
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3707
|
+
case 3: throw _d.sent();
|
|
3708
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
3709
|
+
case 5: throw _d.sent();
|
|
3710
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3711
|
+
case 7: throw _d.sent();
|
|
3712
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3713
|
+
case 9: throw _d.sent();
|
|
3714
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
3715
|
+
case 11: throw _d.sent();
|
|
3716
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3717
|
+
case 13: throw _d.sent();
|
|
3718
|
+
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3719
|
+
case 15: throw _d.sent();
|
|
3720
|
+
case 16:
|
|
3721
|
+
parsedBody = parsedOutput.body;
|
|
3722
|
+
response = new __BaseException({
|
|
3723
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3724
|
+
$fault: "client",
|
|
3725
|
+
$metadata: deserializeMetadata(output),
|
|
3726
|
+
});
|
|
3727
|
+
throw __decorateServiceException(response, parsedBody);
|
|
3728
|
+
}
|
|
3729
|
+
});
|
|
3730
|
+
}); };
|
|
3731
|
+
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3732
|
+
var contents, data, exception;
|
|
3733
|
+
return __generator(this, function (_a) {
|
|
3734
|
+
contents = {};
|
|
3735
|
+
data = parsedOutput.body;
|
|
3736
|
+
if (data.message !== undefined && data.message !== null) {
|
|
3737
|
+
contents.message = __expectString(data.message);
|
|
3738
|
+
}
|
|
3739
|
+
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
3740
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3741
|
+
});
|
|
3742
|
+
}); };
|
|
3743
|
+
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3744
|
+
var contents, data, exception;
|
|
3745
|
+
return __generator(this, function (_a) {
|
|
3746
|
+
contents = {};
|
|
3747
|
+
data = parsedOutput.body;
|
|
3748
|
+
if (data.message !== undefined && data.message !== null) {
|
|
3749
|
+
contents.message = __expectString(data.message);
|
|
3750
|
+
}
|
|
3751
|
+
if (data.resourceId !== undefined && data.resourceId !== null) {
|
|
3752
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
3753
|
+
}
|
|
3754
|
+
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
3755
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
3756
|
+
}
|
|
3757
|
+
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
3758
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3759
|
+
});
|
|
3760
|
+
}); };
|
|
3761
|
+
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3762
|
+
var contents, data, exception;
|
|
3763
|
+
return __generator(this, function (_a) {
|
|
3764
|
+
contents = {};
|
|
3765
|
+
if (parsedOutput.headers["retry-after"] !== undefined) {
|
|
3766
|
+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
|
|
3767
|
+
}
|
|
3768
|
+
data = parsedOutput.body;
|
|
3769
|
+
if (data.message !== undefined && data.message !== null) {
|
|
3770
|
+
contents.message = __expectString(data.message);
|
|
3771
|
+
}
|
|
3772
|
+
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
3773
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3774
|
+
});
|
|
3775
|
+
}); };
|
|
3776
|
+
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3777
|
+
var contents, data, exception;
|
|
3778
|
+
return __generator(this, function (_a) {
|
|
3779
|
+
contents = {};
|
|
3780
|
+
data = parsedOutput.body;
|
|
3781
|
+
if (data.message !== undefined && data.message !== null) {
|
|
3782
|
+
contents.message = __expectString(data.message);
|
|
3783
|
+
}
|
|
3784
|
+
if (data.resourceId !== undefined && data.resourceId !== null) {
|
|
3785
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
3786
|
+
}
|
|
3787
|
+
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
3788
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
3789
|
+
}
|
|
3790
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
3791
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3792
|
+
});
|
|
3793
|
+
}); };
|
|
3794
|
+
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3795
|
+
var contents, data, exception;
|
|
3796
|
+
return __generator(this, function (_a) {
|
|
3797
|
+
contents = {};
|
|
3798
|
+
data = parsedOutput.body;
|
|
3799
|
+
if (data.message !== undefined && data.message !== null) {
|
|
3800
|
+
contents.message = __expectString(data.message);
|
|
3801
|
+
}
|
|
3802
|
+
if (data.quotaCode !== undefined && data.quotaCode !== null) {
|
|
3803
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
3804
|
+
}
|
|
3805
|
+
if (data.resourceId !== undefined && data.resourceId !== null) {
|
|
3806
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
3807
|
+
}
|
|
3808
|
+
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
3809
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
3810
|
+
}
|
|
3811
|
+
if (data.serviceCode !== undefined && data.serviceCode !== null) {
|
|
3812
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
3813
|
+
}
|
|
3814
|
+
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
3815
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3816
|
+
});
|
|
3817
|
+
}); };
|
|
3818
|
+
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3819
|
+
var contents, data, exception;
|
|
3820
|
+
return __generator(this, function (_a) {
|
|
3821
|
+
contents = {};
|
|
3822
|
+
if (parsedOutput.headers["retry-after"] !== undefined) {
|
|
3823
|
+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
|
|
3824
|
+
}
|
|
3825
|
+
data = parsedOutput.body;
|
|
3826
|
+
if (data.message !== undefined && data.message !== null) {
|
|
3827
|
+
contents.message = __expectString(data.message);
|
|
3828
|
+
}
|
|
3829
|
+
if (data.quotaCode !== undefined && data.quotaCode !== null) {
|
|
3830
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
3831
|
+
}
|
|
3832
|
+
if (data.serviceCode !== undefined && data.serviceCode !== null) {
|
|
3833
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
3834
|
+
}
|
|
3835
|
+
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
3836
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3837
|
+
});
|
|
3838
|
+
}); };
|
|
3839
|
+
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3840
|
+
var contents, data, exception;
|
|
3841
|
+
return __generator(this, function (_a) {
|
|
3842
|
+
contents = {};
|
|
3843
|
+
data = parsedOutput.body;
|
|
3844
|
+
if (data.fieldList !== undefined && data.fieldList !== null) {
|
|
3845
|
+
contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
|
|
3846
|
+
}
|
|
3847
|
+
if (data.message !== undefined && data.message !== null) {
|
|
3848
|
+
contents.message = __expectString(data.message);
|
|
3849
|
+
}
|
|
3850
|
+
if (data.reason !== undefined && data.reason !== null) {
|
|
3851
|
+
contents.reason = __expectString(data.reason);
|
|
3852
|
+
}
|
|
3853
|
+
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
3854
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3855
|
+
});
|
|
3856
|
+
}); };
|
|
3857
|
+
var serializeAws_restJson1AlternateKey = function (input, context) {
|
|
3858
|
+
return __assign(__assign(__assign(__assign({}, (input.allowDuplicates !== undefined &&
|
|
3859
|
+
input.allowDuplicates !== null && { allowDuplicates: input.allowDuplicates })), (input.length !== undefined && input.length !== null && { length: input.length })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.offset !== undefined && input.offset !== null && { offset: input.offset }));
|
|
3860
|
+
};
|
|
3861
|
+
var serializeAws_restJson1AlternateKeyList = function (input, context) {
|
|
3862
|
+
return input
|
|
3863
|
+
.filter(function (e) { return e != null; })
|
|
3864
|
+
.map(function (entry) {
|
|
3865
|
+
if (entry === null) {
|
|
3866
|
+
return null;
|
|
3867
|
+
}
|
|
3868
|
+
return serializeAws_restJson1AlternateKey(entry, context);
|
|
3869
|
+
});
|
|
3870
|
+
};
|
|
3871
|
+
var serializeAws_restJson1BatchJobIdentifier = function (input, context) {
|
|
3872
|
+
return BatchJobIdentifier.visit(input, {
|
|
3873
|
+
fileBatchJobIdentifier: function (value) { return ({
|
|
3874
|
+
fileBatchJobIdentifier: serializeAws_restJson1FileBatchJobIdentifier(value, context),
|
|
3875
|
+
}); },
|
|
3876
|
+
scriptBatchJobIdentifier: function (value) { return ({
|
|
3877
|
+
scriptBatchJobIdentifier: serializeAws_restJson1ScriptBatchJobIdentifier(value, context),
|
|
3878
|
+
}); },
|
|
3879
|
+
_: function (name, value) { return ({ name: value }); },
|
|
3880
|
+
});
|
|
3881
|
+
};
|
|
3882
|
+
var serializeAws_restJson1BatchJobParametersMap = function (input, context) {
|
|
3883
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
3884
|
+
var _b;
|
|
3885
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
3886
|
+
if (value === null) {
|
|
3887
|
+
return acc;
|
|
3888
|
+
}
|
|
3889
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
3890
|
+
}, {});
|
|
3891
|
+
};
|
|
3892
|
+
var serializeAws_restJson1DataSet = function (input, context) {
|
|
3893
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.datasetName !== undefined && input.datasetName !== null && { datasetName: input.datasetName })), (input.datasetOrg !== undefined &&
|
|
3894
|
+
input.datasetOrg !== null && {
|
|
3895
|
+
datasetOrg: serializeAws_restJson1DatasetOrgAttributes(input.datasetOrg, context),
|
|
3896
|
+
})), (input.recordLength !== undefined &&
|
|
3897
|
+
input.recordLength !== null && { recordLength: serializeAws_restJson1RecordLength(input.recordLength, context) })), (input.relativePath !== undefined && input.relativePath !== null && { relativePath: input.relativePath })), (input.storageType !== undefined && input.storageType !== null && { storageType: input.storageType }));
|
|
3898
|
+
};
|
|
3899
|
+
var serializeAws_restJson1DataSetImportConfig = function (input, context) {
|
|
3900
|
+
return DataSetImportConfig.visit(input, {
|
|
3901
|
+
dataSets: function (value) { return ({ dataSets: serializeAws_restJson1DataSetImportList(value, context) }); },
|
|
3902
|
+
s3Location: function (value) { return ({ s3Location: value }); },
|
|
3903
|
+
_: function (name, value) { return ({ name: value }); },
|
|
3904
|
+
});
|
|
3905
|
+
};
|
|
3906
|
+
var serializeAws_restJson1DataSetImportItem = function (input, context) {
|
|
3907
|
+
return __assign(__assign({}, (input.dataSet !== undefined &&
|
|
3908
|
+
input.dataSet !== null && { dataSet: serializeAws_restJson1DataSet(input.dataSet, context) })), (input.externalLocation !== undefined &&
|
|
3909
|
+
input.externalLocation !== null && {
|
|
3910
|
+
externalLocation: serializeAws_restJson1ExternalLocation(input.externalLocation, context),
|
|
3911
|
+
}));
|
|
3912
|
+
};
|
|
3913
|
+
var serializeAws_restJson1DataSetImportList = function (input, context) {
|
|
3914
|
+
return input
|
|
3915
|
+
.filter(function (e) { return e != null; })
|
|
3916
|
+
.map(function (entry) {
|
|
3917
|
+
if (entry === null) {
|
|
3918
|
+
return null;
|
|
3919
|
+
}
|
|
3920
|
+
return serializeAws_restJson1DataSetImportItem(entry, context);
|
|
3921
|
+
});
|
|
3922
|
+
};
|
|
3923
|
+
var serializeAws_restJson1DatasetOrgAttributes = function (input, context) {
|
|
3924
|
+
return DatasetOrgAttributes.visit(input, {
|
|
3925
|
+
gdg: function (value) { return ({ gdg: serializeAws_restJson1GdgAttributes(value, context) }); },
|
|
3926
|
+
vsam: function (value) { return ({ vsam: serializeAws_restJson1VsamAttributes(value, context) }); },
|
|
3927
|
+
_: function (name, value) { return ({ name: value }); },
|
|
3928
|
+
});
|
|
3929
|
+
};
|
|
3930
|
+
var serializeAws_restJson1Definition = function (input, context) {
|
|
3931
|
+
return Definition.visit(input, {
|
|
3932
|
+
content: function (value) { return ({ content: value }); },
|
|
3933
|
+
s3Location: function (value) { return ({ s3Location: value }); },
|
|
3934
|
+
_: function (name, value) { return ({ name: value }); },
|
|
3935
|
+
});
|
|
3936
|
+
};
|
|
3937
|
+
var serializeAws_restJson1EfsStorageConfiguration = function (input, context) {
|
|
3938
|
+
return __assign(__assign({}, (input.fileSystemId !== undefined && input.fileSystemId !== null && { "file-system-id": input.fileSystemId })), (input.mountPoint !== undefined && input.mountPoint !== null && { "mount-point": input.mountPoint }));
|
|
3939
|
+
};
|
|
3940
|
+
var serializeAws_restJson1ExternalLocation = function (input, context) {
|
|
3941
|
+
return ExternalLocation.visit(input, {
|
|
3942
|
+
s3Location: function (value) { return ({ s3Location: value }); },
|
|
3943
|
+
_: function (name, value) { return ({ name: value }); },
|
|
3944
|
+
});
|
|
3945
|
+
};
|
|
3946
|
+
var serializeAws_restJson1FileBatchJobIdentifier = function (input, context) {
|
|
3947
|
+
return __assign(__assign({}, (input.fileName !== undefined && input.fileName !== null && { fileName: input.fileName })), (input.folderPath !== undefined && input.folderPath !== null && { folderPath: input.folderPath }));
|
|
3948
|
+
};
|
|
3949
|
+
var serializeAws_restJson1FsxStorageConfiguration = function (input, context) {
|
|
3950
|
+
return __assign(__assign({}, (input.fileSystemId !== undefined && input.fileSystemId !== null && { "file-system-id": input.fileSystemId })), (input.mountPoint !== undefined && input.mountPoint !== null && { "mount-point": input.mountPoint }));
|
|
3951
|
+
};
|
|
3952
|
+
var serializeAws_restJson1GdgAttributes = function (input, context) {
|
|
3953
|
+
return __assign(__assign({}, (input.limit !== undefined && input.limit !== null && { limit: input.limit })), (input.rollDisposition !== undefined &&
|
|
3954
|
+
input.rollDisposition !== null && { rollDisposition: input.rollDisposition }));
|
|
3955
|
+
};
|
|
3956
|
+
var serializeAws_restJson1HighAvailabilityConfig = function (input, context) {
|
|
3957
|
+
return __assign({}, (input.desiredCapacity !== undefined &&
|
|
3958
|
+
input.desiredCapacity !== null && { desiredCapacity: input.desiredCapacity }));
|
|
3959
|
+
};
|
|
3960
|
+
var serializeAws_restJson1PrimaryKey = function (input, context) {
|
|
3961
|
+
return __assign(__assign(__assign({}, (input.length !== undefined && input.length !== null && { length: input.length })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.offset !== undefined && input.offset !== null && { offset: input.offset }));
|
|
3962
|
+
};
|
|
3963
|
+
var serializeAws_restJson1RecordLength = function (input, context) {
|
|
3964
|
+
return __assign(__assign({}, (input.max !== undefined && input.max !== null && { max: input.max })), (input.min !== undefined && input.min !== null && { min: input.min }));
|
|
3965
|
+
};
|
|
3966
|
+
var serializeAws_restJson1ScriptBatchJobIdentifier = function (input, context) {
|
|
3967
|
+
return __assign({}, (input.scriptName !== undefined && input.scriptName !== null && { scriptName: input.scriptName }));
|
|
3968
|
+
};
|
|
3969
|
+
var serializeAws_restJson1StorageConfiguration = function (input, context) {
|
|
3970
|
+
return StorageConfiguration.visit(input, {
|
|
3971
|
+
efs: function (value) { return ({ efs: serializeAws_restJson1EfsStorageConfiguration(value, context) }); },
|
|
3972
|
+
fsx: function (value) { return ({ fsx: serializeAws_restJson1FsxStorageConfiguration(value, context) }); },
|
|
3973
|
+
_: function (name, value) { return ({ name: value }); },
|
|
3974
|
+
});
|
|
3975
|
+
};
|
|
3976
|
+
var serializeAws_restJson1StorageConfigurationList = function (input, context) {
|
|
3977
|
+
return input
|
|
3978
|
+
.filter(function (e) { return e != null; })
|
|
3979
|
+
.map(function (entry) {
|
|
3980
|
+
if (entry === null) {
|
|
3981
|
+
return null;
|
|
3982
|
+
}
|
|
3983
|
+
return serializeAws_restJson1StorageConfiguration(entry, context);
|
|
3984
|
+
});
|
|
3985
|
+
};
|
|
3986
|
+
var serializeAws_restJson1String50List = function (input, context) {
|
|
3987
|
+
return input
|
|
3988
|
+
.filter(function (e) { return e != null; })
|
|
3989
|
+
.map(function (entry) {
|
|
3990
|
+
if (entry === null) {
|
|
3991
|
+
return null;
|
|
3992
|
+
}
|
|
3993
|
+
return entry;
|
|
3994
|
+
});
|
|
3995
|
+
};
|
|
3996
|
+
var serializeAws_restJson1TagMap = function (input, context) {
|
|
3997
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
3998
|
+
var _b;
|
|
3999
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
4000
|
+
if (value === null) {
|
|
4001
|
+
return acc;
|
|
4002
|
+
}
|
|
4003
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
4004
|
+
}, {});
|
|
4005
|
+
};
|
|
4006
|
+
var serializeAws_restJson1VsamAttributes = function (input, context) {
|
|
4007
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.alternateKeys !== undefined &&
|
|
4008
|
+
input.alternateKeys !== null && {
|
|
4009
|
+
alternateKeys: serializeAws_restJson1AlternateKeyList(input.alternateKeys, context),
|
|
4010
|
+
})), (input.compressed !== undefined && input.compressed !== null && { compressed: input.compressed })), (input.encoding !== undefined && input.encoding !== null && { encoding: input.encoding })), (input.format !== undefined && input.format !== null && { format: input.format })), (input.primaryKey !== undefined &&
|
|
4011
|
+
input.primaryKey !== null && { primaryKey: serializeAws_restJson1PrimaryKey(input.primaryKey, context) }));
|
|
4012
|
+
};
|
|
4013
|
+
var deserializeAws_restJson1AlternateKey = function (output, context) {
|
|
4014
|
+
return {
|
|
4015
|
+
allowDuplicates: __expectBoolean(output.allowDuplicates),
|
|
4016
|
+
length: __expectInt32(output.length),
|
|
4017
|
+
name: __expectString(output.name),
|
|
4018
|
+
offset: __expectInt32(output.offset),
|
|
4019
|
+
};
|
|
4020
|
+
};
|
|
4021
|
+
var deserializeAws_restJson1AlternateKeyList = function (output, context) {
|
|
4022
|
+
var retVal = (output || [])
|
|
4023
|
+
.filter(function (e) { return e != null; })
|
|
4024
|
+
.map(function (entry) {
|
|
4025
|
+
if (entry === null) {
|
|
4026
|
+
return null;
|
|
4027
|
+
}
|
|
4028
|
+
return deserializeAws_restJson1AlternateKey(entry, context);
|
|
4029
|
+
});
|
|
4030
|
+
return retVal;
|
|
4031
|
+
};
|
|
4032
|
+
var deserializeAws_restJson1ApplicationSummary = function (output, context) {
|
|
4033
|
+
return {
|
|
4034
|
+
applicationArn: __expectString(output.applicationArn),
|
|
4035
|
+
applicationId: __expectString(output.applicationId),
|
|
4036
|
+
applicationVersion: __expectInt32(output.applicationVersion),
|
|
4037
|
+
creationTime: output.creationTime !== undefined && output.creationTime !== null
|
|
4038
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
4039
|
+
: undefined,
|
|
4040
|
+
deploymentStatus: __expectString(output.deploymentStatus),
|
|
4041
|
+
description: __expectString(output.description),
|
|
4042
|
+
engineType: __expectString(output.engineType),
|
|
4043
|
+
environmentId: __expectString(output.environmentId),
|
|
4044
|
+
lastStartTime: output.lastStartTime !== undefined && output.lastStartTime !== null
|
|
4045
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStartTime)))
|
|
4046
|
+
: undefined,
|
|
4047
|
+
name: __expectString(output.name),
|
|
4048
|
+
status: __expectString(output.status),
|
|
4049
|
+
versionStatus: __expectString(output.versionStatus),
|
|
4050
|
+
};
|
|
4051
|
+
};
|
|
4052
|
+
var deserializeAws_restJson1ApplicationSummaryList = function (output, context) {
|
|
4053
|
+
var retVal = (output || [])
|
|
4054
|
+
.filter(function (e) { return e != null; })
|
|
4055
|
+
.map(function (entry) {
|
|
4056
|
+
if (entry === null) {
|
|
4057
|
+
return null;
|
|
4058
|
+
}
|
|
4059
|
+
return deserializeAws_restJson1ApplicationSummary(entry, context);
|
|
4060
|
+
});
|
|
4061
|
+
return retVal;
|
|
4062
|
+
};
|
|
4063
|
+
var deserializeAws_restJson1ApplicationVersionSummary = function (output, context) {
|
|
4064
|
+
return {
|
|
4065
|
+
applicationVersion: __expectInt32(output.applicationVersion),
|
|
4066
|
+
creationTime: output.creationTime !== undefined && output.creationTime !== null
|
|
4067
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
4068
|
+
: undefined,
|
|
4069
|
+
status: __expectString(output.status),
|
|
4070
|
+
statusReason: __expectString(output.statusReason),
|
|
4071
|
+
};
|
|
4072
|
+
};
|
|
4073
|
+
var deserializeAws_restJson1ApplicationVersionSummaryList = function (output, context) {
|
|
4074
|
+
var retVal = (output || [])
|
|
4075
|
+
.filter(function (e) { return e != null; })
|
|
4076
|
+
.map(function (entry) {
|
|
4077
|
+
if (entry === null) {
|
|
4078
|
+
return null;
|
|
4079
|
+
}
|
|
4080
|
+
return deserializeAws_restJson1ApplicationVersionSummary(entry, context);
|
|
4081
|
+
});
|
|
4082
|
+
return retVal;
|
|
4083
|
+
};
|
|
4084
|
+
var deserializeAws_restJson1ArnList = function (output, context) {
|
|
4085
|
+
var retVal = (output || [])
|
|
4086
|
+
.filter(function (e) { return e != null; })
|
|
4087
|
+
.map(function (entry) {
|
|
4088
|
+
if (entry === null) {
|
|
4089
|
+
return null;
|
|
4090
|
+
}
|
|
4091
|
+
return __expectString(entry);
|
|
4092
|
+
});
|
|
4093
|
+
return retVal;
|
|
4094
|
+
};
|
|
4095
|
+
var deserializeAws_restJson1BatchJobDefinition = function (output, context) {
|
|
4096
|
+
if (output.fileBatchJobDefinition !== undefined && output.fileBatchJobDefinition !== null) {
|
|
4097
|
+
return {
|
|
4098
|
+
fileBatchJobDefinition: deserializeAws_restJson1FileBatchJobDefinition(output.fileBatchJobDefinition, context),
|
|
4099
|
+
};
|
|
4100
|
+
}
|
|
4101
|
+
if (output.scriptBatchJobDefinition !== undefined && output.scriptBatchJobDefinition !== null) {
|
|
4102
|
+
return {
|
|
4103
|
+
scriptBatchJobDefinition: deserializeAws_restJson1ScriptBatchJobDefinition(output.scriptBatchJobDefinition, context),
|
|
4104
|
+
};
|
|
4105
|
+
}
|
|
4106
|
+
return { $unknown: Object.entries(output)[0] };
|
|
4107
|
+
};
|
|
4108
|
+
var deserializeAws_restJson1BatchJobDefinitions = function (output, context) {
|
|
4109
|
+
var retVal = (output || [])
|
|
4110
|
+
.filter(function (e) { return e != null; })
|
|
4111
|
+
.map(function (entry) {
|
|
4112
|
+
if (entry === null) {
|
|
4113
|
+
return null;
|
|
4114
|
+
}
|
|
4115
|
+
return deserializeAws_restJson1BatchJobDefinition(__expectUnion(entry), context);
|
|
4116
|
+
});
|
|
4117
|
+
return retVal;
|
|
4118
|
+
};
|
|
4119
|
+
var deserializeAws_restJson1BatchJobExecutionSummary = function (output, context) {
|
|
4120
|
+
return {
|
|
4121
|
+
applicationId: __expectString(output.applicationId),
|
|
4122
|
+
endTime: output.endTime !== undefined && output.endTime !== null
|
|
4123
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime)))
|
|
4124
|
+
: undefined,
|
|
4125
|
+
executionId: __expectString(output.executionId),
|
|
4126
|
+
jobId: __expectString(output.jobId),
|
|
4127
|
+
jobName: __expectString(output.jobName),
|
|
4128
|
+
jobType: __expectString(output.jobType),
|
|
4129
|
+
startTime: output.startTime !== undefined && output.startTime !== null
|
|
4130
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime)))
|
|
4131
|
+
: undefined,
|
|
4132
|
+
status: __expectString(output.status),
|
|
4133
|
+
};
|
|
4134
|
+
};
|
|
4135
|
+
var deserializeAws_restJson1BatchJobExecutionSummaryList = function (output, context) {
|
|
4136
|
+
var retVal = (output || [])
|
|
4137
|
+
.filter(function (e) { return e != null; })
|
|
4138
|
+
.map(function (entry) {
|
|
4139
|
+
if (entry === null) {
|
|
4140
|
+
return null;
|
|
4141
|
+
}
|
|
4142
|
+
return deserializeAws_restJson1BatchJobExecutionSummary(entry, context);
|
|
4143
|
+
});
|
|
4144
|
+
return retVal;
|
|
4145
|
+
};
|
|
4146
|
+
var deserializeAws_restJson1DatasetDetailOrgAttributes = function (output, context) {
|
|
4147
|
+
if (output.gdg !== undefined && output.gdg !== null) {
|
|
4148
|
+
return {
|
|
4149
|
+
gdg: deserializeAws_restJson1GdgDetailAttributes(output.gdg, context),
|
|
4150
|
+
};
|
|
4151
|
+
}
|
|
4152
|
+
if (output.vsam !== undefined && output.vsam !== null) {
|
|
4153
|
+
return {
|
|
4154
|
+
vsam: deserializeAws_restJson1VsamDetailAttributes(output.vsam, context),
|
|
4155
|
+
};
|
|
4156
|
+
}
|
|
4157
|
+
return { $unknown: Object.entries(output)[0] };
|
|
4158
|
+
};
|
|
4159
|
+
var deserializeAws_restJson1DataSetImportSummary = function (output, context) {
|
|
4160
|
+
return {
|
|
4161
|
+
failed: __expectInt32(output.failed),
|
|
4162
|
+
inProgress: __expectInt32(output.inProgress),
|
|
4163
|
+
pending: __expectInt32(output.pending),
|
|
4164
|
+
succeeded: __expectInt32(output.succeeded),
|
|
4165
|
+
total: __expectInt32(output.total),
|
|
4166
|
+
};
|
|
4167
|
+
};
|
|
4168
|
+
var deserializeAws_restJson1DataSetImportTask = function (output, context) {
|
|
4169
|
+
return {
|
|
4170
|
+
status: __expectString(output.status),
|
|
4171
|
+
summary: output.summary !== undefined && output.summary !== null
|
|
4172
|
+
? deserializeAws_restJson1DataSetImportSummary(output.summary, context)
|
|
4173
|
+
: undefined,
|
|
4174
|
+
taskId: __expectString(output.taskId),
|
|
4175
|
+
};
|
|
4176
|
+
};
|
|
4177
|
+
var deserializeAws_restJson1DataSetImportTaskList = function (output, context) {
|
|
4178
|
+
var retVal = (output || [])
|
|
4179
|
+
.filter(function (e) { return e != null; })
|
|
4180
|
+
.map(function (entry) {
|
|
4181
|
+
if (entry === null) {
|
|
4182
|
+
return null;
|
|
4183
|
+
}
|
|
4184
|
+
return deserializeAws_restJson1DataSetImportTask(entry, context);
|
|
4185
|
+
});
|
|
4186
|
+
return retVal;
|
|
4187
|
+
};
|
|
4188
|
+
var deserializeAws_restJson1DataSetsSummaryList = function (output, context) {
|
|
4189
|
+
var retVal = (output || [])
|
|
4190
|
+
.filter(function (e) { return e != null; })
|
|
4191
|
+
.map(function (entry) {
|
|
4192
|
+
if (entry === null) {
|
|
4193
|
+
return null;
|
|
4194
|
+
}
|
|
4195
|
+
return deserializeAws_restJson1DataSetSummary(entry, context);
|
|
4196
|
+
});
|
|
4197
|
+
return retVal;
|
|
4198
|
+
};
|
|
4199
|
+
var deserializeAws_restJson1DataSetSummary = function (output, context) {
|
|
4200
|
+
return {
|
|
4201
|
+
creationTime: output.creationTime !== undefined && output.creationTime !== null
|
|
4202
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
4203
|
+
: undefined,
|
|
4204
|
+
dataSetName: __expectString(output.dataSetName),
|
|
4205
|
+
dataSetOrg: __expectString(output.dataSetOrg),
|
|
4206
|
+
format: __expectString(output.format),
|
|
4207
|
+
lastReferencedTime: output.lastReferencedTime !== undefined && output.lastReferencedTime !== null
|
|
4208
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastReferencedTime)))
|
|
4209
|
+
: undefined,
|
|
4210
|
+
lastUpdatedTime: output.lastUpdatedTime !== undefined && output.lastUpdatedTime !== null
|
|
4211
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime)))
|
|
4212
|
+
: undefined,
|
|
4213
|
+
};
|
|
4214
|
+
};
|
|
4215
|
+
var deserializeAws_restJson1DeployedVersionSummary = function (output, context) {
|
|
4216
|
+
return {
|
|
4217
|
+
applicationVersion: __expectInt32(output.applicationVersion),
|
|
4218
|
+
status: __expectString(output.status),
|
|
4219
|
+
statusReason: __expectString(output.statusReason),
|
|
4220
|
+
};
|
|
4221
|
+
};
|
|
4222
|
+
var deserializeAws_restJson1DeploymentList = function (output, context) {
|
|
4223
|
+
var retVal = (output || [])
|
|
4224
|
+
.filter(function (e) { return e != null; })
|
|
4225
|
+
.map(function (entry) {
|
|
4226
|
+
if (entry === null) {
|
|
4227
|
+
return null;
|
|
4228
|
+
}
|
|
4229
|
+
return deserializeAws_restJson1DeploymentSummary(entry, context);
|
|
4230
|
+
});
|
|
4231
|
+
return retVal;
|
|
4232
|
+
};
|
|
4233
|
+
var deserializeAws_restJson1DeploymentSummary = function (output, context) {
|
|
4234
|
+
return {
|
|
4235
|
+
applicationId: __expectString(output.applicationId),
|
|
4236
|
+
applicationVersion: __expectInt32(output.applicationVersion),
|
|
4237
|
+
creationTime: output.creationTime !== undefined && output.creationTime !== null
|
|
4238
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
4239
|
+
: undefined,
|
|
4240
|
+
deploymentId: __expectString(output.deploymentId),
|
|
4241
|
+
environmentId: __expectString(output.environmentId),
|
|
4242
|
+
status: __expectString(output.status),
|
|
4243
|
+
statusReason: __expectString(output.statusReason),
|
|
4244
|
+
};
|
|
4245
|
+
};
|
|
4246
|
+
var deserializeAws_restJson1EfsStorageConfiguration = function (output, context) {
|
|
4247
|
+
return {
|
|
4248
|
+
fileSystemId: __expectString(output["file-system-id"]),
|
|
4249
|
+
mountPoint: __expectString(output["mount-point"]),
|
|
4250
|
+
};
|
|
4251
|
+
};
|
|
4252
|
+
var deserializeAws_restJson1EngineVersionsSummary = function (output, context) {
|
|
4253
|
+
return {
|
|
4254
|
+
engineType: __expectString(output.engineType),
|
|
4255
|
+
engineVersion: __expectString(output.engineVersion),
|
|
4256
|
+
};
|
|
4257
|
+
};
|
|
4258
|
+
var deserializeAws_restJson1EngineVersionsSummaryList = function (output, context) {
|
|
4259
|
+
var retVal = (output || [])
|
|
4260
|
+
.filter(function (e) { return e != null; })
|
|
4261
|
+
.map(function (entry) {
|
|
4262
|
+
if (entry === null) {
|
|
4263
|
+
return null;
|
|
4264
|
+
}
|
|
4265
|
+
return deserializeAws_restJson1EngineVersionsSummary(entry, context);
|
|
4266
|
+
});
|
|
4267
|
+
return retVal;
|
|
4268
|
+
};
|
|
4269
|
+
var deserializeAws_restJson1EnvironmentSummary = function (output, context) {
|
|
4270
|
+
return {
|
|
4271
|
+
creationTime: output.creationTime !== undefined && output.creationTime !== null
|
|
4272
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
4273
|
+
: undefined,
|
|
4274
|
+
engineType: __expectString(output.engineType),
|
|
4275
|
+
engineVersion: __expectString(output.engineVersion),
|
|
4276
|
+
environmentArn: __expectString(output.environmentArn),
|
|
4277
|
+
environmentId: __expectString(output.environmentId),
|
|
4278
|
+
instanceType: __expectString(output.instanceType),
|
|
4279
|
+
name: __expectString(output.name),
|
|
4280
|
+
status: __expectString(output.status),
|
|
4281
|
+
};
|
|
4282
|
+
};
|
|
4283
|
+
var deserializeAws_restJson1EnvironmentSummaryList = function (output, context) {
|
|
4284
|
+
var retVal = (output || [])
|
|
4285
|
+
.filter(function (e) { return e != null; })
|
|
4286
|
+
.map(function (entry) {
|
|
4287
|
+
if (entry === null) {
|
|
4288
|
+
return null;
|
|
4289
|
+
}
|
|
4290
|
+
return deserializeAws_restJson1EnvironmentSummary(entry, context);
|
|
4291
|
+
});
|
|
4292
|
+
return retVal;
|
|
4293
|
+
};
|
|
4294
|
+
var deserializeAws_restJson1FileBatchJobDefinition = function (output, context) {
|
|
4295
|
+
return {
|
|
4296
|
+
fileName: __expectString(output.fileName),
|
|
4297
|
+
folderPath: __expectString(output.folderPath),
|
|
4298
|
+
};
|
|
4299
|
+
};
|
|
4300
|
+
var deserializeAws_restJson1FsxStorageConfiguration = function (output, context) {
|
|
4301
|
+
return {
|
|
4302
|
+
fileSystemId: __expectString(output["file-system-id"]),
|
|
4303
|
+
mountPoint: __expectString(output["mount-point"]),
|
|
4304
|
+
};
|
|
4305
|
+
};
|
|
4306
|
+
var deserializeAws_restJson1GdgDetailAttributes = function (output, context) {
|
|
4307
|
+
return {
|
|
4308
|
+
limit: __expectInt32(output.limit),
|
|
4309
|
+
rollDisposition: __expectString(output.rollDisposition),
|
|
4310
|
+
};
|
|
4311
|
+
};
|
|
4312
|
+
var deserializeAws_restJson1HighAvailabilityConfig = function (output, context) {
|
|
4313
|
+
return {
|
|
4314
|
+
desiredCapacity: __expectInt32(output.desiredCapacity),
|
|
4315
|
+
};
|
|
4316
|
+
};
|
|
4317
|
+
var deserializeAws_restJson1LogGroupSummaries = function (output, context) {
|
|
4318
|
+
var retVal = (output || [])
|
|
4319
|
+
.filter(function (e) { return e != null; })
|
|
4320
|
+
.map(function (entry) {
|
|
4321
|
+
if (entry === null) {
|
|
4322
|
+
return null;
|
|
4323
|
+
}
|
|
4324
|
+
return deserializeAws_restJson1LogGroupSummary(entry, context);
|
|
4325
|
+
});
|
|
4326
|
+
return retVal;
|
|
4327
|
+
};
|
|
4328
|
+
var deserializeAws_restJson1LogGroupSummary = function (output, context) {
|
|
4329
|
+
return {
|
|
4330
|
+
logGroupName: __expectString(output.logGroupName),
|
|
4331
|
+
logType: __expectString(output.logType),
|
|
4332
|
+
};
|
|
4333
|
+
};
|
|
4334
|
+
var deserializeAws_restJson1MaintenanceSchedule = function (output, context) {
|
|
4335
|
+
return {
|
|
4336
|
+
endTime: output.endTime !== undefined && output.endTime !== null
|
|
4337
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime)))
|
|
4338
|
+
: undefined,
|
|
4339
|
+
startTime: output.startTime !== undefined && output.startTime !== null
|
|
4340
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime)))
|
|
4341
|
+
: undefined,
|
|
4342
|
+
};
|
|
4343
|
+
};
|
|
4344
|
+
var deserializeAws_restJson1PendingMaintenance = function (output, context) {
|
|
4345
|
+
return {
|
|
4346
|
+
engineVersion: __expectString(output.engineVersion),
|
|
4347
|
+
schedule: output.schedule !== undefined && output.schedule !== null
|
|
4348
|
+
? deserializeAws_restJson1MaintenanceSchedule(output.schedule, context)
|
|
4349
|
+
: undefined,
|
|
4350
|
+
};
|
|
4351
|
+
};
|
|
4352
|
+
var deserializeAws_restJson1PortList = function (output, context) {
|
|
4353
|
+
var retVal = (output || [])
|
|
4354
|
+
.filter(function (e) { return e != null; })
|
|
4355
|
+
.map(function (entry) {
|
|
4356
|
+
if (entry === null) {
|
|
4357
|
+
return null;
|
|
4358
|
+
}
|
|
4359
|
+
return __expectInt32(entry);
|
|
4360
|
+
});
|
|
4361
|
+
return retVal;
|
|
4362
|
+
};
|
|
4363
|
+
var deserializeAws_restJson1PrimaryKey = function (output, context) {
|
|
4364
|
+
return {
|
|
4365
|
+
length: __expectInt32(output.length),
|
|
4366
|
+
name: __expectString(output.name),
|
|
4367
|
+
offset: __expectInt32(output.offset),
|
|
4368
|
+
};
|
|
4369
|
+
};
|
|
4370
|
+
var deserializeAws_restJson1ScriptBatchJobDefinition = function (output, context) {
|
|
4371
|
+
return {
|
|
4372
|
+
scriptName: __expectString(output.scriptName),
|
|
4373
|
+
};
|
|
4374
|
+
};
|
|
4375
|
+
var deserializeAws_restJson1StorageConfiguration = function (output, context) {
|
|
4376
|
+
if (output.efs !== undefined && output.efs !== null) {
|
|
4377
|
+
return {
|
|
4378
|
+
efs: deserializeAws_restJson1EfsStorageConfiguration(output.efs, context),
|
|
4379
|
+
};
|
|
4380
|
+
}
|
|
4381
|
+
if (output.fsx !== undefined && output.fsx !== null) {
|
|
4382
|
+
return {
|
|
4383
|
+
fsx: deserializeAws_restJson1FsxStorageConfiguration(output.fsx, context),
|
|
4384
|
+
};
|
|
4385
|
+
}
|
|
4386
|
+
return { $unknown: Object.entries(output)[0] };
|
|
4387
|
+
};
|
|
4388
|
+
var deserializeAws_restJson1StorageConfigurationList = function (output, context) {
|
|
4389
|
+
var retVal = (output || [])
|
|
4390
|
+
.filter(function (e) { return e != null; })
|
|
4391
|
+
.map(function (entry) {
|
|
4392
|
+
if (entry === null) {
|
|
4393
|
+
return null;
|
|
4394
|
+
}
|
|
4395
|
+
return deserializeAws_restJson1StorageConfiguration(__expectUnion(entry), context);
|
|
4396
|
+
});
|
|
4397
|
+
return retVal;
|
|
4398
|
+
};
|
|
4399
|
+
var deserializeAws_restJson1String50List = function (output, context) {
|
|
4400
|
+
var retVal = (output || [])
|
|
4401
|
+
.filter(function (e) { return e != null; })
|
|
4402
|
+
.map(function (entry) {
|
|
4403
|
+
if (entry === null) {
|
|
4404
|
+
return null;
|
|
4405
|
+
}
|
|
4406
|
+
return __expectString(entry);
|
|
4407
|
+
});
|
|
4408
|
+
return retVal;
|
|
4409
|
+
};
|
|
4410
|
+
var deserializeAws_restJson1TagMap = function (output, context) {
|
|
4411
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
4412
|
+
var _b;
|
|
4413
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
4414
|
+
if (value === null) {
|
|
4415
|
+
return acc;
|
|
4416
|
+
}
|
|
4417
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
4418
|
+
}, {});
|
|
4419
|
+
};
|
|
4420
|
+
var deserializeAws_restJson1ValidationExceptionField = function (output, context) {
|
|
4421
|
+
return {
|
|
4422
|
+
message: __expectString(output.message),
|
|
4423
|
+
name: __expectString(output.name),
|
|
4424
|
+
};
|
|
4425
|
+
};
|
|
4426
|
+
var deserializeAws_restJson1ValidationExceptionFieldList = function (output, context) {
|
|
4427
|
+
var retVal = (output || [])
|
|
4428
|
+
.filter(function (e) { return e != null; })
|
|
4429
|
+
.map(function (entry) {
|
|
4430
|
+
if (entry === null) {
|
|
4431
|
+
return null;
|
|
4432
|
+
}
|
|
4433
|
+
return deserializeAws_restJson1ValidationExceptionField(entry, context);
|
|
4434
|
+
});
|
|
4435
|
+
return retVal;
|
|
4436
|
+
};
|
|
4437
|
+
var deserializeAws_restJson1VsamDetailAttributes = function (output, context) {
|
|
4438
|
+
return {
|
|
4439
|
+
alternateKeys: output.alternateKeys !== undefined && output.alternateKeys !== null
|
|
4440
|
+
? deserializeAws_restJson1AlternateKeyList(output.alternateKeys, context)
|
|
4441
|
+
: undefined,
|
|
4442
|
+
cacheAtStartup: __expectBoolean(output.cacheAtStartup),
|
|
4443
|
+
compressed: __expectBoolean(output.compressed),
|
|
4444
|
+
encoding: __expectString(output.encoding),
|
|
4445
|
+
primaryKey: output.primaryKey !== undefined && output.primaryKey !== null
|
|
4446
|
+
? deserializeAws_restJson1PrimaryKey(output.primaryKey, context)
|
|
4447
|
+
: undefined,
|
|
4448
|
+
recordFormat: __expectString(output.recordFormat),
|
|
4449
|
+
};
|
|
4450
|
+
};
|
|
4451
|
+
var deserializeMetadata = function (output) {
|
|
4452
|
+
var _a;
|
|
4453
|
+
return ({
|
|
4454
|
+
httpStatusCode: output.statusCode,
|
|
4455
|
+
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
|
|
4456
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
4457
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
4458
|
+
});
|
|
4459
|
+
};
|
|
4460
|
+
var collectBody = function (streamBody, context) {
|
|
4461
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
4462
|
+
if (streamBody instanceof Uint8Array) {
|
|
4463
|
+
return Promise.resolve(streamBody);
|
|
4464
|
+
}
|
|
4465
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
4466
|
+
};
|
|
4467
|
+
var collectBodyString = function (streamBody, context) {
|
|
4468
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
4469
|
+
};
|
|
4470
|
+
var isSerializableHeaderValue = function (value) {
|
|
4471
|
+
return value !== undefined &&
|
|
4472
|
+
value !== null &&
|
|
4473
|
+
value !== "" &&
|
|
4474
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
4475
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
4476
|
+
};
|
|
4477
|
+
var parseBody = function (streamBody, context) {
|
|
4478
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
4479
|
+
if (encoded.length) {
|
|
4480
|
+
return JSON.parse(encoded);
|
|
4481
|
+
}
|
|
4482
|
+
return {};
|
|
4483
|
+
});
|
|
4484
|
+
};
|
|
4485
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
4486
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
4487
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
4488
|
+
var cleanValue = rawValue;
|
|
4489
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
4490
|
+
cleanValue = cleanValue.split(":")[0];
|
|
4491
|
+
}
|
|
4492
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
4493
|
+
cleanValue = cleanValue.split("#")[1];
|
|
4494
|
+
}
|
|
4495
|
+
return cleanValue;
|
|
4496
|
+
};
|
|
4497
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
4498
|
+
if (headerKey !== undefined) {
|
|
4499
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
4500
|
+
}
|
|
4501
|
+
if (data.code !== undefined) {
|
|
4502
|
+
return sanitizeErrorCode(data.code);
|
|
4503
|
+
}
|
|
4504
|
+
if (data["__type"] !== undefined) {
|
|
4505
|
+
return sanitizeErrorCode(data["__type"]);
|
|
4506
|
+
}
|
|
4507
|
+
return "";
|
|
4508
|
+
};
|