@aws-sdk/client-serverlessapplicationrepository 3.183.0 → 3.186.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 +19 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/ServerlessApplicationRepository.js +65 -58
- package/dist-es/ServerlessApplicationRepositoryClient.js +28 -22
- package/dist-es/commands/CreateApplicationCommand.js +28 -21
- package/dist-es/commands/CreateApplicationVersionCommand.js +28 -21
- package/dist-es/commands/CreateCloudFormationChangeSetCommand.js +28 -21
- package/dist-es/commands/CreateCloudFormationTemplateCommand.js +28 -21
- package/dist-es/commands/DeleteApplicationCommand.js +29 -22
- package/dist-es/commands/GetApplicationCommand.js +28 -21
- package/dist-es/commands/GetApplicationPolicyCommand.js +28 -21
- package/dist-es/commands/GetCloudFormationTemplateCommand.js +28 -21
- package/dist-es/commands/ListApplicationDependenciesCommand.js +28 -21
- package/dist-es/commands/ListApplicationVersionsCommand.js +28 -21
- package/dist-es/commands/ListApplicationsCommand.js +28 -21
- package/dist-es/commands/PutApplicationPolicyCommand.js +28 -21
- package/dist-es/commands/UnshareApplicationCommand.js +29 -22
- package/dist-es/commands/UpdateApplicationCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ServerlessApplicationRepositoryServiceException.js +10 -5
- package/dist-es/models/models_0.js +115 -186
- package/dist-es/pagination/ListApplicationDependenciesPaginator.js +68 -25
- package/dist-es/pagination/ListApplicationVersionsPaginator.js +68 -25
- package/dist-es/pagination/ListApplicationsPaginator.js +68 -25
- package/dist-es/protocols/Aws_restJson1.js +1704 -1291
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +33 -33
|
@@ -1,1310 +1,1705 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
3
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { BadRequestException, ConflictException, ForbiddenException, InternalServerErrorException, NotFoundException, TooManyRequestsException, } from "../models/models_0";
|
|
4
5
|
import { ServerlessApplicationRepositoryServiceException as __BaseException } from "../models/ServerlessApplicationRepositoryServiceException";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...(input.TemplateUrl != null && { templateUrl: input.TemplateUrl }),
|
|
6
|
+
export var serializeAws_restJson1CreateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
17
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Author != null && { author: input.Author })), (input.Description != null && { description: input.Description })), (input.HomePageUrl != null && { homePageUrl: input.HomePageUrl })), (input.Labels != null && { labels: serializeAws_restJson1__listOf__string(input.Labels, context) })), (input.LicenseBody != null && { licenseBody: input.LicenseBody })), (input.LicenseUrl != null && { licenseUrl: input.LicenseUrl })), (input.Name != null && { name: input.Name })), (input.ReadmeBody != null && { readmeBody: input.ReadmeBody })), (input.ReadmeUrl != null && { readmeUrl: input.ReadmeUrl })), (input.SemanticVersion != null && { semanticVersion: input.SemanticVersion })), (input.SourceCodeArchiveUrl != null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl })), (input.SourceCodeUrl != null && { sourceCodeUrl: input.SourceCodeUrl })), (input.SpdxLicenseId != null && { spdxLicenseId: input.SpdxLicenseId })), (input.TemplateBody != null && { templateBody: input.TemplateBody })), (input.TemplateUrl != null && { templateUrl: input.TemplateUrl })));
|
|
18
|
+
return [2, new __HttpRequest({
|
|
19
|
+
protocol: protocol,
|
|
20
|
+
hostname: hostname,
|
|
21
|
+
port: port,
|
|
22
|
+
method: "POST",
|
|
23
|
+
headers: headers,
|
|
24
|
+
path: resolvedPath,
|
|
25
|
+
body: body,
|
|
26
|
+
})];
|
|
27
|
+
}
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
}); };
|
|
30
|
+
export var serializeAws_restJson1CreateApplicationVersionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
31
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
32
|
+
return __generator(this, function (_c) {
|
|
33
|
+
switch (_c.label) {
|
|
34
|
+
case 0: return [4, context.endpoint()];
|
|
35
|
+
case 1:
|
|
36
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
37
|
+
headers = {
|
|
38
|
+
"content-type": "application/json",
|
|
39
|
+
};
|
|
40
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
41
|
+
"/applications/{ApplicationId}/versions/{SemanticVersion}";
|
|
42
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
43
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "SemanticVersion", function () { return input.SemanticVersion; }, "{SemanticVersion}", false);
|
|
44
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.SourceCodeArchiveUrl != null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl })), (input.SourceCodeUrl != null && { sourceCodeUrl: input.SourceCodeUrl })), (input.TemplateBody != null && { templateBody: input.TemplateBody })), (input.TemplateUrl != null && { templateUrl: input.TemplateUrl })));
|
|
45
|
+
return [2, new __HttpRequest({
|
|
46
|
+
protocol: protocol,
|
|
47
|
+
hostname: hostname,
|
|
48
|
+
port: port,
|
|
49
|
+
method: "PUT",
|
|
50
|
+
headers: headers,
|
|
51
|
+
path: resolvedPath,
|
|
52
|
+
body: body,
|
|
53
|
+
})];
|
|
54
|
+
}
|
|
37
55
|
});
|
|
38
|
-
};
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
}); };
|
|
57
|
+
export var serializeAws_restJson1CreateCloudFormationChangeSetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
59
|
+
return __generator(this, function (_c) {
|
|
60
|
+
switch (_c.label) {
|
|
61
|
+
case 0: return [4, context.endpoint()];
|
|
62
|
+
case 1:
|
|
63
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
64
|
+
headers = {
|
|
65
|
+
"content-type": "application/json",
|
|
66
|
+
};
|
|
67
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}/changesets";
|
|
68
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
69
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Capabilities != null && {
|
|
70
|
+
capabilities: serializeAws_restJson1__listOf__string(input.Capabilities, context),
|
|
71
|
+
})), (input.ChangeSetName != null && { changeSetName: input.ChangeSetName })), (input.ClientToken != null && { clientToken: input.ClientToken })), (input.Description != null && { description: input.Description })), (input.NotificationArns != null && {
|
|
72
|
+
notificationArns: serializeAws_restJson1__listOf__string(input.NotificationArns, context),
|
|
73
|
+
})), (input.ParameterOverrides != null && {
|
|
74
|
+
parameterOverrides: serializeAws_restJson1__listOfParameterValue(input.ParameterOverrides, context),
|
|
75
|
+
})), (input.ResourceTypes != null && {
|
|
76
|
+
resourceTypes: serializeAws_restJson1__listOf__string(input.ResourceTypes, context),
|
|
77
|
+
})), (input.RollbackConfiguration != null && {
|
|
78
|
+
rollbackConfiguration: serializeAws_restJson1RollbackConfiguration(input.RollbackConfiguration, context),
|
|
79
|
+
})), (input.SemanticVersion != null && { semanticVersion: input.SemanticVersion })), (input.StackName != null && { stackName: input.StackName })), (input.Tags != null && { tags: serializeAws_restJson1__listOfTag(input.Tags, context) })), (input.TemplateId != null && { templateId: input.TemplateId })));
|
|
80
|
+
return [2, new __HttpRequest({
|
|
81
|
+
protocol: protocol,
|
|
82
|
+
hostname: hostname,
|
|
83
|
+
port: port,
|
|
84
|
+
method: "POST",
|
|
85
|
+
headers: headers,
|
|
86
|
+
path: resolvedPath,
|
|
87
|
+
body: body,
|
|
88
|
+
})];
|
|
89
|
+
}
|
|
54
90
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
91
|
+
}); };
|
|
92
|
+
export var serializeAws_restJson1CreateCloudFormationTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
93
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
94
|
+
return __generator(this, function (_c) {
|
|
95
|
+
switch (_c.label) {
|
|
96
|
+
case 0: return [4, context.endpoint()];
|
|
97
|
+
case 1:
|
|
98
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
99
|
+
headers = {
|
|
100
|
+
"content-type": "application/json",
|
|
101
|
+
};
|
|
102
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}/templates";
|
|
103
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
104
|
+
body = JSON.stringify(__assign({}, (input.SemanticVersion != null && { semanticVersion: input.SemanticVersion })));
|
|
105
|
+
return [2, new __HttpRequest({
|
|
106
|
+
protocol: protocol,
|
|
107
|
+
hostname: hostname,
|
|
108
|
+
port: port,
|
|
109
|
+
method: "POST",
|
|
110
|
+
headers: headers,
|
|
111
|
+
path: resolvedPath,
|
|
112
|
+
body: body,
|
|
113
|
+
})];
|
|
114
|
+
}
|
|
63
115
|
});
|
|
64
|
-
};
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}),
|
|
86
|
-
...(input.ResourceTypes != null && {
|
|
87
|
-
resourceTypes: serializeAws_restJson1__listOf__string(input.ResourceTypes, context),
|
|
88
|
-
}),
|
|
89
|
-
...(input.RollbackConfiguration != null && {
|
|
90
|
-
rollbackConfiguration: serializeAws_restJson1RollbackConfiguration(input.RollbackConfiguration, context),
|
|
91
|
-
}),
|
|
92
|
-
...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }),
|
|
93
|
-
...(input.StackName != null && { stackName: input.StackName }),
|
|
94
|
-
...(input.Tags != null && { tags: serializeAws_restJson1__listOfTag(input.Tags, context) }),
|
|
95
|
-
...(input.TemplateId != null && { templateId: input.TemplateId }),
|
|
116
|
+
}); };
|
|
117
|
+
export var serializeAws_restJson1DeleteApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
118
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
119
|
+
return __generator(this, function (_c) {
|
|
120
|
+
switch (_c.label) {
|
|
121
|
+
case 0: return [4, context.endpoint()];
|
|
122
|
+
case 1:
|
|
123
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
124
|
+
headers = {};
|
|
125
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}";
|
|
126
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
127
|
+
return [2, new __HttpRequest({
|
|
128
|
+
protocol: protocol,
|
|
129
|
+
hostname: hostname,
|
|
130
|
+
port: port,
|
|
131
|
+
method: "DELETE",
|
|
132
|
+
headers: headers,
|
|
133
|
+
path: resolvedPath,
|
|
134
|
+
body: body,
|
|
135
|
+
})];
|
|
136
|
+
}
|
|
96
137
|
});
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
138
|
+
}); };
|
|
139
|
+
export var serializeAws_restJson1GetApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
140
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
141
|
+
return __generator(this, function (_c) {
|
|
142
|
+
switch (_c.label) {
|
|
143
|
+
case 0: return [4, context.endpoint()];
|
|
144
|
+
case 1:
|
|
145
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
146
|
+
headers = {};
|
|
147
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}";
|
|
148
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
149
|
+
query = map({
|
|
150
|
+
semanticVersion: [, input.SemanticVersion],
|
|
151
|
+
});
|
|
152
|
+
return [2, new __HttpRequest({
|
|
153
|
+
protocol: protocol,
|
|
154
|
+
hostname: hostname,
|
|
155
|
+
port: port,
|
|
156
|
+
method: "GET",
|
|
157
|
+
headers: headers,
|
|
158
|
+
path: resolvedPath,
|
|
159
|
+
query: query,
|
|
160
|
+
body: body,
|
|
161
|
+
})];
|
|
162
|
+
}
|
|
105
163
|
});
|
|
106
|
-
};
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
164
|
+
}); };
|
|
165
|
+
export var serializeAws_restJson1GetApplicationPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
166
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
167
|
+
return __generator(this, function (_c) {
|
|
168
|
+
switch (_c.label) {
|
|
169
|
+
case 0: return [4, context.endpoint()];
|
|
170
|
+
case 1:
|
|
171
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
172
|
+
headers = {};
|
|
173
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}/policy";
|
|
174
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
175
|
+
return [2, new __HttpRequest({
|
|
176
|
+
protocol: protocol,
|
|
177
|
+
hostname: hostname,
|
|
178
|
+
port: port,
|
|
179
|
+
method: "GET",
|
|
180
|
+
headers: headers,
|
|
181
|
+
path: resolvedPath,
|
|
182
|
+
body: body,
|
|
183
|
+
})];
|
|
184
|
+
}
|
|
117
185
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
186
|
+
}); };
|
|
187
|
+
export var serializeAws_restJson1GetCloudFormationTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
188
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, 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 || "") +
|
|
196
|
+
"/applications/{ApplicationId}/templates/{TemplateId}";
|
|
197
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
198
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "TemplateId", function () { return input.TemplateId; }, "{TemplateId}", false);
|
|
199
|
+
return [2, new __HttpRequest({
|
|
200
|
+
protocol: protocol,
|
|
201
|
+
hostname: hostname,
|
|
202
|
+
port: port,
|
|
203
|
+
method: "GET",
|
|
204
|
+
headers: headers,
|
|
205
|
+
path: resolvedPath,
|
|
206
|
+
body: body,
|
|
207
|
+
})];
|
|
208
|
+
}
|
|
126
209
|
});
|
|
127
|
-
};
|
|
128
|
-
export
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
210
|
+
}); };
|
|
211
|
+
export var serializeAws_restJson1ListApplicationDependenciesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
212
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
213
|
+
return __generator(this, function (_c) {
|
|
214
|
+
switch (_c.label) {
|
|
215
|
+
case 0: return [4, context.endpoint()];
|
|
216
|
+
case 1:
|
|
217
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
218
|
+
headers = {};
|
|
219
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
220
|
+
"/applications/{ApplicationId}/dependencies";
|
|
221
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
222
|
+
query = map({
|
|
223
|
+
maxItems: [function () { return input.MaxItems !== void 0; }, function () { return input.MaxItems.toString(); }],
|
|
224
|
+
nextToken: [, input.NextToken],
|
|
225
|
+
semanticVersion: [, input.SemanticVersion],
|
|
226
|
+
});
|
|
227
|
+
return [2, new __HttpRequest({
|
|
228
|
+
protocol: protocol,
|
|
229
|
+
hostname: hostname,
|
|
230
|
+
port: port,
|
|
231
|
+
method: "GET",
|
|
232
|
+
headers: headers,
|
|
233
|
+
path: resolvedPath,
|
|
234
|
+
query: query,
|
|
235
|
+
body: body,
|
|
236
|
+
})];
|
|
237
|
+
}
|
|
142
238
|
});
|
|
143
|
-
};
|
|
144
|
-
export
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
239
|
+
}); };
|
|
240
|
+
export var serializeAws_restJson1ListApplicationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
241
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
242
|
+
return __generator(this, function (_c) {
|
|
243
|
+
switch (_c.label) {
|
|
244
|
+
case 0: return [4, context.endpoint()];
|
|
245
|
+
case 1:
|
|
246
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
247
|
+
headers = {};
|
|
248
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
249
|
+
query = map({
|
|
250
|
+
maxItems: [function () { return input.MaxItems !== void 0; }, function () { return input.MaxItems.toString(); }],
|
|
251
|
+
nextToken: [, input.NextToken],
|
|
252
|
+
});
|
|
253
|
+
return [2, new __HttpRequest({
|
|
254
|
+
protocol: protocol,
|
|
255
|
+
hostname: hostname,
|
|
256
|
+
port: port,
|
|
257
|
+
method: "GET",
|
|
258
|
+
headers: headers,
|
|
259
|
+
path: resolvedPath,
|
|
260
|
+
query: query,
|
|
261
|
+
body: body,
|
|
262
|
+
})];
|
|
263
|
+
}
|
|
151
264
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
265
|
+
}); };
|
|
266
|
+
export var serializeAws_restJson1ListApplicationVersionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
267
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
268
|
+
return __generator(this, function (_c) {
|
|
269
|
+
switch (_c.label) {
|
|
270
|
+
case 0: return [4, context.endpoint()];
|
|
271
|
+
case 1:
|
|
272
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
273
|
+
headers = {};
|
|
274
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}/versions";
|
|
275
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
276
|
+
query = map({
|
|
277
|
+
maxItems: [function () { return input.MaxItems !== void 0; }, function () { return input.MaxItems.toString(); }],
|
|
278
|
+
nextToken: [, input.NextToken],
|
|
279
|
+
});
|
|
280
|
+
return [2, new __HttpRequest({
|
|
281
|
+
protocol: protocol,
|
|
282
|
+
hostname: hostname,
|
|
283
|
+
port: port,
|
|
284
|
+
method: "GET",
|
|
285
|
+
headers: headers,
|
|
286
|
+
path: resolvedPath,
|
|
287
|
+
query: query,
|
|
288
|
+
body: body,
|
|
289
|
+
})];
|
|
290
|
+
}
|
|
162
291
|
});
|
|
163
|
-
};
|
|
164
|
-
export
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
292
|
+
}); };
|
|
293
|
+
export var serializeAws_restJson1PutApplicationPolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
294
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
295
|
+
return __generator(this, function (_c) {
|
|
296
|
+
switch (_c.label) {
|
|
297
|
+
case 0: return [4, context.endpoint()];
|
|
298
|
+
case 1:
|
|
299
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
300
|
+
headers = {
|
|
301
|
+
"content-type": "application/json",
|
|
302
|
+
};
|
|
303
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}/policy";
|
|
304
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
305
|
+
body = JSON.stringify(__assign({}, (input.Statements != null && {
|
|
306
|
+
statements: serializeAws_restJson1__listOfApplicationPolicyStatement(input.Statements, context),
|
|
307
|
+
})));
|
|
308
|
+
return [2, new __HttpRequest({
|
|
309
|
+
protocol: protocol,
|
|
310
|
+
hostname: hostname,
|
|
311
|
+
port: port,
|
|
312
|
+
method: "PUT",
|
|
313
|
+
headers: headers,
|
|
314
|
+
path: resolvedPath,
|
|
315
|
+
body: body,
|
|
316
|
+
})];
|
|
317
|
+
}
|
|
178
318
|
});
|
|
179
|
-
};
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
319
|
+
}); };
|
|
320
|
+
export var serializeAws_restJson1UnshareApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
321
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
322
|
+
return __generator(this, function (_c) {
|
|
323
|
+
switch (_c.label) {
|
|
324
|
+
case 0: return [4, context.endpoint()];
|
|
325
|
+
case 1:
|
|
326
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
327
|
+
headers = {
|
|
328
|
+
"content-type": "application/json",
|
|
329
|
+
};
|
|
330
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}/unshare";
|
|
331
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
332
|
+
body = JSON.stringify(__assign({}, (input.OrganizationId != null && { organizationId: input.OrganizationId })));
|
|
333
|
+
return [2, new __HttpRequest({
|
|
334
|
+
protocol: protocol,
|
|
335
|
+
hostname: hostname,
|
|
336
|
+
port: port,
|
|
337
|
+
method: "POST",
|
|
338
|
+
headers: headers,
|
|
339
|
+
path: resolvedPath,
|
|
340
|
+
body: body,
|
|
341
|
+
})];
|
|
342
|
+
}
|
|
196
343
|
});
|
|
197
|
-
};
|
|
198
|
-
export
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
344
|
+
}); };
|
|
345
|
+
export var serializeAws_restJson1UpdateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
346
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
347
|
+
return __generator(this, function (_c) {
|
|
348
|
+
switch (_c.label) {
|
|
349
|
+
case 0: return [4, context.endpoint()];
|
|
350
|
+
case 1:
|
|
351
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
352
|
+
headers = {
|
|
353
|
+
"content-type": "application/json",
|
|
354
|
+
};
|
|
355
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{ApplicationId}";
|
|
356
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ApplicationId", function () { return input.ApplicationId; }, "{ApplicationId}", false);
|
|
357
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Author != null && { author: input.Author })), (input.Description != null && { description: input.Description })), (input.HomePageUrl != null && { homePageUrl: input.HomePageUrl })), (input.Labels != null && { labels: serializeAws_restJson1__listOf__string(input.Labels, context) })), (input.ReadmeBody != null && { readmeBody: input.ReadmeBody })), (input.ReadmeUrl != null && { readmeUrl: input.ReadmeUrl })));
|
|
358
|
+
return [2, new __HttpRequest({
|
|
359
|
+
protocol: protocol,
|
|
360
|
+
hostname: hostname,
|
|
361
|
+
port: port,
|
|
362
|
+
method: "PATCH",
|
|
363
|
+
headers: headers,
|
|
364
|
+
path: resolvedPath,
|
|
365
|
+
body: body,
|
|
366
|
+
})];
|
|
367
|
+
}
|
|
208
368
|
});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
369
|
+
}); };
|
|
370
|
+
export var deserializeAws_restJson1CreateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
371
|
+
var contents, data, _a, _b;
|
|
372
|
+
return __generator(this, function (_c) {
|
|
373
|
+
switch (_c.label) {
|
|
374
|
+
case 0:
|
|
375
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
376
|
+
return [2, deserializeAws_restJson1CreateApplicationCommandError(output, context)];
|
|
377
|
+
}
|
|
378
|
+
contents = map({
|
|
379
|
+
$metadata: deserializeMetadata(output),
|
|
380
|
+
});
|
|
381
|
+
_a = __expectNonNull;
|
|
382
|
+
_b = __expectObject;
|
|
383
|
+
return [4, parseBody(output.body, context)];
|
|
384
|
+
case 1:
|
|
385
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
386
|
+
if (data.applicationId != null) {
|
|
387
|
+
contents.ApplicationId = __expectString(data.applicationId);
|
|
388
|
+
}
|
|
389
|
+
if (data.author != null) {
|
|
390
|
+
contents.Author = __expectString(data.author);
|
|
391
|
+
}
|
|
392
|
+
if (data.creationTime != null) {
|
|
393
|
+
contents.CreationTime = __expectString(data.creationTime);
|
|
394
|
+
}
|
|
395
|
+
if (data.description != null) {
|
|
396
|
+
contents.Description = __expectString(data.description);
|
|
397
|
+
}
|
|
398
|
+
if (data.homePageUrl != null) {
|
|
399
|
+
contents.HomePageUrl = __expectString(data.homePageUrl);
|
|
400
|
+
}
|
|
401
|
+
if (data.isVerifiedAuthor != null) {
|
|
402
|
+
contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor);
|
|
403
|
+
}
|
|
404
|
+
if (data.labels != null) {
|
|
405
|
+
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
406
|
+
}
|
|
407
|
+
if (data.licenseUrl != null) {
|
|
408
|
+
contents.LicenseUrl = __expectString(data.licenseUrl);
|
|
409
|
+
}
|
|
410
|
+
if (data.name != null) {
|
|
411
|
+
contents.Name = __expectString(data.name);
|
|
412
|
+
}
|
|
413
|
+
if (data.readmeUrl != null) {
|
|
414
|
+
contents.ReadmeUrl = __expectString(data.readmeUrl);
|
|
415
|
+
}
|
|
416
|
+
if (data.spdxLicenseId != null) {
|
|
417
|
+
contents.SpdxLicenseId = __expectString(data.spdxLicenseId);
|
|
418
|
+
}
|
|
419
|
+
if (data.verifiedAuthorUrl != null) {
|
|
420
|
+
contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl);
|
|
421
|
+
}
|
|
422
|
+
if (data.version != null) {
|
|
423
|
+
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
424
|
+
}
|
|
425
|
+
return [2, contents];
|
|
426
|
+
}
|
|
219
427
|
});
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
428
|
+
}); };
|
|
429
|
+
var deserializeAws_restJson1CreateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
430
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
431
|
+
var _c;
|
|
432
|
+
return __generator(this, function (_d) {
|
|
433
|
+
switch (_d.label) {
|
|
434
|
+
case 0:
|
|
435
|
+
_a = [__assign({}, output)];
|
|
436
|
+
_c = {};
|
|
437
|
+
return [4, parseErrorBody(output.body, context)];
|
|
438
|
+
case 1:
|
|
439
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
440
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
441
|
+
_b = errorCode;
|
|
442
|
+
switch (_b) {
|
|
443
|
+
case "BadRequestException": return [3, 2];
|
|
444
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
445
|
+
case "ConflictException": return [3, 4];
|
|
446
|
+
case "com.amazonaws.serverlessapplicationrepository#ConflictException": return [3, 4];
|
|
447
|
+
case "ForbiddenException": return [3, 6];
|
|
448
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 6];
|
|
449
|
+
case "InternalServerErrorException": return [3, 8];
|
|
450
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 8];
|
|
451
|
+
case "TooManyRequestsException": return [3, 10];
|
|
452
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
453
|
+
}
|
|
454
|
+
return [3, 12];
|
|
455
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
456
|
+
case 3: throw _d.sent();
|
|
457
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
458
|
+
case 5: throw _d.sent();
|
|
459
|
+
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
460
|
+
case 7: throw _d.sent();
|
|
461
|
+
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
462
|
+
case 9: throw _d.sent();
|
|
463
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
464
|
+
case 11: throw _d.sent();
|
|
465
|
+
case 12:
|
|
466
|
+
parsedBody = parsedOutput.body;
|
|
467
|
+
throwDefaultError({
|
|
468
|
+
output: output,
|
|
469
|
+
parsedBody: parsedBody,
|
|
470
|
+
exceptionCtor: __BaseException,
|
|
471
|
+
errorCode: errorCode,
|
|
472
|
+
});
|
|
473
|
+
_d.label = 13;
|
|
474
|
+
case 13: return [2];
|
|
475
|
+
}
|
|
228
476
|
});
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
477
|
+
}); };
|
|
478
|
+
export var deserializeAws_restJson1CreateApplicationVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
479
|
+
var contents, data, _a, _b;
|
|
480
|
+
return __generator(this, function (_c) {
|
|
481
|
+
switch (_c.label) {
|
|
482
|
+
case 0:
|
|
483
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
484
|
+
return [2, deserializeAws_restJson1CreateApplicationVersionCommandError(output, context)];
|
|
485
|
+
}
|
|
486
|
+
contents = map({
|
|
487
|
+
$metadata: deserializeMetadata(output),
|
|
488
|
+
});
|
|
489
|
+
_a = __expectNonNull;
|
|
490
|
+
_b = __expectObject;
|
|
491
|
+
return [4, parseBody(output.body, context)];
|
|
492
|
+
case 1:
|
|
493
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
494
|
+
if (data.applicationId != null) {
|
|
495
|
+
contents.ApplicationId = __expectString(data.applicationId);
|
|
496
|
+
}
|
|
497
|
+
if (data.creationTime != null) {
|
|
498
|
+
contents.CreationTime = __expectString(data.creationTime);
|
|
499
|
+
}
|
|
500
|
+
if (data.parameterDefinitions != null) {
|
|
501
|
+
contents.ParameterDefinitions = deserializeAws_restJson1__listOfParameterDefinition(data.parameterDefinitions, context);
|
|
502
|
+
}
|
|
503
|
+
if (data.requiredCapabilities != null) {
|
|
504
|
+
contents.RequiredCapabilities = deserializeAws_restJson1__listOfCapability(data.requiredCapabilities, context);
|
|
505
|
+
}
|
|
506
|
+
if (data.resourcesSupported != null) {
|
|
507
|
+
contents.ResourcesSupported = __expectBoolean(data.resourcesSupported);
|
|
508
|
+
}
|
|
509
|
+
if (data.semanticVersion != null) {
|
|
510
|
+
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
511
|
+
}
|
|
512
|
+
if (data.sourceCodeArchiveUrl != null) {
|
|
513
|
+
contents.SourceCodeArchiveUrl = __expectString(data.sourceCodeArchiveUrl);
|
|
514
|
+
}
|
|
515
|
+
if (data.sourceCodeUrl != null) {
|
|
516
|
+
contents.SourceCodeUrl = __expectString(data.sourceCodeUrl);
|
|
517
|
+
}
|
|
518
|
+
if (data.templateUrl != null) {
|
|
519
|
+
contents.TemplateUrl = __expectString(data.templateUrl);
|
|
520
|
+
}
|
|
521
|
+
return [2, contents];
|
|
522
|
+
}
|
|
239
523
|
});
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
524
|
+
}); };
|
|
525
|
+
var deserializeAws_restJson1CreateApplicationVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
526
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
527
|
+
var _c;
|
|
528
|
+
return __generator(this, function (_d) {
|
|
529
|
+
switch (_d.label) {
|
|
530
|
+
case 0:
|
|
531
|
+
_a = [__assign({}, output)];
|
|
532
|
+
_c = {};
|
|
533
|
+
return [4, parseErrorBody(output.body, context)];
|
|
534
|
+
case 1:
|
|
535
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
536
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
537
|
+
_b = errorCode;
|
|
538
|
+
switch (_b) {
|
|
539
|
+
case "BadRequestException": return [3, 2];
|
|
540
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
541
|
+
case "ConflictException": return [3, 4];
|
|
542
|
+
case "com.amazonaws.serverlessapplicationrepository#ConflictException": return [3, 4];
|
|
543
|
+
case "ForbiddenException": return [3, 6];
|
|
544
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 6];
|
|
545
|
+
case "InternalServerErrorException": return [3, 8];
|
|
546
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 8];
|
|
547
|
+
case "TooManyRequestsException": return [3, 10];
|
|
548
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
549
|
+
}
|
|
550
|
+
return [3, 12];
|
|
551
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
552
|
+
case 3: throw _d.sent();
|
|
553
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
554
|
+
case 5: throw _d.sent();
|
|
555
|
+
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
556
|
+
case 7: throw _d.sent();
|
|
557
|
+
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
558
|
+
case 9: throw _d.sent();
|
|
559
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
560
|
+
case 11: throw _d.sent();
|
|
561
|
+
case 12:
|
|
562
|
+
parsedBody = parsedOutput.body;
|
|
563
|
+
throwDefaultError({
|
|
564
|
+
output: output,
|
|
565
|
+
parsedBody: parsedBody,
|
|
566
|
+
exceptionCtor: __BaseException,
|
|
567
|
+
errorCode: errorCode,
|
|
568
|
+
});
|
|
569
|
+
_d.label = 13;
|
|
570
|
+
case 13: return [2];
|
|
571
|
+
}
|
|
249
572
|
});
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
573
|
+
}); };
|
|
574
|
+
export var deserializeAws_restJson1CreateCloudFormationChangeSetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
575
|
+
var contents, data, _a, _b;
|
|
576
|
+
return __generator(this, function (_c) {
|
|
577
|
+
switch (_c.label) {
|
|
578
|
+
case 0:
|
|
579
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
580
|
+
return [2, deserializeAws_restJson1CreateCloudFormationChangeSetCommandError(output, context)];
|
|
581
|
+
}
|
|
582
|
+
contents = map({
|
|
583
|
+
$metadata: deserializeMetadata(output),
|
|
584
|
+
});
|
|
585
|
+
_a = __expectNonNull;
|
|
586
|
+
_b = __expectObject;
|
|
587
|
+
return [4, parseBody(output.body, context)];
|
|
588
|
+
case 1:
|
|
589
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
590
|
+
if (data.applicationId != null) {
|
|
591
|
+
contents.ApplicationId = __expectString(data.applicationId);
|
|
592
|
+
}
|
|
593
|
+
if (data.changeSetId != null) {
|
|
594
|
+
contents.ChangeSetId = __expectString(data.changeSetId);
|
|
595
|
+
}
|
|
596
|
+
if (data.semanticVersion != null) {
|
|
597
|
+
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
598
|
+
}
|
|
599
|
+
if (data.stackId != null) {
|
|
600
|
+
contents.StackId = __expectString(data.stackId);
|
|
601
|
+
}
|
|
602
|
+
return [2, contents];
|
|
603
|
+
}
|
|
260
604
|
});
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
605
|
+
}); };
|
|
606
|
+
var deserializeAws_restJson1CreateCloudFormationChangeSetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
607
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
608
|
+
var _c;
|
|
609
|
+
return __generator(this, function (_d) {
|
|
610
|
+
switch (_d.label) {
|
|
611
|
+
case 0:
|
|
612
|
+
_a = [__assign({}, output)];
|
|
613
|
+
_c = {};
|
|
614
|
+
return [4, parseErrorBody(output.body, context)];
|
|
615
|
+
case 1:
|
|
616
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
617
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
618
|
+
_b = errorCode;
|
|
619
|
+
switch (_b) {
|
|
620
|
+
case "BadRequestException": return [3, 2];
|
|
621
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
622
|
+
case "ForbiddenException": return [3, 4];
|
|
623
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
624
|
+
case "InternalServerErrorException": return [3, 6];
|
|
625
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
626
|
+
case "TooManyRequestsException": return [3, 8];
|
|
627
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 8];
|
|
628
|
+
}
|
|
629
|
+
return [3, 10];
|
|
630
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
631
|
+
case 3: throw _d.sent();
|
|
632
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
633
|
+
case 5: throw _d.sent();
|
|
634
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
635
|
+
case 7: throw _d.sent();
|
|
636
|
+
case 8: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
637
|
+
case 9: throw _d.sent();
|
|
638
|
+
case 10:
|
|
639
|
+
parsedBody = parsedOutput.body;
|
|
640
|
+
throwDefaultError({
|
|
641
|
+
output: output,
|
|
642
|
+
parsedBody: parsedBody,
|
|
643
|
+
exceptionCtor: __BaseException,
|
|
644
|
+
errorCode: errorCode,
|
|
645
|
+
});
|
|
646
|
+
_d.label = 11;
|
|
647
|
+
case 11: return [2];
|
|
648
|
+
}
|
|
274
649
|
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
650
|
+
}); };
|
|
651
|
+
export var deserializeAws_restJson1CreateCloudFormationTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
652
|
+
var contents, data, _a, _b;
|
|
653
|
+
return __generator(this, function (_c) {
|
|
654
|
+
switch (_c.label) {
|
|
655
|
+
case 0:
|
|
656
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
657
|
+
return [2, deserializeAws_restJson1CreateCloudFormationTemplateCommandError(output, context)];
|
|
658
|
+
}
|
|
659
|
+
contents = map({
|
|
660
|
+
$metadata: deserializeMetadata(output),
|
|
661
|
+
});
|
|
662
|
+
_a = __expectNonNull;
|
|
663
|
+
_b = __expectObject;
|
|
664
|
+
return [4, parseBody(output.body, context)];
|
|
665
|
+
case 1:
|
|
666
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
667
|
+
if (data.applicationId != null) {
|
|
668
|
+
contents.ApplicationId = __expectString(data.applicationId);
|
|
669
|
+
}
|
|
670
|
+
if (data.creationTime != null) {
|
|
671
|
+
contents.CreationTime = __expectString(data.creationTime);
|
|
672
|
+
}
|
|
673
|
+
if (data.expirationTime != null) {
|
|
674
|
+
contents.ExpirationTime = __expectString(data.expirationTime);
|
|
675
|
+
}
|
|
676
|
+
if (data.semanticVersion != null) {
|
|
677
|
+
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
678
|
+
}
|
|
679
|
+
if (data.status != null) {
|
|
680
|
+
contents.Status = __expectString(data.status);
|
|
681
|
+
}
|
|
682
|
+
if (data.templateId != null) {
|
|
683
|
+
contents.TemplateId = __expectString(data.templateId);
|
|
684
|
+
}
|
|
685
|
+
if (data.templateUrl != null) {
|
|
686
|
+
contents.TemplateUrl = __expectString(data.templateUrl);
|
|
687
|
+
}
|
|
688
|
+
return [2, contents];
|
|
689
|
+
}
|
|
283
690
|
});
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
691
|
+
}); };
|
|
692
|
+
var deserializeAws_restJson1CreateCloudFormationTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
693
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
694
|
+
var _c;
|
|
695
|
+
return __generator(this, function (_d) {
|
|
696
|
+
switch (_d.label) {
|
|
697
|
+
case 0:
|
|
698
|
+
_a = [__assign({}, output)];
|
|
699
|
+
_c = {};
|
|
700
|
+
return [4, parseErrorBody(output.body, context)];
|
|
701
|
+
case 1:
|
|
702
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
703
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
704
|
+
_b = errorCode;
|
|
705
|
+
switch (_b) {
|
|
706
|
+
case "BadRequestException": return [3, 2];
|
|
707
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
708
|
+
case "ForbiddenException": return [3, 4];
|
|
709
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
710
|
+
case "InternalServerErrorException": return [3, 6];
|
|
711
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
712
|
+
case "NotFoundException": return [3, 8];
|
|
713
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
714
|
+
case "TooManyRequestsException": return [3, 10];
|
|
715
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
716
|
+
}
|
|
717
|
+
return [3, 12];
|
|
718
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
719
|
+
case 3: throw _d.sent();
|
|
720
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
721
|
+
case 5: throw _d.sent();
|
|
722
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
723
|
+
case 7: throw _d.sent();
|
|
724
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
725
|
+
case 9: throw _d.sent();
|
|
726
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
727
|
+
case 11: throw _d.sent();
|
|
728
|
+
case 12:
|
|
729
|
+
parsedBody = parsedOutput.body;
|
|
730
|
+
throwDefaultError({
|
|
731
|
+
output: output,
|
|
732
|
+
parsedBody: parsedBody,
|
|
733
|
+
exceptionCtor: __BaseException,
|
|
734
|
+
errorCode: errorCode,
|
|
735
|
+
});
|
|
736
|
+
_d.label = 13;
|
|
737
|
+
case 13: return [2];
|
|
738
|
+
}
|
|
295
739
|
});
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
740
|
+
}); };
|
|
741
|
+
export var deserializeAws_restJson1DeleteApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
742
|
+
var contents;
|
|
743
|
+
return __generator(this, function (_a) {
|
|
744
|
+
switch (_a.label) {
|
|
745
|
+
case 0:
|
|
746
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
747
|
+
return [2, deserializeAws_restJson1DeleteApplicationCommandError(output, context)];
|
|
748
|
+
}
|
|
749
|
+
contents = map({
|
|
750
|
+
$metadata: deserializeMetadata(output),
|
|
751
|
+
});
|
|
752
|
+
return [4, collectBody(output.body, context)];
|
|
753
|
+
case 1:
|
|
754
|
+
_a.sent();
|
|
755
|
+
return [2, contents];
|
|
756
|
+
}
|
|
304
757
|
});
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
758
|
+
}); };
|
|
759
|
+
var deserializeAws_restJson1DeleteApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
760
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
761
|
+
var _c;
|
|
762
|
+
return __generator(this, function (_d) {
|
|
763
|
+
switch (_d.label) {
|
|
764
|
+
case 0:
|
|
765
|
+
_a = [__assign({}, output)];
|
|
766
|
+
_c = {};
|
|
767
|
+
return [4, parseErrorBody(output.body, context)];
|
|
768
|
+
case 1:
|
|
769
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
770
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
771
|
+
_b = errorCode;
|
|
772
|
+
switch (_b) {
|
|
773
|
+
case "BadRequestException": return [3, 2];
|
|
774
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
775
|
+
case "ConflictException": return [3, 4];
|
|
776
|
+
case "com.amazonaws.serverlessapplicationrepository#ConflictException": return [3, 4];
|
|
777
|
+
case "ForbiddenException": return [3, 6];
|
|
778
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 6];
|
|
779
|
+
case "InternalServerErrorException": return [3, 8];
|
|
780
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 8];
|
|
781
|
+
case "NotFoundException": return [3, 10];
|
|
782
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 10];
|
|
783
|
+
case "TooManyRequestsException": return [3, 12];
|
|
784
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 12];
|
|
785
|
+
}
|
|
786
|
+
return [3, 14];
|
|
787
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
788
|
+
case 3: throw _d.sent();
|
|
789
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
790
|
+
case 5: throw _d.sent();
|
|
791
|
+
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
792
|
+
case 7: throw _d.sent();
|
|
793
|
+
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
794
|
+
case 9: throw _d.sent();
|
|
795
|
+
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
796
|
+
case 11: throw _d.sent();
|
|
797
|
+
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
798
|
+
case 13: throw _d.sent();
|
|
799
|
+
case 14:
|
|
800
|
+
parsedBody = parsedOutput.body;
|
|
801
|
+
throwDefaultError({
|
|
802
|
+
output: output,
|
|
803
|
+
parsedBody: parsedBody,
|
|
804
|
+
exceptionCtor: __BaseException,
|
|
805
|
+
errorCode: errorCode,
|
|
806
|
+
});
|
|
807
|
+
_d.label = 15;
|
|
808
|
+
case 15: return [2];
|
|
809
|
+
}
|
|
321
810
|
});
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
811
|
+
}); };
|
|
812
|
+
export var deserializeAws_restJson1GetApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
813
|
+
var contents, data, _a, _b;
|
|
814
|
+
return __generator(this, function (_c) {
|
|
815
|
+
switch (_c.label) {
|
|
816
|
+
case 0:
|
|
817
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
818
|
+
return [2, deserializeAws_restJson1GetApplicationCommandError(output, context)];
|
|
819
|
+
}
|
|
820
|
+
contents = map({
|
|
821
|
+
$metadata: deserializeMetadata(output),
|
|
822
|
+
});
|
|
823
|
+
_a = __expectNonNull;
|
|
824
|
+
_b = __expectObject;
|
|
825
|
+
return [4, parseBody(output.body, context)];
|
|
826
|
+
case 1:
|
|
827
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
828
|
+
if (data.applicationId != null) {
|
|
829
|
+
contents.ApplicationId = __expectString(data.applicationId);
|
|
830
|
+
}
|
|
831
|
+
if (data.author != null) {
|
|
832
|
+
contents.Author = __expectString(data.author);
|
|
833
|
+
}
|
|
834
|
+
if (data.creationTime != null) {
|
|
835
|
+
contents.CreationTime = __expectString(data.creationTime);
|
|
836
|
+
}
|
|
837
|
+
if (data.description != null) {
|
|
838
|
+
contents.Description = __expectString(data.description);
|
|
839
|
+
}
|
|
840
|
+
if (data.homePageUrl != null) {
|
|
841
|
+
contents.HomePageUrl = __expectString(data.homePageUrl);
|
|
842
|
+
}
|
|
843
|
+
if (data.isVerifiedAuthor != null) {
|
|
844
|
+
contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor);
|
|
845
|
+
}
|
|
846
|
+
if (data.labels != null) {
|
|
847
|
+
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
848
|
+
}
|
|
849
|
+
if (data.licenseUrl != null) {
|
|
850
|
+
contents.LicenseUrl = __expectString(data.licenseUrl);
|
|
851
|
+
}
|
|
852
|
+
if (data.name != null) {
|
|
853
|
+
contents.Name = __expectString(data.name);
|
|
854
|
+
}
|
|
855
|
+
if (data.readmeUrl != null) {
|
|
856
|
+
contents.ReadmeUrl = __expectString(data.readmeUrl);
|
|
857
|
+
}
|
|
858
|
+
if (data.spdxLicenseId != null) {
|
|
859
|
+
contents.SpdxLicenseId = __expectString(data.spdxLicenseId);
|
|
860
|
+
}
|
|
861
|
+
if (data.verifiedAuthorUrl != null) {
|
|
862
|
+
contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl);
|
|
863
|
+
}
|
|
864
|
+
if (data.version != null) {
|
|
865
|
+
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
866
|
+
}
|
|
867
|
+
return [2, contents];
|
|
868
|
+
}
|
|
330
869
|
});
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
870
|
+
}); };
|
|
871
|
+
var deserializeAws_restJson1GetApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
872
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
873
|
+
var _c;
|
|
874
|
+
return __generator(this, function (_d) {
|
|
875
|
+
switch (_d.label) {
|
|
876
|
+
case 0:
|
|
877
|
+
_a = [__assign({}, output)];
|
|
878
|
+
_c = {};
|
|
879
|
+
return [4, parseErrorBody(output.body, context)];
|
|
880
|
+
case 1:
|
|
881
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
882
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
883
|
+
_b = errorCode;
|
|
884
|
+
switch (_b) {
|
|
885
|
+
case "BadRequestException": return [3, 2];
|
|
886
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
887
|
+
case "ForbiddenException": return [3, 4];
|
|
888
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
889
|
+
case "InternalServerErrorException": return [3, 6];
|
|
890
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
891
|
+
case "NotFoundException": return [3, 8];
|
|
892
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
893
|
+
case "TooManyRequestsException": return [3, 10];
|
|
894
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
895
|
+
}
|
|
896
|
+
return [3, 12];
|
|
897
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
898
|
+
case 3: throw _d.sent();
|
|
899
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
900
|
+
case 5: throw _d.sent();
|
|
901
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
902
|
+
case 7: throw _d.sent();
|
|
903
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
904
|
+
case 9: throw _d.sent();
|
|
905
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
906
|
+
case 11: throw _d.sent();
|
|
907
|
+
case 12:
|
|
908
|
+
parsedBody = parsedOutput.body;
|
|
909
|
+
throwDefaultError({
|
|
910
|
+
output: output,
|
|
911
|
+
parsedBody: parsedBody,
|
|
912
|
+
exceptionCtor: __BaseException,
|
|
913
|
+
errorCode: errorCode,
|
|
914
|
+
});
|
|
915
|
+
_d.label = 13;
|
|
916
|
+
case 13: return [2];
|
|
917
|
+
}
|
|
338
918
|
});
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
if (data.licenseUrl != null) {
|
|
362
|
-
contents.LicenseUrl = __expectString(data.licenseUrl);
|
|
363
|
-
}
|
|
364
|
-
if (data.name != null) {
|
|
365
|
-
contents.Name = __expectString(data.name);
|
|
366
|
-
}
|
|
367
|
-
if (data.readmeUrl != null) {
|
|
368
|
-
contents.ReadmeUrl = __expectString(data.readmeUrl);
|
|
369
|
-
}
|
|
370
|
-
if (data.spdxLicenseId != null) {
|
|
371
|
-
contents.SpdxLicenseId = __expectString(data.spdxLicenseId);
|
|
372
|
-
}
|
|
373
|
-
if (data.verifiedAuthorUrl != null) {
|
|
374
|
-
contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl);
|
|
375
|
-
}
|
|
376
|
-
if (data.version != null) {
|
|
377
|
-
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
378
|
-
}
|
|
379
|
-
return contents;
|
|
380
|
-
};
|
|
381
|
-
const deserializeAws_restJson1CreateApplicationCommandError = async (output, context) => {
|
|
382
|
-
const parsedOutput = {
|
|
383
|
-
...output,
|
|
384
|
-
body: await parseErrorBody(output.body, context),
|
|
385
|
-
};
|
|
386
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
387
|
-
switch (errorCode) {
|
|
388
|
-
case "BadRequestException":
|
|
389
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
390
|
-
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
391
|
-
case "ConflictException":
|
|
392
|
-
case "com.amazonaws.serverlessapplicationrepository#ConflictException":
|
|
393
|
-
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
394
|
-
case "ForbiddenException":
|
|
395
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
396
|
-
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
397
|
-
case "InternalServerErrorException":
|
|
398
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
399
|
-
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
400
|
-
case "TooManyRequestsException":
|
|
401
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
402
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
403
|
-
default:
|
|
404
|
-
const parsedBody = parsedOutput.body;
|
|
405
|
-
throwDefaultError({
|
|
406
|
-
output,
|
|
407
|
-
parsedBody,
|
|
408
|
-
exceptionCtor: __BaseException,
|
|
409
|
-
errorCode,
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
};
|
|
413
|
-
export const deserializeAws_restJson1CreateApplicationVersionCommand = async (output, context) => {
|
|
414
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
415
|
-
return deserializeAws_restJson1CreateApplicationVersionCommandError(output, context);
|
|
416
|
-
}
|
|
417
|
-
const contents = map({
|
|
418
|
-
$metadata: deserializeMetadata(output),
|
|
919
|
+
}); };
|
|
920
|
+
export var deserializeAws_restJson1GetApplicationPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
921
|
+
var contents, data, _a, _b;
|
|
922
|
+
return __generator(this, function (_c) {
|
|
923
|
+
switch (_c.label) {
|
|
924
|
+
case 0:
|
|
925
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
926
|
+
return [2, deserializeAws_restJson1GetApplicationPolicyCommandError(output, context)];
|
|
927
|
+
}
|
|
928
|
+
contents = map({
|
|
929
|
+
$metadata: deserializeMetadata(output),
|
|
930
|
+
});
|
|
931
|
+
_a = __expectNonNull;
|
|
932
|
+
_b = __expectObject;
|
|
933
|
+
return [4, parseBody(output.body, context)];
|
|
934
|
+
case 1:
|
|
935
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
936
|
+
if (data.statements != null) {
|
|
937
|
+
contents.Statements = deserializeAws_restJson1__listOfApplicationPolicyStatement(data.statements, context);
|
|
938
|
+
}
|
|
939
|
+
return [2, contents];
|
|
940
|
+
}
|
|
419
941
|
});
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
469
|
-
case "TooManyRequestsException":
|
|
470
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
471
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
472
|
-
default:
|
|
473
|
-
const parsedBody = parsedOutput.body;
|
|
474
|
-
throwDefaultError({
|
|
475
|
-
output,
|
|
476
|
-
parsedBody,
|
|
477
|
-
exceptionCtor: __BaseException,
|
|
478
|
-
errorCode,
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
export const deserializeAws_restJson1CreateCloudFormationChangeSetCommand = async (output, context) => {
|
|
483
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
484
|
-
return deserializeAws_restJson1CreateCloudFormationChangeSetCommandError(output, context);
|
|
485
|
-
}
|
|
486
|
-
const contents = map({
|
|
487
|
-
$metadata: deserializeMetadata(output),
|
|
942
|
+
}); };
|
|
943
|
+
var deserializeAws_restJson1GetApplicationPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
944
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
945
|
+
var _c;
|
|
946
|
+
return __generator(this, function (_d) {
|
|
947
|
+
switch (_d.label) {
|
|
948
|
+
case 0:
|
|
949
|
+
_a = [__assign({}, output)];
|
|
950
|
+
_c = {};
|
|
951
|
+
return [4, parseErrorBody(output.body, context)];
|
|
952
|
+
case 1:
|
|
953
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
954
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
955
|
+
_b = errorCode;
|
|
956
|
+
switch (_b) {
|
|
957
|
+
case "BadRequestException": return [3, 2];
|
|
958
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
959
|
+
case "ForbiddenException": return [3, 4];
|
|
960
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
961
|
+
case "InternalServerErrorException": return [3, 6];
|
|
962
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
963
|
+
case "NotFoundException": return [3, 8];
|
|
964
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
965
|
+
case "TooManyRequestsException": return [3, 10];
|
|
966
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
967
|
+
}
|
|
968
|
+
return [3, 12];
|
|
969
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
970
|
+
case 3: throw _d.sent();
|
|
971
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
972
|
+
case 5: throw _d.sent();
|
|
973
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
974
|
+
case 7: throw _d.sent();
|
|
975
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
976
|
+
case 9: throw _d.sent();
|
|
977
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
978
|
+
case 11: throw _d.sent();
|
|
979
|
+
case 12:
|
|
980
|
+
parsedBody = parsedOutput.body;
|
|
981
|
+
throwDefaultError({
|
|
982
|
+
output: output,
|
|
983
|
+
parsedBody: parsedBody,
|
|
984
|
+
exceptionCtor: __BaseException,
|
|
985
|
+
errorCode: errorCode,
|
|
986
|
+
});
|
|
987
|
+
_d.label = 13;
|
|
988
|
+
case 13: return [2];
|
|
989
|
+
}
|
|
488
990
|
});
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
errorCode,
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
export const deserializeAws_restJson1CreateCloudFormationTemplateCommand = async (output, context) => {
|
|
534
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
535
|
-
return deserializeAws_restJson1CreateCloudFormationTemplateCommandError(output, context);
|
|
536
|
-
}
|
|
537
|
-
const contents = map({
|
|
538
|
-
$metadata: deserializeMetadata(output),
|
|
991
|
+
}); };
|
|
992
|
+
export var deserializeAws_restJson1GetCloudFormationTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
993
|
+
var contents, data, _a, _b;
|
|
994
|
+
return __generator(this, function (_c) {
|
|
995
|
+
switch (_c.label) {
|
|
996
|
+
case 0:
|
|
997
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
998
|
+
return [2, deserializeAws_restJson1GetCloudFormationTemplateCommandError(output, context)];
|
|
999
|
+
}
|
|
1000
|
+
contents = map({
|
|
1001
|
+
$metadata: deserializeMetadata(output),
|
|
1002
|
+
});
|
|
1003
|
+
_a = __expectNonNull;
|
|
1004
|
+
_b = __expectObject;
|
|
1005
|
+
return [4, parseBody(output.body, context)];
|
|
1006
|
+
case 1:
|
|
1007
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1008
|
+
if (data.applicationId != null) {
|
|
1009
|
+
contents.ApplicationId = __expectString(data.applicationId);
|
|
1010
|
+
}
|
|
1011
|
+
if (data.creationTime != null) {
|
|
1012
|
+
contents.CreationTime = __expectString(data.creationTime);
|
|
1013
|
+
}
|
|
1014
|
+
if (data.expirationTime != null) {
|
|
1015
|
+
contents.ExpirationTime = __expectString(data.expirationTime);
|
|
1016
|
+
}
|
|
1017
|
+
if (data.semanticVersion != null) {
|
|
1018
|
+
contents.SemanticVersion = __expectString(data.semanticVersion);
|
|
1019
|
+
}
|
|
1020
|
+
if (data.status != null) {
|
|
1021
|
+
contents.Status = __expectString(data.status);
|
|
1022
|
+
}
|
|
1023
|
+
if (data.templateId != null) {
|
|
1024
|
+
contents.TemplateId = __expectString(data.templateId);
|
|
1025
|
+
}
|
|
1026
|
+
if (data.templateUrl != null) {
|
|
1027
|
+
contents.TemplateUrl = __expectString(data.templateUrl);
|
|
1028
|
+
}
|
|
1029
|
+
return [2, contents];
|
|
1030
|
+
}
|
|
539
1031
|
});
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
throw
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
throwDefaultError({
|
|
589
|
-
output,
|
|
590
|
-
parsedBody,
|
|
591
|
-
exceptionCtor: __BaseException,
|
|
592
|
-
errorCode,
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
|
-
export const deserializeAws_restJson1DeleteApplicationCommand = async (output, context) => {
|
|
597
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
598
|
-
return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
|
|
599
|
-
}
|
|
600
|
-
const contents = map({
|
|
601
|
-
$metadata: deserializeMetadata(output),
|
|
1032
|
+
}); };
|
|
1033
|
+
var deserializeAws_restJson1GetCloudFormationTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1034
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1035
|
+
var _c;
|
|
1036
|
+
return __generator(this, function (_d) {
|
|
1037
|
+
switch (_d.label) {
|
|
1038
|
+
case 0:
|
|
1039
|
+
_a = [__assign({}, output)];
|
|
1040
|
+
_c = {};
|
|
1041
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1042
|
+
case 1:
|
|
1043
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1044
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1045
|
+
_b = errorCode;
|
|
1046
|
+
switch (_b) {
|
|
1047
|
+
case "BadRequestException": return [3, 2];
|
|
1048
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
1049
|
+
case "ForbiddenException": return [3, 4];
|
|
1050
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
1051
|
+
case "InternalServerErrorException": return [3, 6];
|
|
1052
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
1053
|
+
case "NotFoundException": return [3, 8];
|
|
1054
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
1055
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1056
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
1057
|
+
}
|
|
1058
|
+
return [3, 12];
|
|
1059
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1060
|
+
case 3: throw _d.sent();
|
|
1061
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1062
|
+
case 5: throw _d.sent();
|
|
1063
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1064
|
+
case 7: throw _d.sent();
|
|
1065
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1066
|
+
case 9: throw _d.sent();
|
|
1067
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1068
|
+
case 11: throw _d.sent();
|
|
1069
|
+
case 12:
|
|
1070
|
+
parsedBody = parsedOutput.body;
|
|
1071
|
+
throwDefaultError({
|
|
1072
|
+
output: output,
|
|
1073
|
+
parsedBody: parsedBody,
|
|
1074
|
+
exceptionCtor: __BaseException,
|
|
1075
|
+
errorCode: errorCode,
|
|
1076
|
+
});
|
|
1077
|
+
_d.label = 13;
|
|
1078
|
+
case 13: return [2];
|
|
1079
|
+
}
|
|
602
1080
|
});
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
case "TooManyRequestsException":
|
|
629
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
630
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
631
|
-
default:
|
|
632
|
-
const parsedBody = parsedOutput.body;
|
|
633
|
-
throwDefaultError({
|
|
634
|
-
output,
|
|
635
|
-
parsedBody,
|
|
636
|
-
exceptionCtor: __BaseException,
|
|
637
|
-
errorCode,
|
|
638
|
-
});
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
export const deserializeAws_restJson1GetApplicationCommand = async (output, context) => {
|
|
642
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
643
|
-
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
644
|
-
}
|
|
645
|
-
const contents = map({
|
|
646
|
-
$metadata: deserializeMetadata(output),
|
|
1081
|
+
}); };
|
|
1082
|
+
export var deserializeAws_restJson1ListApplicationDependenciesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1083
|
+
var contents, data, _a, _b;
|
|
1084
|
+
return __generator(this, function (_c) {
|
|
1085
|
+
switch (_c.label) {
|
|
1086
|
+
case 0:
|
|
1087
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1088
|
+
return [2, deserializeAws_restJson1ListApplicationDependenciesCommandError(output, context)];
|
|
1089
|
+
}
|
|
1090
|
+
contents = map({
|
|
1091
|
+
$metadata: deserializeMetadata(output),
|
|
1092
|
+
});
|
|
1093
|
+
_a = __expectNonNull;
|
|
1094
|
+
_b = __expectObject;
|
|
1095
|
+
return [4, parseBody(output.body, context)];
|
|
1096
|
+
case 1:
|
|
1097
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1098
|
+
if (data.dependencies != null) {
|
|
1099
|
+
contents.Dependencies = deserializeAws_restJson1__listOfApplicationDependencySummary(data.dependencies, context);
|
|
1100
|
+
}
|
|
1101
|
+
if (data.nextToken != null) {
|
|
1102
|
+
contents.NextToken = __expectString(data.nextToken);
|
|
1103
|
+
}
|
|
1104
|
+
return [2, contents];
|
|
1105
|
+
}
|
|
647
1106
|
});
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
switch (errorCode) {
|
|
697
|
-
case "BadRequestException":
|
|
698
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
699
|
-
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
700
|
-
case "ForbiddenException":
|
|
701
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
702
|
-
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
703
|
-
case "InternalServerErrorException":
|
|
704
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
705
|
-
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
706
|
-
case "NotFoundException":
|
|
707
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
708
|
-
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
709
|
-
case "TooManyRequestsException":
|
|
710
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
711
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
712
|
-
default:
|
|
713
|
-
const parsedBody = parsedOutput.body;
|
|
714
|
-
throwDefaultError({
|
|
715
|
-
output,
|
|
716
|
-
parsedBody,
|
|
717
|
-
exceptionCtor: __BaseException,
|
|
718
|
-
errorCode,
|
|
719
|
-
});
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
export const deserializeAws_restJson1GetApplicationPolicyCommand = async (output, context) => {
|
|
723
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
724
|
-
return deserializeAws_restJson1GetApplicationPolicyCommandError(output, context);
|
|
725
|
-
}
|
|
726
|
-
const contents = map({
|
|
727
|
-
$metadata: deserializeMetadata(output),
|
|
1107
|
+
}); };
|
|
1108
|
+
var deserializeAws_restJson1ListApplicationDependenciesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1109
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1110
|
+
var _c;
|
|
1111
|
+
return __generator(this, function (_d) {
|
|
1112
|
+
switch (_d.label) {
|
|
1113
|
+
case 0:
|
|
1114
|
+
_a = [__assign({}, output)];
|
|
1115
|
+
_c = {};
|
|
1116
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1117
|
+
case 1:
|
|
1118
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1119
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1120
|
+
_b = errorCode;
|
|
1121
|
+
switch (_b) {
|
|
1122
|
+
case "BadRequestException": return [3, 2];
|
|
1123
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
1124
|
+
case "ForbiddenException": return [3, 4];
|
|
1125
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
1126
|
+
case "InternalServerErrorException": return [3, 6];
|
|
1127
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
1128
|
+
case "NotFoundException": return [3, 8];
|
|
1129
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
1130
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1131
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
1132
|
+
}
|
|
1133
|
+
return [3, 12];
|
|
1134
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1135
|
+
case 3: throw _d.sent();
|
|
1136
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1137
|
+
case 5: throw _d.sent();
|
|
1138
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1139
|
+
case 7: throw _d.sent();
|
|
1140
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1141
|
+
case 9: throw _d.sent();
|
|
1142
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1143
|
+
case 11: throw _d.sent();
|
|
1144
|
+
case 12:
|
|
1145
|
+
parsedBody = parsedOutput.body;
|
|
1146
|
+
throwDefaultError({
|
|
1147
|
+
output: output,
|
|
1148
|
+
parsedBody: parsedBody,
|
|
1149
|
+
exceptionCtor: __BaseException,
|
|
1150
|
+
errorCode: errorCode,
|
|
1151
|
+
});
|
|
1152
|
+
_d.label = 13;
|
|
1153
|
+
case 13: return [2];
|
|
1154
|
+
}
|
|
728
1155
|
});
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
case "TooManyRequestsException":
|
|
755
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
756
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
757
|
-
default:
|
|
758
|
-
const parsedBody = parsedOutput.body;
|
|
759
|
-
throwDefaultError({
|
|
760
|
-
output,
|
|
761
|
-
parsedBody,
|
|
762
|
-
exceptionCtor: __BaseException,
|
|
763
|
-
errorCode,
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
};
|
|
767
|
-
export const deserializeAws_restJson1GetCloudFormationTemplateCommand = async (output, context) => {
|
|
768
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
769
|
-
return deserializeAws_restJson1GetCloudFormationTemplateCommandError(output, context);
|
|
770
|
-
}
|
|
771
|
-
const contents = map({
|
|
772
|
-
$metadata: deserializeMetadata(output),
|
|
1156
|
+
}); };
|
|
1157
|
+
export var deserializeAws_restJson1ListApplicationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1158
|
+
var contents, data, _a, _b;
|
|
1159
|
+
return __generator(this, function (_c) {
|
|
1160
|
+
switch (_c.label) {
|
|
1161
|
+
case 0:
|
|
1162
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1163
|
+
return [2, deserializeAws_restJson1ListApplicationsCommandError(output, context)];
|
|
1164
|
+
}
|
|
1165
|
+
contents = map({
|
|
1166
|
+
$metadata: deserializeMetadata(output),
|
|
1167
|
+
});
|
|
1168
|
+
_a = __expectNonNull;
|
|
1169
|
+
_b = __expectObject;
|
|
1170
|
+
return [4, parseBody(output.body, context)];
|
|
1171
|
+
case 1:
|
|
1172
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1173
|
+
if (data.applications != null) {
|
|
1174
|
+
contents.Applications = deserializeAws_restJson1__listOfApplicationSummary(data.applications, context);
|
|
1175
|
+
}
|
|
1176
|
+
if (data.nextToken != null) {
|
|
1177
|
+
contents.NextToken = __expectString(data.nextToken);
|
|
1178
|
+
}
|
|
1179
|
+
return [2, contents];
|
|
1180
|
+
}
|
|
773
1181
|
});
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
819
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
820
|
-
default:
|
|
821
|
-
const parsedBody = parsedOutput.body;
|
|
822
|
-
throwDefaultError({
|
|
823
|
-
output,
|
|
824
|
-
parsedBody,
|
|
825
|
-
exceptionCtor: __BaseException,
|
|
826
|
-
errorCode,
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
export const deserializeAws_restJson1ListApplicationDependenciesCommand = async (output, context) => {
|
|
831
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
832
|
-
return deserializeAws_restJson1ListApplicationDependenciesCommandError(output, context);
|
|
833
|
-
}
|
|
834
|
-
const contents = map({
|
|
835
|
-
$metadata: deserializeMetadata(output),
|
|
1182
|
+
}); };
|
|
1183
|
+
var deserializeAws_restJson1ListApplicationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1184
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1185
|
+
var _c;
|
|
1186
|
+
return __generator(this, function (_d) {
|
|
1187
|
+
switch (_d.label) {
|
|
1188
|
+
case 0:
|
|
1189
|
+
_a = [__assign({}, output)];
|
|
1190
|
+
_c = {};
|
|
1191
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1192
|
+
case 1:
|
|
1193
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1194
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1195
|
+
_b = errorCode;
|
|
1196
|
+
switch (_b) {
|
|
1197
|
+
case "BadRequestException": return [3, 2];
|
|
1198
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
1199
|
+
case "ForbiddenException": return [3, 4];
|
|
1200
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
1201
|
+
case "InternalServerErrorException": return [3, 6];
|
|
1202
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
1203
|
+
case "NotFoundException": return [3, 8];
|
|
1204
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
1205
|
+
}
|
|
1206
|
+
return [3, 10];
|
|
1207
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1208
|
+
case 3: throw _d.sent();
|
|
1209
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1210
|
+
case 5: throw _d.sent();
|
|
1211
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1212
|
+
case 7: throw _d.sent();
|
|
1213
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1214
|
+
case 9: throw _d.sent();
|
|
1215
|
+
case 10:
|
|
1216
|
+
parsedBody = parsedOutput.body;
|
|
1217
|
+
throwDefaultError({
|
|
1218
|
+
output: output,
|
|
1219
|
+
parsedBody: parsedBody,
|
|
1220
|
+
exceptionCtor: __BaseException,
|
|
1221
|
+
errorCode: errorCode,
|
|
1222
|
+
});
|
|
1223
|
+
_d.label = 11;
|
|
1224
|
+
case 11: return [2];
|
|
1225
|
+
}
|
|
836
1226
|
});
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
case "NotFoundException":
|
|
863
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
864
|
-
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
865
|
-
case "TooManyRequestsException":
|
|
866
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
867
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
868
|
-
default:
|
|
869
|
-
const parsedBody = parsedOutput.body;
|
|
870
|
-
throwDefaultError({
|
|
871
|
-
output,
|
|
872
|
-
parsedBody,
|
|
873
|
-
exceptionCtor: __BaseException,
|
|
874
|
-
errorCode,
|
|
875
|
-
});
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
export const deserializeAws_restJson1ListApplicationsCommand = async (output, context) => {
|
|
879
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
880
|
-
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
881
|
-
}
|
|
882
|
-
const contents = map({
|
|
883
|
-
$metadata: deserializeMetadata(output),
|
|
1227
|
+
}); };
|
|
1228
|
+
export var deserializeAws_restJson1ListApplicationVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1229
|
+
var contents, data, _a, _b;
|
|
1230
|
+
return __generator(this, function (_c) {
|
|
1231
|
+
switch (_c.label) {
|
|
1232
|
+
case 0:
|
|
1233
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1234
|
+
return [2, deserializeAws_restJson1ListApplicationVersionsCommandError(output, context)];
|
|
1235
|
+
}
|
|
1236
|
+
contents = map({
|
|
1237
|
+
$metadata: deserializeMetadata(output),
|
|
1238
|
+
});
|
|
1239
|
+
_a = __expectNonNull;
|
|
1240
|
+
_b = __expectObject;
|
|
1241
|
+
return [4, parseBody(output.body, context)];
|
|
1242
|
+
case 1:
|
|
1243
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1244
|
+
if (data.nextToken != null) {
|
|
1245
|
+
contents.NextToken = __expectString(data.nextToken);
|
|
1246
|
+
}
|
|
1247
|
+
if (data.versions != null) {
|
|
1248
|
+
contents.Versions = deserializeAws_restJson1__listOfVersionSummary(data.versions, context);
|
|
1249
|
+
}
|
|
1250
|
+
return [2, contents];
|
|
1251
|
+
}
|
|
884
1252
|
});
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
1253
|
+
}); };
|
|
1254
|
+
var deserializeAws_restJson1ListApplicationVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1255
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1256
|
+
var _c;
|
|
1257
|
+
return __generator(this, function (_d) {
|
|
1258
|
+
switch (_d.label) {
|
|
1259
|
+
case 0:
|
|
1260
|
+
_a = [__assign({}, output)];
|
|
1261
|
+
_c = {};
|
|
1262
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1263
|
+
case 1:
|
|
1264
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1265
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1266
|
+
_b = errorCode;
|
|
1267
|
+
switch (_b) {
|
|
1268
|
+
case "BadRequestException": return [3, 2];
|
|
1269
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
1270
|
+
case "ForbiddenException": return [3, 4];
|
|
1271
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
1272
|
+
case "InternalServerErrorException": return [3, 6];
|
|
1273
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
1274
|
+
case "NotFoundException": return [3, 8];
|
|
1275
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
1276
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1277
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
1278
|
+
}
|
|
1279
|
+
return [3, 12];
|
|
1280
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1281
|
+
case 3: throw _d.sent();
|
|
1282
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1283
|
+
case 5: throw _d.sent();
|
|
1284
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1285
|
+
case 7: throw _d.sent();
|
|
1286
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1287
|
+
case 9: throw _d.sent();
|
|
1288
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1289
|
+
case 11: throw _d.sent();
|
|
1290
|
+
case 12:
|
|
1291
|
+
parsedBody = parsedOutput.body;
|
|
1292
|
+
throwDefaultError({
|
|
1293
|
+
output: output,
|
|
1294
|
+
parsedBody: parsedBody,
|
|
1295
|
+
exceptionCtor: __BaseException,
|
|
1296
|
+
errorCode: errorCode,
|
|
1297
|
+
});
|
|
1298
|
+
_d.label = 13;
|
|
1299
|
+
case 13: return [2];
|
|
1300
|
+
}
|
|
929
1301
|
});
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
case "InternalServerErrorException":
|
|
953
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
954
|
-
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
955
|
-
case "NotFoundException":
|
|
956
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
957
|
-
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
958
|
-
case "TooManyRequestsException":
|
|
959
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
960
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
961
|
-
default:
|
|
962
|
-
const parsedBody = parsedOutput.body;
|
|
963
|
-
throwDefaultError({
|
|
964
|
-
output,
|
|
965
|
-
parsedBody,
|
|
966
|
-
exceptionCtor: __BaseException,
|
|
967
|
-
errorCode,
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
};
|
|
971
|
-
export const deserializeAws_restJson1PutApplicationPolicyCommand = async (output, context) => {
|
|
972
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
973
|
-
return deserializeAws_restJson1PutApplicationPolicyCommandError(output, context);
|
|
974
|
-
}
|
|
975
|
-
const contents = map({
|
|
976
|
-
$metadata: deserializeMetadata(output),
|
|
1302
|
+
}); };
|
|
1303
|
+
export var deserializeAws_restJson1PutApplicationPolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1304
|
+
var contents, data, _a, _b;
|
|
1305
|
+
return __generator(this, function (_c) {
|
|
1306
|
+
switch (_c.label) {
|
|
1307
|
+
case 0:
|
|
1308
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1309
|
+
return [2, deserializeAws_restJson1PutApplicationPolicyCommandError(output, context)];
|
|
1310
|
+
}
|
|
1311
|
+
contents = map({
|
|
1312
|
+
$metadata: deserializeMetadata(output),
|
|
1313
|
+
});
|
|
1314
|
+
_a = __expectNonNull;
|
|
1315
|
+
_b = __expectObject;
|
|
1316
|
+
return [4, parseBody(output.body, context)];
|
|
1317
|
+
case 1:
|
|
1318
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1319
|
+
if (data.statements != null) {
|
|
1320
|
+
contents.Statements = deserializeAws_restJson1__listOfApplicationPolicyStatement(data.statements, context);
|
|
1321
|
+
}
|
|
1322
|
+
return [2, contents];
|
|
1323
|
+
}
|
|
977
1324
|
});
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
return
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1325
|
+
}); };
|
|
1326
|
+
var deserializeAws_restJson1PutApplicationPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1327
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1328
|
+
var _c;
|
|
1329
|
+
return __generator(this, function (_d) {
|
|
1330
|
+
switch (_d.label) {
|
|
1331
|
+
case 0:
|
|
1332
|
+
_a = [__assign({}, output)];
|
|
1333
|
+
_c = {};
|
|
1334
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1335
|
+
case 1:
|
|
1336
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1337
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1338
|
+
_b = errorCode;
|
|
1339
|
+
switch (_b) {
|
|
1340
|
+
case "BadRequestException": return [3, 2];
|
|
1341
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
1342
|
+
case "ForbiddenException": return [3, 4];
|
|
1343
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
1344
|
+
case "InternalServerErrorException": return [3, 6];
|
|
1345
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
1346
|
+
case "NotFoundException": return [3, 8];
|
|
1347
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
1348
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1349
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
1350
|
+
}
|
|
1351
|
+
return [3, 12];
|
|
1352
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1353
|
+
case 3: throw _d.sent();
|
|
1354
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1355
|
+
case 5: throw _d.sent();
|
|
1356
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1357
|
+
case 7: throw _d.sent();
|
|
1358
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1359
|
+
case 9: throw _d.sent();
|
|
1360
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1361
|
+
case 11: throw _d.sent();
|
|
1362
|
+
case 12:
|
|
1363
|
+
parsedBody = parsedOutput.body;
|
|
1364
|
+
throwDefaultError({
|
|
1365
|
+
output: output,
|
|
1366
|
+
parsedBody: parsedBody,
|
|
1367
|
+
exceptionCtor: __BaseException,
|
|
1368
|
+
errorCode: errorCode,
|
|
1369
|
+
});
|
|
1370
|
+
_d.label = 13;
|
|
1371
|
+
case 13: return [2];
|
|
1372
|
+
}
|
|
1022
1373
|
});
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1041
|
-
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1042
|
-
case "NotFoundException":
|
|
1043
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1044
|
-
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1045
|
-
case "TooManyRequestsException":
|
|
1046
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1047
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1048
|
-
default:
|
|
1049
|
-
const parsedBody = parsedOutput.body;
|
|
1050
|
-
throwDefaultError({
|
|
1051
|
-
output,
|
|
1052
|
-
parsedBody,
|
|
1053
|
-
exceptionCtor: __BaseException,
|
|
1054
|
-
errorCode,
|
|
1055
|
-
});
|
|
1056
|
-
}
|
|
1057
|
-
};
|
|
1058
|
-
export const deserializeAws_restJson1UpdateApplicationCommand = async (output, context) => {
|
|
1059
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1060
|
-
return deserializeAws_restJson1UpdateApplicationCommandError(output, context);
|
|
1061
|
-
}
|
|
1062
|
-
const contents = map({
|
|
1063
|
-
$metadata: deserializeMetadata(output),
|
|
1374
|
+
}); };
|
|
1375
|
+
export var deserializeAws_restJson1UnshareApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1376
|
+
var contents;
|
|
1377
|
+
return __generator(this, function (_a) {
|
|
1378
|
+
switch (_a.label) {
|
|
1379
|
+
case 0:
|
|
1380
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1381
|
+
return [2, deserializeAws_restJson1UnshareApplicationCommandError(output, context)];
|
|
1382
|
+
}
|
|
1383
|
+
contents = map({
|
|
1384
|
+
$metadata: deserializeMetadata(output),
|
|
1385
|
+
});
|
|
1386
|
+
return [4, collectBody(output.body, context)];
|
|
1387
|
+
case 1:
|
|
1388
|
+
_a.sent();
|
|
1389
|
+
return [2, contents];
|
|
1390
|
+
}
|
|
1064
1391
|
});
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
switch (errorCode) {
|
|
1114
|
-
case "BadRequestException":
|
|
1115
|
-
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
1116
|
-
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1117
|
-
case "ConflictException":
|
|
1118
|
-
case "com.amazonaws.serverlessapplicationrepository#ConflictException":
|
|
1119
|
-
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1120
|
-
case "ForbiddenException":
|
|
1121
|
-
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException":
|
|
1122
|
-
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1123
|
-
case "InternalServerErrorException":
|
|
1124
|
-
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException":
|
|
1125
|
-
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
1126
|
-
case "NotFoundException":
|
|
1127
|
-
case "com.amazonaws.serverlessapplicationrepository#NotFoundException":
|
|
1128
|
-
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1129
|
-
case "TooManyRequestsException":
|
|
1130
|
-
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException":
|
|
1131
|
-
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1132
|
-
default:
|
|
1133
|
-
const parsedBody = parsedOutput.body;
|
|
1134
|
-
throwDefaultError({
|
|
1135
|
-
output,
|
|
1136
|
-
parsedBody,
|
|
1137
|
-
exceptionCtor: __BaseException,
|
|
1138
|
-
errorCode,
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
};
|
|
1142
|
-
const map = __map;
|
|
1143
|
-
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1144
|
-
const contents = map({});
|
|
1145
|
-
const data = parsedOutput.body;
|
|
1146
|
-
if (data.errorCode != null) {
|
|
1147
|
-
contents.ErrorCode = __expectString(data.errorCode);
|
|
1148
|
-
}
|
|
1149
|
-
if (data.message != null) {
|
|
1150
|
-
contents.Message = __expectString(data.message);
|
|
1151
|
-
}
|
|
1152
|
-
const exception = new BadRequestException({
|
|
1153
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1154
|
-
...contents,
|
|
1392
|
+
}); };
|
|
1393
|
+
var deserializeAws_restJson1UnshareApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1394
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1395
|
+
var _c;
|
|
1396
|
+
return __generator(this, function (_d) {
|
|
1397
|
+
switch (_d.label) {
|
|
1398
|
+
case 0:
|
|
1399
|
+
_a = [__assign({}, output)];
|
|
1400
|
+
_c = {};
|
|
1401
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1402
|
+
case 1:
|
|
1403
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1404
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1405
|
+
_b = errorCode;
|
|
1406
|
+
switch (_b) {
|
|
1407
|
+
case "BadRequestException": return [3, 2];
|
|
1408
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
1409
|
+
case "ForbiddenException": return [3, 4];
|
|
1410
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 4];
|
|
1411
|
+
case "InternalServerErrorException": return [3, 6];
|
|
1412
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 6];
|
|
1413
|
+
case "NotFoundException": return [3, 8];
|
|
1414
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 8];
|
|
1415
|
+
case "TooManyRequestsException": return [3, 10];
|
|
1416
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 10];
|
|
1417
|
+
}
|
|
1418
|
+
return [3, 12];
|
|
1419
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1420
|
+
case 3: throw _d.sent();
|
|
1421
|
+
case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1422
|
+
case 5: throw _d.sent();
|
|
1423
|
+
case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1424
|
+
case 7: throw _d.sent();
|
|
1425
|
+
case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1426
|
+
case 9: throw _d.sent();
|
|
1427
|
+
case 10: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1428
|
+
case 11: throw _d.sent();
|
|
1429
|
+
case 12:
|
|
1430
|
+
parsedBody = parsedOutput.body;
|
|
1431
|
+
throwDefaultError({
|
|
1432
|
+
output: output,
|
|
1433
|
+
parsedBody: parsedBody,
|
|
1434
|
+
exceptionCtor: __BaseException,
|
|
1435
|
+
errorCode: errorCode,
|
|
1436
|
+
});
|
|
1437
|
+
_d.label = 13;
|
|
1438
|
+
case 13: return [2];
|
|
1439
|
+
}
|
|
1155
1440
|
});
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1441
|
+
}); };
|
|
1442
|
+
export var deserializeAws_restJson1UpdateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1443
|
+
var contents, data, _a, _b;
|
|
1444
|
+
return __generator(this, function (_c) {
|
|
1445
|
+
switch (_c.label) {
|
|
1446
|
+
case 0:
|
|
1447
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1448
|
+
return [2, deserializeAws_restJson1UpdateApplicationCommandError(output, context)];
|
|
1449
|
+
}
|
|
1450
|
+
contents = map({
|
|
1451
|
+
$metadata: deserializeMetadata(output),
|
|
1452
|
+
});
|
|
1453
|
+
_a = __expectNonNull;
|
|
1454
|
+
_b = __expectObject;
|
|
1455
|
+
return [4, parseBody(output.body, context)];
|
|
1456
|
+
case 1:
|
|
1457
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1458
|
+
if (data.applicationId != null) {
|
|
1459
|
+
contents.ApplicationId = __expectString(data.applicationId);
|
|
1460
|
+
}
|
|
1461
|
+
if (data.author != null) {
|
|
1462
|
+
contents.Author = __expectString(data.author);
|
|
1463
|
+
}
|
|
1464
|
+
if (data.creationTime != null) {
|
|
1465
|
+
contents.CreationTime = __expectString(data.creationTime);
|
|
1466
|
+
}
|
|
1467
|
+
if (data.description != null) {
|
|
1468
|
+
contents.Description = __expectString(data.description);
|
|
1469
|
+
}
|
|
1470
|
+
if (data.homePageUrl != null) {
|
|
1471
|
+
contents.HomePageUrl = __expectString(data.homePageUrl);
|
|
1472
|
+
}
|
|
1473
|
+
if (data.isVerifiedAuthor != null) {
|
|
1474
|
+
contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor);
|
|
1475
|
+
}
|
|
1476
|
+
if (data.labels != null) {
|
|
1477
|
+
contents.Labels = deserializeAws_restJson1__listOf__string(data.labels, context);
|
|
1478
|
+
}
|
|
1479
|
+
if (data.licenseUrl != null) {
|
|
1480
|
+
contents.LicenseUrl = __expectString(data.licenseUrl);
|
|
1481
|
+
}
|
|
1482
|
+
if (data.name != null) {
|
|
1483
|
+
contents.Name = __expectString(data.name);
|
|
1484
|
+
}
|
|
1485
|
+
if (data.readmeUrl != null) {
|
|
1486
|
+
contents.ReadmeUrl = __expectString(data.readmeUrl);
|
|
1487
|
+
}
|
|
1488
|
+
if (data.spdxLicenseId != null) {
|
|
1489
|
+
contents.SpdxLicenseId = __expectString(data.spdxLicenseId);
|
|
1490
|
+
}
|
|
1491
|
+
if (data.verifiedAuthorUrl != null) {
|
|
1492
|
+
contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl);
|
|
1493
|
+
}
|
|
1494
|
+
if (data.version != null) {
|
|
1495
|
+
contents.Version = deserializeAws_restJson1Version(data.version, context);
|
|
1496
|
+
}
|
|
1497
|
+
return [2, contents];
|
|
1498
|
+
}
|
|
1170
1499
|
});
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1500
|
+
}); };
|
|
1501
|
+
var deserializeAws_restJson1UpdateApplicationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1502
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1503
|
+
var _c;
|
|
1504
|
+
return __generator(this, function (_d) {
|
|
1505
|
+
switch (_d.label) {
|
|
1506
|
+
case 0:
|
|
1507
|
+
_a = [__assign({}, output)];
|
|
1508
|
+
_c = {};
|
|
1509
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1510
|
+
case 1:
|
|
1511
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1512
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1513
|
+
_b = errorCode;
|
|
1514
|
+
switch (_b) {
|
|
1515
|
+
case "BadRequestException": return [3, 2];
|
|
1516
|
+
case "com.amazonaws.serverlessapplicationrepository#BadRequestException": return [3, 2];
|
|
1517
|
+
case "ConflictException": return [3, 4];
|
|
1518
|
+
case "com.amazonaws.serverlessapplicationrepository#ConflictException": return [3, 4];
|
|
1519
|
+
case "ForbiddenException": return [3, 6];
|
|
1520
|
+
case "com.amazonaws.serverlessapplicationrepository#ForbiddenException": return [3, 6];
|
|
1521
|
+
case "InternalServerErrorException": return [3, 8];
|
|
1522
|
+
case "com.amazonaws.serverlessapplicationrepository#InternalServerErrorException": return [3, 8];
|
|
1523
|
+
case "NotFoundException": return [3, 10];
|
|
1524
|
+
case "com.amazonaws.serverlessapplicationrepository#NotFoundException": return [3, 10];
|
|
1525
|
+
case "TooManyRequestsException": return [3, 12];
|
|
1526
|
+
case "com.amazonaws.serverlessapplicationrepository#TooManyRequestsException": return [3, 12];
|
|
1527
|
+
}
|
|
1528
|
+
return [3, 14];
|
|
1529
|
+
case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
1530
|
+
case 3: throw _d.sent();
|
|
1531
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1532
|
+
case 5: throw _d.sent();
|
|
1533
|
+
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
1534
|
+
case 7: throw _d.sent();
|
|
1535
|
+
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
1536
|
+
case 9: throw _d.sent();
|
|
1537
|
+
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1538
|
+
case 11: throw _d.sent();
|
|
1539
|
+
case 12: return [4, deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)];
|
|
1540
|
+
case 13: throw _d.sent();
|
|
1541
|
+
case 14:
|
|
1542
|
+
parsedBody = parsedOutput.body;
|
|
1543
|
+
throwDefaultError({
|
|
1544
|
+
output: output,
|
|
1545
|
+
parsedBody: parsedBody,
|
|
1546
|
+
exceptionCtor: __BaseException,
|
|
1547
|
+
errorCode: errorCode,
|
|
1548
|
+
});
|
|
1549
|
+
_d.label = 15;
|
|
1550
|
+
case 15: return [2];
|
|
1551
|
+
}
|
|
1185
1552
|
});
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1553
|
+
}); };
|
|
1554
|
+
var map = __map;
|
|
1555
|
+
var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1556
|
+
var contents, data, exception;
|
|
1557
|
+
return __generator(this, function (_a) {
|
|
1558
|
+
contents = map({});
|
|
1559
|
+
data = parsedOutput.body;
|
|
1560
|
+
if (data.errorCode != null) {
|
|
1561
|
+
contents.ErrorCode = __expectString(data.errorCode);
|
|
1562
|
+
}
|
|
1563
|
+
if (data.message != null) {
|
|
1564
|
+
contents.Message = __expectString(data.message);
|
|
1565
|
+
}
|
|
1566
|
+
exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1567
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1200
1568
|
});
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1214
|
-
|
|
1569
|
+
}); };
|
|
1570
|
+
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1571
|
+
var contents, data, exception;
|
|
1572
|
+
return __generator(this, function (_a) {
|
|
1573
|
+
contents = map({});
|
|
1574
|
+
data = parsedOutput.body;
|
|
1575
|
+
if (data.errorCode != null) {
|
|
1576
|
+
contents.ErrorCode = __expectString(data.errorCode);
|
|
1577
|
+
}
|
|
1578
|
+
if (data.message != null) {
|
|
1579
|
+
contents.Message = __expectString(data.message);
|
|
1580
|
+
}
|
|
1581
|
+
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1582
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1215
1583
|
});
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1229
|
-
|
|
1584
|
+
}); };
|
|
1585
|
+
var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1586
|
+
var contents, data, exception;
|
|
1587
|
+
return __generator(this, function (_a) {
|
|
1588
|
+
contents = map({});
|
|
1589
|
+
data = parsedOutput.body;
|
|
1590
|
+
if (data.errorCode != null) {
|
|
1591
|
+
contents.ErrorCode = __expectString(data.errorCode);
|
|
1592
|
+
}
|
|
1593
|
+
if (data.message != null) {
|
|
1594
|
+
contents.Message = __expectString(data.message);
|
|
1595
|
+
}
|
|
1596
|
+
exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1597
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1230
1598
|
});
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1599
|
+
}); };
|
|
1600
|
+
var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1601
|
+
var contents, data, exception;
|
|
1602
|
+
return __generator(this, function (_a) {
|
|
1603
|
+
contents = map({});
|
|
1604
|
+
data = parsedOutput.body;
|
|
1605
|
+
if (data.errorCode != null) {
|
|
1606
|
+
contents.ErrorCode = __expectString(data.errorCode);
|
|
1607
|
+
}
|
|
1608
|
+
if (data.message != null) {
|
|
1609
|
+
contents.Message = __expectString(data.message);
|
|
1610
|
+
}
|
|
1611
|
+
exception = new InternalServerErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1612
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1613
|
+
});
|
|
1614
|
+
}); };
|
|
1615
|
+
var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1616
|
+
var contents, data, exception;
|
|
1617
|
+
return __generator(this, function (_a) {
|
|
1618
|
+
contents = map({});
|
|
1619
|
+
data = parsedOutput.body;
|
|
1620
|
+
if (data.errorCode != null) {
|
|
1621
|
+
contents.ErrorCode = __expectString(data.errorCode);
|
|
1622
|
+
}
|
|
1623
|
+
if (data.message != null) {
|
|
1624
|
+
contents.Message = __expectString(data.message);
|
|
1625
|
+
}
|
|
1626
|
+
exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1627
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1628
|
+
});
|
|
1629
|
+
}); };
|
|
1630
|
+
var deserializeAws_restJson1TooManyRequestsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1631
|
+
var contents, data, exception;
|
|
1632
|
+
return __generator(this, function (_a) {
|
|
1633
|
+
contents = map({});
|
|
1634
|
+
data = parsedOutput.body;
|
|
1635
|
+
if (data.errorCode != null) {
|
|
1636
|
+
contents.ErrorCode = __expectString(data.errorCode);
|
|
1637
|
+
}
|
|
1638
|
+
if (data.message != null) {
|
|
1639
|
+
contents.Message = __expectString(data.message);
|
|
1640
|
+
}
|
|
1641
|
+
exception = new TooManyRequestsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1642
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1643
|
+
});
|
|
1644
|
+
}); };
|
|
1645
|
+
var serializeAws_restJson1__listOf__string = function (input, context) {
|
|
1234
1646
|
return input
|
|
1235
|
-
.filter((e)
|
|
1236
|
-
.map((entry)
|
|
1647
|
+
.filter(function (e) { return e != null; })
|
|
1648
|
+
.map(function (entry) {
|
|
1237
1649
|
return entry;
|
|
1238
1650
|
});
|
|
1239
1651
|
};
|
|
1240
|
-
|
|
1652
|
+
var serializeAws_restJson1__listOfApplicationPolicyStatement = function (input, context) {
|
|
1241
1653
|
return input
|
|
1242
|
-
.filter((e)
|
|
1243
|
-
.map((entry)
|
|
1654
|
+
.filter(function (e) { return e != null; })
|
|
1655
|
+
.map(function (entry) {
|
|
1244
1656
|
return serializeAws_restJson1ApplicationPolicyStatement(entry, context);
|
|
1245
1657
|
});
|
|
1246
1658
|
};
|
|
1247
|
-
|
|
1659
|
+
var serializeAws_restJson1__listOfParameterValue = function (input, context) {
|
|
1248
1660
|
return input
|
|
1249
|
-
.filter((e)
|
|
1250
|
-
.map((entry)
|
|
1661
|
+
.filter(function (e) { return e != null; })
|
|
1662
|
+
.map(function (entry) {
|
|
1251
1663
|
return serializeAws_restJson1ParameterValue(entry, context);
|
|
1252
1664
|
});
|
|
1253
1665
|
};
|
|
1254
|
-
|
|
1666
|
+
var serializeAws_restJson1__listOfRollbackTrigger = function (input, context) {
|
|
1255
1667
|
return input
|
|
1256
|
-
.filter((e)
|
|
1257
|
-
.map((entry)
|
|
1668
|
+
.filter(function (e) { return e != null; })
|
|
1669
|
+
.map(function (entry) {
|
|
1258
1670
|
return serializeAws_restJson1RollbackTrigger(entry, context);
|
|
1259
1671
|
});
|
|
1260
1672
|
};
|
|
1261
|
-
|
|
1673
|
+
var serializeAws_restJson1__listOfTag = function (input, context) {
|
|
1262
1674
|
return input
|
|
1263
|
-
.filter((e)
|
|
1264
|
-
.map((entry)
|
|
1675
|
+
.filter(function (e) { return e != null; })
|
|
1676
|
+
.map(function (entry) {
|
|
1265
1677
|
return serializeAws_restJson1Tag(entry, context);
|
|
1266
1678
|
});
|
|
1267
1679
|
};
|
|
1268
|
-
|
|
1269
|
-
return {
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
principalOrgIDs: serializeAws_restJson1__listOf__string(input.PrincipalOrgIDs, context),
|
|
1273
|
-
}),
|
|
1274
|
-
...(input.Principals != null && { principals: serializeAws_restJson1__listOf__string(input.Principals, context) }),
|
|
1275
|
-
...(input.StatementId != null && { statementId: input.StatementId }),
|
|
1276
|
-
};
|
|
1680
|
+
var serializeAws_restJson1ApplicationPolicyStatement = function (input, context) {
|
|
1681
|
+
return __assign(__assign(__assign(__assign({}, (input.Actions != null && { actions: serializeAws_restJson1__listOf__string(input.Actions, context) })), (input.PrincipalOrgIDs != null && {
|
|
1682
|
+
principalOrgIDs: serializeAws_restJson1__listOf__string(input.PrincipalOrgIDs, context),
|
|
1683
|
+
})), (input.Principals != null && { principals: serializeAws_restJson1__listOf__string(input.Principals, context) })), (input.StatementId != null && { statementId: input.StatementId }));
|
|
1277
1684
|
};
|
|
1278
|
-
|
|
1279
|
-
return {
|
|
1280
|
-
...(input.Name != null && { name: input.Name }),
|
|
1281
|
-
...(input.Value != null && { value: input.Value }),
|
|
1282
|
-
};
|
|
1685
|
+
var serializeAws_restJson1ParameterValue = function (input, context) {
|
|
1686
|
+
return __assign(__assign({}, (input.Name != null && { name: input.Name })), (input.Value != null && { value: input.Value }));
|
|
1283
1687
|
};
|
|
1284
|
-
|
|
1285
|
-
return {
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
rollbackTriggers: serializeAws_restJson1__listOfRollbackTrigger(input.RollbackTriggers, context),
|
|
1289
|
-
}),
|
|
1290
|
-
};
|
|
1688
|
+
var serializeAws_restJson1RollbackConfiguration = function (input, context) {
|
|
1689
|
+
return __assign(__assign({}, (input.MonitoringTimeInMinutes != null && { monitoringTimeInMinutes: input.MonitoringTimeInMinutes })), (input.RollbackTriggers != null && {
|
|
1690
|
+
rollbackTriggers: serializeAws_restJson1__listOfRollbackTrigger(input.RollbackTriggers, context),
|
|
1691
|
+
}));
|
|
1291
1692
|
};
|
|
1292
|
-
|
|
1293
|
-
return {
|
|
1294
|
-
...(input.Arn != null && { arn: input.Arn }),
|
|
1295
|
-
...(input.Type != null && { type: input.Type }),
|
|
1296
|
-
};
|
|
1693
|
+
var serializeAws_restJson1RollbackTrigger = function (input, context) {
|
|
1694
|
+
return __assign(__assign({}, (input.Arn != null && { arn: input.Arn })), (input.Type != null && { type: input.Type }));
|
|
1297
1695
|
};
|
|
1298
|
-
|
|
1299
|
-
return {
|
|
1300
|
-
...(input.Key != null && { key: input.Key }),
|
|
1301
|
-
...(input.Value != null && { value: input.Value }),
|
|
1302
|
-
};
|
|
1696
|
+
var serializeAws_restJson1Tag = function (input, context) {
|
|
1697
|
+
return __assign(__assign({}, (input.Key != null && { key: input.Key })), (input.Value != null && { value: input.Value }));
|
|
1303
1698
|
};
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
.filter((e)
|
|
1307
|
-
.map((entry)
|
|
1699
|
+
var deserializeAws_restJson1__listOf__string = function (output, context) {
|
|
1700
|
+
var retVal = (output || [])
|
|
1701
|
+
.filter(function (e) { return e != null; })
|
|
1702
|
+
.map(function (entry) {
|
|
1308
1703
|
if (entry === null) {
|
|
1309
1704
|
return null;
|
|
1310
1705
|
}
|
|
@@ -1312,10 +1707,10 @@ const deserializeAws_restJson1__listOf__string = (output, context) => {
|
|
|
1312
1707
|
});
|
|
1313
1708
|
return retVal;
|
|
1314
1709
|
};
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
.filter((e)
|
|
1318
|
-
.map((entry)
|
|
1710
|
+
var deserializeAws_restJson1__listOfApplicationDependencySummary = function (output, context) {
|
|
1711
|
+
var retVal = (output || [])
|
|
1712
|
+
.filter(function (e) { return e != null; })
|
|
1713
|
+
.map(function (entry) {
|
|
1319
1714
|
if (entry === null) {
|
|
1320
1715
|
return null;
|
|
1321
1716
|
}
|
|
@@ -1323,10 +1718,10 @@ const deserializeAws_restJson1__listOfApplicationDependencySummary = (output, co
|
|
|
1323
1718
|
});
|
|
1324
1719
|
return retVal;
|
|
1325
1720
|
};
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
.filter((e)
|
|
1329
|
-
.map((entry)
|
|
1721
|
+
var deserializeAws_restJson1__listOfApplicationPolicyStatement = function (output, context) {
|
|
1722
|
+
var retVal = (output || [])
|
|
1723
|
+
.filter(function (e) { return e != null; })
|
|
1724
|
+
.map(function (entry) {
|
|
1330
1725
|
if (entry === null) {
|
|
1331
1726
|
return null;
|
|
1332
1727
|
}
|
|
@@ -1334,10 +1729,10 @@ const deserializeAws_restJson1__listOfApplicationPolicyStatement = (output, cont
|
|
|
1334
1729
|
});
|
|
1335
1730
|
return retVal;
|
|
1336
1731
|
};
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
.filter((e)
|
|
1340
|
-
.map((entry)
|
|
1732
|
+
var deserializeAws_restJson1__listOfApplicationSummary = function (output, context) {
|
|
1733
|
+
var retVal = (output || [])
|
|
1734
|
+
.filter(function (e) { return e != null; })
|
|
1735
|
+
.map(function (entry) {
|
|
1341
1736
|
if (entry === null) {
|
|
1342
1737
|
return null;
|
|
1343
1738
|
}
|
|
@@ -1345,10 +1740,10 @@ const deserializeAws_restJson1__listOfApplicationSummary = (output, context) =>
|
|
|
1345
1740
|
});
|
|
1346
1741
|
return retVal;
|
|
1347
1742
|
};
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
.filter((e)
|
|
1351
|
-
.map((entry)
|
|
1743
|
+
var deserializeAws_restJson1__listOfCapability = function (output, context) {
|
|
1744
|
+
var retVal = (output || [])
|
|
1745
|
+
.filter(function (e) { return e != null; })
|
|
1746
|
+
.map(function (entry) {
|
|
1352
1747
|
if (entry === null) {
|
|
1353
1748
|
return null;
|
|
1354
1749
|
}
|
|
@@ -1356,10 +1751,10 @@ const deserializeAws_restJson1__listOfCapability = (output, context) => {
|
|
|
1356
1751
|
});
|
|
1357
1752
|
return retVal;
|
|
1358
1753
|
};
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
.filter((e)
|
|
1362
|
-
.map((entry)
|
|
1754
|
+
var deserializeAws_restJson1__listOfParameterDefinition = function (output, context) {
|
|
1755
|
+
var retVal = (output || [])
|
|
1756
|
+
.filter(function (e) { return e != null; })
|
|
1757
|
+
.map(function (entry) {
|
|
1363
1758
|
if (entry === null) {
|
|
1364
1759
|
return null;
|
|
1365
1760
|
}
|
|
@@ -1367,10 +1762,10 @@ const deserializeAws_restJson1__listOfParameterDefinition = (output, context) =>
|
|
|
1367
1762
|
});
|
|
1368
1763
|
return retVal;
|
|
1369
1764
|
};
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
.filter((e)
|
|
1373
|
-
.map((entry)
|
|
1765
|
+
var deserializeAws_restJson1__listOfVersionSummary = function (output, context) {
|
|
1766
|
+
var retVal = (output || [])
|
|
1767
|
+
.filter(function (e) { return e != null; })
|
|
1768
|
+
.map(function (entry) {
|
|
1374
1769
|
if (entry === null) {
|
|
1375
1770
|
return null;
|
|
1376
1771
|
}
|
|
@@ -1378,13 +1773,13 @@ const deserializeAws_restJson1__listOfVersionSummary = (output, context) => {
|
|
|
1378
1773
|
});
|
|
1379
1774
|
return retVal;
|
|
1380
1775
|
};
|
|
1381
|
-
|
|
1776
|
+
var deserializeAws_restJson1ApplicationDependencySummary = function (output, context) {
|
|
1382
1777
|
return {
|
|
1383
1778
|
ApplicationId: __expectString(output.applicationId),
|
|
1384
1779
|
SemanticVersion: __expectString(output.semanticVersion),
|
|
1385
1780
|
};
|
|
1386
1781
|
};
|
|
1387
|
-
|
|
1782
|
+
var deserializeAws_restJson1ApplicationPolicyStatement = function (output, context) {
|
|
1388
1783
|
return {
|
|
1389
1784
|
Actions: output.actions != null ? deserializeAws_restJson1__listOf__string(output.actions, context) : undefined,
|
|
1390
1785
|
PrincipalOrgIDs: output.principalOrgIDs != null
|
|
@@ -1394,7 +1789,7 @@ const deserializeAws_restJson1ApplicationPolicyStatement = (output, context) =>
|
|
|
1394
1789
|
StatementId: __expectString(output.statementId),
|
|
1395
1790
|
};
|
|
1396
1791
|
};
|
|
1397
|
-
|
|
1792
|
+
var deserializeAws_restJson1ApplicationSummary = function (output, context) {
|
|
1398
1793
|
return {
|
|
1399
1794
|
ApplicationId: __expectString(output.applicationId),
|
|
1400
1795
|
Author: __expectString(output.author),
|
|
@@ -1406,7 +1801,7 @@ const deserializeAws_restJson1ApplicationSummary = (output, context) => {
|
|
|
1406
1801
|
SpdxLicenseId: __expectString(output.spdxLicenseId),
|
|
1407
1802
|
};
|
|
1408
1803
|
};
|
|
1409
|
-
|
|
1804
|
+
var deserializeAws_restJson1ParameterDefinition = function (output, context) {
|
|
1410
1805
|
return {
|
|
1411
1806
|
AllowedPattern: __expectString(output.allowedPattern),
|
|
1412
1807
|
AllowedValues: output.allowedValues != null
|
|
@@ -1427,7 +1822,7 @@ const deserializeAws_restJson1ParameterDefinition = (output, context) => {
|
|
|
1427
1822
|
Type: __expectString(output.type),
|
|
1428
1823
|
};
|
|
1429
1824
|
};
|
|
1430
|
-
|
|
1825
|
+
var deserializeAws_restJson1Version = function (output, context) {
|
|
1431
1826
|
return {
|
|
1432
1827
|
ApplicationId: __expectString(output.applicationId),
|
|
1433
1828
|
CreationTime: __expectString(output.creationTime),
|
|
@@ -1444,7 +1839,7 @@ const deserializeAws_restJson1Version = (output, context) => {
|
|
|
1444
1839
|
TemplateUrl: __expectString(output.templateUrl),
|
|
1445
1840
|
};
|
|
1446
1841
|
};
|
|
1447
|
-
|
|
1842
|
+
var deserializeAws_restJson1VersionSummary = function (output, context) {
|
|
1448
1843
|
return {
|
|
1449
1844
|
ApplicationId: __expectString(output.applicationId),
|
|
1450
1845
|
CreationTime: __expectString(output.creationTime),
|
|
@@ -1452,39 +1847,57 @@ const deserializeAws_restJson1VersionSummary = (output, context) => {
|
|
|
1452
1847
|
SourceCodeUrl: __expectString(output.sourceCodeUrl),
|
|
1453
1848
|
};
|
|
1454
1849
|
};
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1850
|
+
var deserializeMetadata = function (output) {
|
|
1851
|
+
var _a, _b;
|
|
1852
|
+
return ({
|
|
1853
|
+
httpStatusCode: output.statusCode,
|
|
1854
|
+
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
1855
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1856
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1857
|
+
});
|
|
1858
|
+
};
|
|
1859
|
+
var collectBody = function (streamBody, context) {
|
|
1860
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1462
1861
|
if (streamBody instanceof Uint8Array) {
|
|
1463
1862
|
return Promise.resolve(streamBody);
|
|
1464
1863
|
}
|
|
1465
1864
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1466
1865
|
};
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1866
|
+
var collectBodyString = function (streamBody, context) {
|
|
1867
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1868
|
+
};
|
|
1869
|
+
var isSerializableHeaderValue = function (value) {
|
|
1870
|
+
return value !== undefined &&
|
|
1871
|
+
value !== null &&
|
|
1872
|
+
value !== "" &&
|
|
1873
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1874
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1875
|
+
};
|
|
1876
|
+
var parseBody = function (streamBody, context) {
|
|
1877
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1878
|
+
if (encoded.length) {
|
|
1879
|
+
return JSON.parse(encoded);
|
|
1880
|
+
}
|
|
1881
|
+
return {};
|
|
1882
|
+
});
|
|
1483
1883
|
};
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1884
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1885
|
+
var value;
|
|
1886
|
+
var _a;
|
|
1887
|
+
return __generator(this, function (_b) {
|
|
1888
|
+
switch (_b.label) {
|
|
1889
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1890
|
+
case 1:
|
|
1891
|
+
value = _b.sent();
|
|
1892
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1893
|
+
return [2, value];
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1896
|
+
}); };
|
|
1897
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
1898
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1899
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
1900
|
+
var cleanValue = rawValue;
|
|
1488
1901
|
if (typeof cleanValue === "number") {
|
|
1489
1902
|
cleanValue = cleanValue.toString();
|
|
1490
1903
|
}
|
|
@@ -1499,7 +1912,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1499
1912
|
}
|
|
1500
1913
|
return cleanValue;
|
|
1501
1914
|
};
|
|
1502
|
-
|
|
1915
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1503
1916
|
if (headerKey !== undefined) {
|
|
1504
1917
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1505
1918
|
}
|