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