@aws-sdk/client-service-catalog-appregistry 3.185.0 → 3.188.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 +16 -0
- package/dist-es/ServiceCatalogAppRegistry.js +90 -97
- package/dist-es/ServiceCatalogAppRegistryClient.js +22 -28
- package/dist-es/commands/AssociateAttributeGroupCommand.js +21 -28
- package/dist-es/commands/AssociateResourceCommand.js +21 -28
- package/dist-es/commands/CreateApplicationCommand.js +21 -28
- package/dist-es/commands/CreateAttributeGroupCommand.js +21 -28
- package/dist-es/commands/DeleteApplicationCommand.js +21 -28
- package/dist-es/commands/DeleteAttributeGroupCommand.js +21 -28
- package/dist-es/commands/DisassociateAttributeGroupCommand.js +21 -28
- package/dist-es/commands/DisassociateResourceCommand.js +21 -28
- package/dist-es/commands/GetApplicationCommand.js +21 -28
- package/dist-es/commands/GetAssociatedResourceCommand.js +21 -28
- package/dist-es/commands/GetAttributeGroupCommand.js +21 -28
- package/dist-es/commands/ListApplicationsCommand.js +21 -28
- package/dist-es/commands/ListAssociatedAttributeGroupsCommand.js +21 -28
- package/dist-es/commands/ListAssociatedResourcesCommand.js +21 -28
- package/dist-es/commands/ListAttributeGroupsCommand.js +21 -28
- package/dist-es/commands/ListAttributeGroupsForApplicationCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/SyncResourceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateApplicationCommand.js +21 -28
- package/dist-es/commands/UpdateAttributeGroupCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ServiceCatalogAppRegistryServiceException.js +5 -10
- package/dist-es/models/models_0.js +217 -110
- package/dist-es/pagination/ListApplicationsPaginator.js +25 -68
- package/dist-es/pagination/ListAssociatedAttributeGroupsPaginator.js +25 -68
- package/dist-es/pagination/ListAssociatedResourcesPaginator.js +25 -68
- package/dist-es/pagination/ListAttributeGroupsForApplicationPaginator.js +25 -68
- package/dist-es/pagination/ListAttributeGroupsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1464 -2149
- 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,2131 +1,1463 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
6
5
|
import { ServiceCatalogAppRegistryServiceException as __BaseException } from "../models/ServiceCatalogAppRegistryServiceException";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
method: "PUT",
|
|
24
|
-
headers: headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
body: body,
|
|
27
|
-
})];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}); };
|
|
31
|
-
export var serializeAws_restJson1AssociateResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
32
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
33
|
-
return __generator(this, function (_c) {
|
|
34
|
-
switch (_c.label) {
|
|
35
|
-
case 0: return [4, context.endpoint()];
|
|
36
|
-
case 1:
|
|
37
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
38
|
-
headers = {};
|
|
39
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
40
|
-
"/applications/{application}/resources/{resourceType}/{resource}";
|
|
41
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
42
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", function () { return input.resourceType; }, "{resourceType}", false);
|
|
43
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resource", function () { return input.resource; }, "{resource}", false);
|
|
44
|
-
return [2, new __HttpRequest({
|
|
45
|
-
protocol: protocol,
|
|
46
|
-
hostname: hostname,
|
|
47
|
-
port: port,
|
|
48
|
-
method: "PUT",
|
|
49
|
-
headers: headers,
|
|
50
|
-
path: resolvedPath,
|
|
51
|
-
body: body,
|
|
52
|
-
})];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}); };
|
|
56
|
-
export var serializeAws_restJson1CreateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
57
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
58
|
-
var _c;
|
|
59
|
-
return __generator(this, function (_d) {
|
|
60
|
-
switch (_d.label) {
|
|
61
|
-
case 0: return [4, context.endpoint()];
|
|
62
|
-
case 1:
|
|
63
|
-
_a = _d.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";
|
|
68
|
-
body = JSON.stringify(__assign(__assign(__assign({ clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.description != null && { description: input.description })), (input.name != null && { name: input.name })), (input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) })));
|
|
69
|
-
return [2, new __HttpRequest({
|
|
70
|
-
protocol: protocol,
|
|
71
|
-
hostname: hostname,
|
|
72
|
-
port: port,
|
|
73
|
-
method: "POST",
|
|
74
|
-
headers: headers,
|
|
75
|
-
path: resolvedPath,
|
|
76
|
-
body: body,
|
|
77
|
-
})];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}); };
|
|
81
|
-
export var serializeAws_restJson1CreateAttributeGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
83
|
-
var _c;
|
|
84
|
-
return __generator(this, function (_d) {
|
|
85
|
-
switch (_d.label) {
|
|
86
|
-
case 0: return [4, context.endpoint()];
|
|
87
|
-
case 1:
|
|
88
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
89
|
-
headers = {
|
|
90
|
-
"content-type": "application/json",
|
|
91
|
-
};
|
|
92
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/attribute-groups";
|
|
93
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.attributes != null && { attributes: input.attributes })), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.description != null && { description: input.description })), (input.name != null && { name: input.name })), (input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) })));
|
|
94
|
-
return [2, new __HttpRequest({
|
|
95
|
-
protocol: protocol,
|
|
96
|
-
hostname: hostname,
|
|
97
|
-
port: port,
|
|
98
|
-
method: "POST",
|
|
99
|
-
headers: headers,
|
|
100
|
-
path: resolvedPath,
|
|
101
|
-
body: body,
|
|
102
|
-
})];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}); };
|
|
106
|
-
export var serializeAws_restJson1DeleteApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
107
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
108
|
-
return __generator(this, function (_c) {
|
|
109
|
-
switch (_c.label) {
|
|
110
|
-
case 0: return [4, context.endpoint()];
|
|
111
|
-
case 1:
|
|
112
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
113
|
-
headers = {};
|
|
114
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{application}";
|
|
115
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
116
|
-
return [2, new __HttpRequest({
|
|
117
|
-
protocol: protocol,
|
|
118
|
-
hostname: hostname,
|
|
119
|
-
port: port,
|
|
120
|
-
method: "DELETE",
|
|
121
|
-
headers: headers,
|
|
122
|
-
path: resolvedPath,
|
|
123
|
-
body: body,
|
|
124
|
-
})];
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}); };
|
|
128
|
-
export var serializeAws_restJson1DeleteAttributeGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
129
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
130
|
-
return __generator(this, function (_c) {
|
|
131
|
-
switch (_c.label) {
|
|
132
|
-
case 0: return [4, context.endpoint()];
|
|
133
|
-
case 1:
|
|
134
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
135
|
-
headers = {};
|
|
136
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/attribute-groups/{attributeGroup}";
|
|
137
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", function () { return input.attributeGroup; }, "{attributeGroup}", false);
|
|
138
|
-
return [2, new __HttpRequest({
|
|
139
|
-
protocol: protocol,
|
|
140
|
-
hostname: hostname,
|
|
141
|
-
port: port,
|
|
142
|
-
method: "DELETE",
|
|
143
|
-
headers: headers,
|
|
144
|
-
path: resolvedPath,
|
|
145
|
-
body: body,
|
|
146
|
-
})];
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}); };
|
|
150
|
-
export var serializeAws_restJson1DisassociateAttributeGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
151
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
152
|
-
return __generator(this, function (_c) {
|
|
153
|
-
switch (_c.label) {
|
|
154
|
-
case 0: return [4, context.endpoint()];
|
|
155
|
-
case 1:
|
|
156
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
157
|
-
headers = {};
|
|
158
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
159
|
-
"/applications/{application}/attribute-groups/{attributeGroup}";
|
|
160
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
161
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", function () { return input.attributeGroup; }, "{attributeGroup}", false);
|
|
162
|
-
return [2, new __HttpRequest({
|
|
163
|
-
protocol: protocol,
|
|
164
|
-
hostname: hostname,
|
|
165
|
-
port: port,
|
|
166
|
-
method: "DELETE",
|
|
167
|
-
headers: headers,
|
|
168
|
-
path: resolvedPath,
|
|
169
|
-
body: body,
|
|
170
|
-
})];
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}); };
|
|
174
|
-
export var serializeAws_restJson1DisassociateResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
175
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
176
|
-
return __generator(this, function (_c) {
|
|
177
|
-
switch (_c.label) {
|
|
178
|
-
case 0: return [4, context.endpoint()];
|
|
179
|
-
case 1:
|
|
180
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
181
|
-
headers = {};
|
|
182
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
183
|
-
"/applications/{application}/resources/{resourceType}/{resource}";
|
|
184
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
185
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", function () { return input.resourceType; }, "{resourceType}", false);
|
|
186
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resource", function () { return input.resource; }, "{resource}", false);
|
|
187
|
-
return [2, new __HttpRequest({
|
|
188
|
-
protocol: protocol,
|
|
189
|
-
hostname: hostname,
|
|
190
|
-
port: port,
|
|
191
|
-
method: "DELETE",
|
|
192
|
-
headers: headers,
|
|
193
|
-
path: resolvedPath,
|
|
194
|
-
body: body,
|
|
195
|
-
})];
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
}); };
|
|
199
|
-
export var serializeAws_restJson1GetApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
200
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
201
|
-
return __generator(this, function (_c) {
|
|
202
|
-
switch (_c.label) {
|
|
203
|
-
case 0: return [4, context.endpoint()];
|
|
204
|
-
case 1:
|
|
205
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
206
|
-
headers = {};
|
|
207
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{application}";
|
|
208
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
209
|
-
return [2, new __HttpRequest({
|
|
210
|
-
protocol: protocol,
|
|
211
|
-
hostname: hostname,
|
|
212
|
-
port: port,
|
|
213
|
-
method: "GET",
|
|
214
|
-
headers: headers,
|
|
215
|
-
path: resolvedPath,
|
|
216
|
-
body: body,
|
|
217
|
-
})];
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}); };
|
|
221
|
-
export var serializeAws_restJson1GetAssociatedResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
222
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
223
|
-
return __generator(this, function (_c) {
|
|
224
|
-
switch (_c.label) {
|
|
225
|
-
case 0: return [4, context.endpoint()];
|
|
226
|
-
case 1:
|
|
227
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
228
|
-
headers = {};
|
|
229
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
230
|
-
"/applications/{application}/resources/{resourceType}/{resource}";
|
|
231
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
232
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", function () { return input.resourceType; }, "{resourceType}", false);
|
|
233
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resource", function () { return input.resource; }, "{resource}", false);
|
|
234
|
-
return [2, new __HttpRequest({
|
|
235
|
-
protocol: protocol,
|
|
236
|
-
hostname: hostname,
|
|
237
|
-
port: port,
|
|
238
|
-
method: "GET",
|
|
239
|
-
headers: headers,
|
|
240
|
-
path: resolvedPath,
|
|
241
|
-
body: body,
|
|
242
|
-
})];
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}); };
|
|
246
|
-
export var serializeAws_restJson1GetAttributeGroupCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
247
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
248
|
-
return __generator(this, function (_c) {
|
|
249
|
-
switch (_c.label) {
|
|
250
|
-
case 0: return [4, context.endpoint()];
|
|
251
|
-
case 1:
|
|
252
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
253
|
-
headers = {};
|
|
254
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/attribute-groups/{attributeGroup}";
|
|
255
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", function () { return input.attributeGroup; }, "{attributeGroup}", false);
|
|
256
|
-
return [2, new __HttpRequest({
|
|
257
|
-
protocol: protocol,
|
|
258
|
-
hostname: hostname,
|
|
259
|
-
port: port,
|
|
260
|
-
method: "GET",
|
|
261
|
-
headers: headers,
|
|
262
|
-
path: resolvedPath,
|
|
263
|
-
body: body,
|
|
264
|
-
})];
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
}); };
|
|
268
|
-
export var serializeAws_restJson1ListApplicationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
269
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
270
|
-
return __generator(this, function (_c) {
|
|
271
|
-
switch (_c.label) {
|
|
272
|
-
case 0: return [4, context.endpoint()];
|
|
273
|
-
case 1:
|
|
274
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
275
|
-
headers = {};
|
|
276
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
277
|
-
query = map({
|
|
278
|
-
nextToken: [, input.nextToken],
|
|
279
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
280
|
-
});
|
|
281
|
-
return [2, new __HttpRequest({
|
|
282
|
-
protocol: protocol,
|
|
283
|
-
hostname: hostname,
|
|
284
|
-
port: port,
|
|
285
|
-
method: "GET",
|
|
286
|
-
headers: headers,
|
|
287
|
-
path: resolvedPath,
|
|
288
|
-
query: query,
|
|
289
|
-
body: body,
|
|
290
|
-
})];
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
}); };
|
|
294
|
-
export var serializeAws_restJson1ListAssociatedAttributeGroupsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
295
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
296
|
-
return __generator(this, function (_c) {
|
|
297
|
-
switch (_c.label) {
|
|
298
|
-
case 0: return [4, context.endpoint()];
|
|
299
|
-
case 1:
|
|
300
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
301
|
-
headers = {};
|
|
302
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
303
|
-
"/applications/{application}/attribute-groups";
|
|
304
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
305
|
-
query = map({
|
|
306
|
-
nextToken: [, input.nextToken],
|
|
307
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
308
|
-
});
|
|
309
|
-
return [2, new __HttpRequest({
|
|
310
|
-
protocol: protocol,
|
|
311
|
-
hostname: hostname,
|
|
312
|
-
port: port,
|
|
313
|
-
method: "GET",
|
|
314
|
-
headers: headers,
|
|
315
|
-
path: resolvedPath,
|
|
316
|
-
query: query,
|
|
317
|
-
body: body,
|
|
318
|
-
})];
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
}); };
|
|
322
|
-
export var serializeAws_restJson1ListAssociatedResourcesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
323
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
324
|
-
return __generator(this, function (_c) {
|
|
325
|
-
switch (_c.label) {
|
|
326
|
-
case 0: return [4, context.endpoint()];
|
|
327
|
-
case 1:
|
|
328
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
329
|
-
headers = {};
|
|
330
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{application}/resources";
|
|
331
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
332
|
-
query = map({
|
|
333
|
-
nextToken: [, input.nextToken],
|
|
334
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
335
|
-
});
|
|
336
|
-
return [2, new __HttpRequest({
|
|
337
|
-
protocol: protocol,
|
|
338
|
-
hostname: hostname,
|
|
339
|
-
port: port,
|
|
340
|
-
method: "GET",
|
|
341
|
-
headers: headers,
|
|
342
|
-
path: resolvedPath,
|
|
343
|
-
query: query,
|
|
344
|
-
body: body,
|
|
345
|
-
})];
|
|
346
|
-
}
|
|
6
|
+
export const serializeAws_restJson1AssociateAttributeGroupCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
10
|
+
"/applications/{application}/attribute-groups/{attributeGroup}";
|
|
11
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
12
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
|
|
13
|
+
let body;
|
|
14
|
+
return new __HttpRequest({
|
|
15
|
+
protocol,
|
|
16
|
+
hostname,
|
|
17
|
+
port,
|
|
18
|
+
method: "PUT",
|
|
19
|
+
headers,
|
|
20
|
+
path: resolvedPath,
|
|
21
|
+
body,
|
|
347
22
|
});
|
|
348
|
-
}
|
|
349
|
-
export
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
method: "GET",
|
|
367
|
-
headers: headers,
|
|
368
|
-
path: resolvedPath,
|
|
369
|
-
query: query,
|
|
370
|
-
body: body,
|
|
371
|
-
})];
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
}); };
|
|
375
|
-
export var serializeAws_restJson1ListAttributeGroupsForApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
376
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
377
|
-
return __generator(this, function (_c) {
|
|
378
|
-
switch (_c.label) {
|
|
379
|
-
case 0: return [4, context.endpoint()];
|
|
380
|
-
case 1:
|
|
381
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
382
|
-
headers = {};
|
|
383
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
384
|
-
"/applications/{application}/attribute-group-details";
|
|
385
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "application", function () { return input.application; }, "{application}", false);
|
|
386
|
-
query = map({
|
|
387
|
-
nextToken: [, input.nextToken],
|
|
388
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
389
|
-
});
|
|
390
|
-
return [2, new __HttpRequest({
|
|
391
|
-
protocol: protocol,
|
|
392
|
-
hostname: hostname,
|
|
393
|
-
port: port,
|
|
394
|
-
method: "GET",
|
|
395
|
-
headers: headers,
|
|
396
|
-
path: resolvedPath,
|
|
397
|
-
query: query,
|
|
398
|
-
body: body,
|
|
399
|
-
})];
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
}); };
|
|
403
|
-
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
404
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
405
|
-
return __generator(this, function (_c) {
|
|
406
|
-
switch (_c.label) {
|
|
407
|
-
case 0: return [4, context.endpoint()];
|
|
408
|
-
case 1:
|
|
409
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
410
|
-
headers = {};
|
|
411
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
412
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
413
|
-
return [2, new __HttpRequest({
|
|
414
|
-
protocol: protocol,
|
|
415
|
-
hostname: hostname,
|
|
416
|
-
port: port,
|
|
417
|
-
method: "GET",
|
|
418
|
-
headers: headers,
|
|
419
|
-
path: resolvedPath,
|
|
420
|
-
body: body,
|
|
421
|
-
})];
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
}); };
|
|
425
|
-
export var serializeAws_restJson1SyncResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
426
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
427
|
-
return __generator(this, function (_c) {
|
|
428
|
-
switch (_c.label) {
|
|
429
|
-
case 0: return [4, context.endpoint()];
|
|
430
|
-
case 1:
|
|
431
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
432
|
-
headers = {};
|
|
433
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sync/{resourceType}/{resource}";
|
|
434
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", function () { return input.resourceType; }, "{resourceType}", false);
|
|
435
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resource", function () { return input.resource; }, "{resource}", false);
|
|
436
|
-
return [2, new __HttpRequest({
|
|
437
|
-
protocol: protocol,
|
|
438
|
-
hostname: hostname,
|
|
439
|
-
port: port,
|
|
440
|
-
method: "POST",
|
|
441
|
-
headers: headers,
|
|
442
|
-
path: resolvedPath,
|
|
443
|
-
body: body,
|
|
444
|
-
})];
|
|
445
|
-
}
|
|
446
|
-
});
|
|
447
|
-
}); };
|
|
448
|
-
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
449
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
450
|
-
return __generator(this, function (_c) {
|
|
451
|
-
switch (_c.label) {
|
|
452
|
-
case 0: return [4, context.endpoint()];
|
|
453
|
-
case 1:
|
|
454
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
455
|
-
headers = {
|
|
456
|
-
"content-type": "application/json",
|
|
457
|
-
};
|
|
458
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
459
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
460
|
-
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) })));
|
|
461
|
-
return [2, new __HttpRequest({
|
|
462
|
-
protocol: protocol,
|
|
463
|
-
hostname: hostname,
|
|
464
|
-
port: port,
|
|
465
|
-
method: "POST",
|
|
466
|
-
headers: headers,
|
|
467
|
-
path: resolvedPath,
|
|
468
|
-
body: body,
|
|
469
|
-
})];
|
|
470
|
-
}
|
|
23
|
+
};
|
|
24
|
+
export const serializeAws_restJson1AssociateResourceCommand = async (input, context) => {
|
|
25
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
26
|
+
const headers = {};
|
|
27
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
28
|
+
"/applications/{application}/resources/{resourceType}/{resource}";
|
|
29
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
30
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", () => input.resourceType, "{resourceType}", false);
|
|
31
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resource", () => input.resource, "{resource}", false);
|
|
32
|
+
let body;
|
|
33
|
+
return new __HttpRequest({
|
|
34
|
+
protocol,
|
|
35
|
+
hostname,
|
|
36
|
+
port,
|
|
37
|
+
method: "PUT",
|
|
38
|
+
headers,
|
|
39
|
+
path: resolvedPath,
|
|
40
|
+
body,
|
|
471
41
|
});
|
|
472
|
-
}
|
|
473
|
-
export
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
body: body,
|
|
495
|
-
})];
|
|
496
|
-
}
|
|
42
|
+
};
|
|
43
|
+
export const serializeAws_restJson1CreateApplicationCommand = async (input, context) => {
|
|
44
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
45
|
+
const headers = {
|
|
46
|
+
"content-type": "application/json",
|
|
47
|
+
};
|
|
48
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
49
|
+
let body;
|
|
50
|
+
body = JSON.stringify({
|
|
51
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
52
|
+
...(input.description != null && { description: input.description }),
|
|
53
|
+
...(input.name != null && { name: input.name }),
|
|
54
|
+
...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
55
|
+
});
|
|
56
|
+
return new __HttpRequest({
|
|
57
|
+
protocol,
|
|
58
|
+
hostname,
|
|
59
|
+
port,
|
|
60
|
+
method: "POST",
|
|
61
|
+
headers,
|
|
62
|
+
path: resolvedPath,
|
|
63
|
+
body,
|
|
497
64
|
});
|
|
498
|
-
}
|
|
499
|
-
export
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
}
|
|
65
|
+
};
|
|
66
|
+
export const serializeAws_restJson1CreateAttributeGroupCommand = async (input, context) => {
|
|
67
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
68
|
+
const headers = {
|
|
69
|
+
"content-type": "application/json",
|
|
70
|
+
};
|
|
71
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups";
|
|
72
|
+
let body;
|
|
73
|
+
body = JSON.stringify({
|
|
74
|
+
...(input.attributes != null && { attributes: input.attributes }),
|
|
75
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
76
|
+
...(input.description != null && { description: input.description }),
|
|
77
|
+
...(input.name != null && { name: input.name }),
|
|
78
|
+
...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
79
|
+
});
|
|
80
|
+
return new __HttpRequest({
|
|
81
|
+
protocol,
|
|
82
|
+
hostname,
|
|
83
|
+
port,
|
|
84
|
+
method: "POST",
|
|
85
|
+
headers,
|
|
86
|
+
path: resolvedPath,
|
|
87
|
+
body,
|
|
522
88
|
});
|
|
523
|
-
}
|
|
524
|
-
export
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
protocol: protocol,
|
|
539
|
-
hostname: hostname,
|
|
540
|
-
port: port,
|
|
541
|
-
method: "PATCH",
|
|
542
|
-
headers: headers,
|
|
543
|
-
path: resolvedPath,
|
|
544
|
-
body: body,
|
|
545
|
-
})];
|
|
546
|
-
}
|
|
89
|
+
};
|
|
90
|
+
export const serializeAws_restJson1DeleteApplicationCommand = async (input, context) => {
|
|
91
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
92
|
+
const headers = {};
|
|
93
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{application}";
|
|
94
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
95
|
+
let body;
|
|
96
|
+
return new __HttpRequest({
|
|
97
|
+
protocol,
|
|
98
|
+
hostname,
|
|
99
|
+
port,
|
|
100
|
+
method: "DELETE",
|
|
101
|
+
headers,
|
|
102
|
+
path: resolvedPath,
|
|
103
|
+
body,
|
|
547
104
|
});
|
|
548
|
-
}
|
|
549
|
-
export
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
case 1:
|
|
564
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
565
|
-
if (data.applicationArn != null) {
|
|
566
|
-
contents.applicationArn = __expectString(data.applicationArn);
|
|
567
|
-
}
|
|
568
|
-
if (data.attributeGroupArn != null) {
|
|
569
|
-
contents.attributeGroupArn = __expectString(data.attributeGroupArn);
|
|
570
|
-
}
|
|
571
|
-
return [2, contents];
|
|
572
|
-
}
|
|
105
|
+
};
|
|
106
|
+
export const serializeAws_restJson1DeleteAttributeGroupCommand = async (input, context) => {
|
|
107
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
108
|
+
const headers = {};
|
|
109
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups/{attributeGroup}";
|
|
110
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
|
|
111
|
+
let body;
|
|
112
|
+
return new __HttpRequest({
|
|
113
|
+
protocol,
|
|
114
|
+
hostname,
|
|
115
|
+
port,
|
|
116
|
+
method: "DELETE",
|
|
117
|
+
headers,
|
|
118
|
+
path: resolvedPath,
|
|
119
|
+
body,
|
|
573
120
|
});
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
case "InternalServerException": return [3, 4];
|
|
592
|
-
case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3, 4];
|
|
593
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
594
|
-
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException": return [3, 6];
|
|
595
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
596
|
-
case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException": return [3, 8];
|
|
597
|
-
case "ValidationException": return [3, 10];
|
|
598
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 10];
|
|
599
|
-
}
|
|
600
|
-
return [3, 12];
|
|
601
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
602
|
-
case 3: throw _d.sent();
|
|
603
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
604
|
-
case 5: throw _d.sent();
|
|
605
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
606
|
-
case 7: throw _d.sent();
|
|
607
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
608
|
-
case 9: throw _d.sent();
|
|
609
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
610
|
-
case 11: throw _d.sent();
|
|
611
|
-
case 12:
|
|
612
|
-
parsedBody = parsedOutput.body;
|
|
613
|
-
throwDefaultError({
|
|
614
|
-
output: output,
|
|
615
|
-
parsedBody: parsedBody,
|
|
616
|
-
exceptionCtor: __BaseException,
|
|
617
|
-
errorCode: errorCode,
|
|
618
|
-
});
|
|
619
|
-
_d.label = 13;
|
|
620
|
-
case 13: return [2];
|
|
621
|
-
}
|
|
121
|
+
};
|
|
122
|
+
export const serializeAws_restJson1DisassociateAttributeGroupCommand = async (input, context) => {
|
|
123
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
124
|
+
const headers = {};
|
|
125
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
126
|
+
"/applications/{application}/attribute-groups/{attributeGroup}";
|
|
127
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
128
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
|
|
129
|
+
let body;
|
|
130
|
+
return new __HttpRequest({
|
|
131
|
+
protocol,
|
|
132
|
+
hostname,
|
|
133
|
+
port,
|
|
134
|
+
method: "DELETE",
|
|
135
|
+
headers,
|
|
136
|
+
path: resolvedPath,
|
|
137
|
+
body,
|
|
622
138
|
});
|
|
623
|
-
}
|
|
624
|
-
export
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
contents.applicationArn = __expectString(data.applicationArn);
|
|
642
|
-
}
|
|
643
|
-
if (data.resourceArn != null) {
|
|
644
|
-
contents.resourceArn = __expectString(data.resourceArn);
|
|
645
|
-
}
|
|
646
|
-
return [2, contents];
|
|
647
|
-
}
|
|
139
|
+
};
|
|
140
|
+
export const serializeAws_restJson1DisassociateResourceCommand = async (input, context) => {
|
|
141
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
142
|
+
const headers = {};
|
|
143
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
144
|
+
"/applications/{application}/resources/{resourceType}/{resource}";
|
|
145
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
146
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", () => input.resourceType, "{resourceType}", false);
|
|
147
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resource", () => input.resource, "{resource}", false);
|
|
148
|
+
let body;
|
|
149
|
+
return new __HttpRequest({
|
|
150
|
+
protocol,
|
|
151
|
+
hostname,
|
|
152
|
+
port,
|
|
153
|
+
method: "DELETE",
|
|
154
|
+
headers,
|
|
155
|
+
path: resolvedPath,
|
|
156
|
+
body,
|
|
648
157
|
});
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
case "ConflictException": return [3, 2];
|
|
665
|
-
case "com.amazonaws.servicecatalogappregistry#ConflictException": return [3, 2];
|
|
666
|
-
case "InternalServerException": return [3, 4];
|
|
667
|
-
case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3, 4];
|
|
668
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
669
|
-
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException": return [3, 6];
|
|
670
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
671
|
-
case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException": return [3, 8];
|
|
672
|
-
case "ValidationException": return [3, 10];
|
|
673
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 10];
|
|
674
|
-
}
|
|
675
|
-
return [3, 12];
|
|
676
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
677
|
-
case 3: throw _d.sent();
|
|
678
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
679
|
-
case 5: throw _d.sent();
|
|
680
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
681
|
-
case 7: throw _d.sent();
|
|
682
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
683
|
-
case 9: throw _d.sent();
|
|
684
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
685
|
-
case 11: throw _d.sent();
|
|
686
|
-
case 12:
|
|
687
|
-
parsedBody = parsedOutput.body;
|
|
688
|
-
throwDefaultError({
|
|
689
|
-
output: output,
|
|
690
|
-
parsedBody: parsedBody,
|
|
691
|
-
exceptionCtor: __BaseException,
|
|
692
|
-
errorCode: errorCode,
|
|
693
|
-
});
|
|
694
|
-
_d.label = 13;
|
|
695
|
-
case 13: return [2];
|
|
696
|
-
}
|
|
158
|
+
};
|
|
159
|
+
export const serializeAws_restJson1GetApplicationCommand = async (input, context) => {
|
|
160
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
161
|
+
const headers = {};
|
|
162
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{application}";
|
|
163
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
164
|
+
let body;
|
|
165
|
+
return new __HttpRequest({
|
|
166
|
+
protocol,
|
|
167
|
+
hostname,
|
|
168
|
+
port,
|
|
169
|
+
method: "GET",
|
|
170
|
+
headers,
|
|
171
|
+
path: resolvedPath,
|
|
172
|
+
body,
|
|
697
173
|
});
|
|
698
|
-
}
|
|
699
|
-
export
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
717
|
-
}
|
|
718
|
-
return [2, contents];
|
|
719
|
-
}
|
|
174
|
+
};
|
|
175
|
+
export const serializeAws_restJson1GetAssociatedResourceCommand = async (input, context) => {
|
|
176
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
177
|
+
const headers = {};
|
|
178
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
179
|
+
"/applications/{application}/resources/{resourceType}/{resource}";
|
|
180
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
181
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", () => input.resourceType, "{resourceType}", false);
|
|
182
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resource", () => input.resource, "{resource}", false);
|
|
183
|
+
let body;
|
|
184
|
+
return new __HttpRequest({
|
|
185
|
+
protocol,
|
|
186
|
+
hostname,
|
|
187
|
+
port,
|
|
188
|
+
method: "GET",
|
|
189
|
+
headers,
|
|
190
|
+
path: resolvedPath,
|
|
191
|
+
body,
|
|
720
192
|
});
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
case "ConflictException": return [3, 2];
|
|
737
|
-
case "com.amazonaws.servicecatalogappregistry#ConflictException": return [3, 2];
|
|
738
|
-
case "InternalServerException": return [3, 4];
|
|
739
|
-
case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3, 4];
|
|
740
|
-
case "ServiceQuotaExceededException": return [3, 6];
|
|
741
|
-
case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException": return [3, 6];
|
|
742
|
-
case "ValidationException": return [3, 8];
|
|
743
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 8];
|
|
744
|
-
}
|
|
745
|
-
return [3, 10];
|
|
746
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
747
|
-
case 3: throw _d.sent();
|
|
748
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
749
|
-
case 5: throw _d.sent();
|
|
750
|
-
case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
751
|
-
case 7: throw _d.sent();
|
|
752
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
753
|
-
case 9: throw _d.sent();
|
|
754
|
-
case 10:
|
|
755
|
-
parsedBody = parsedOutput.body;
|
|
756
|
-
throwDefaultError({
|
|
757
|
-
output: output,
|
|
758
|
-
parsedBody: parsedBody,
|
|
759
|
-
exceptionCtor: __BaseException,
|
|
760
|
-
errorCode: errorCode,
|
|
761
|
-
});
|
|
762
|
-
_d.label = 11;
|
|
763
|
-
case 11: return [2];
|
|
764
|
-
}
|
|
193
|
+
};
|
|
194
|
+
export const serializeAws_restJson1GetAttributeGroupCommand = async (input, context) => {
|
|
195
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
196
|
+
const headers = {};
|
|
197
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups/{attributeGroup}";
|
|
198
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
|
|
199
|
+
let body;
|
|
200
|
+
return new __HttpRequest({
|
|
201
|
+
protocol,
|
|
202
|
+
hostname,
|
|
203
|
+
port,
|
|
204
|
+
method: "GET",
|
|
205
|
+
headers,
|
|
206
|
+
path: resolvedPath,
|
|
207
|
+
body,
|
|
765
208
|
});
|
|
766
|
-
}
|
|
767
|
-
export
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
return [2, contents];
|
|
787
|
-
}
|
|
209
|
+
};
|
|
210
|
+
export const serializeAws_restJson1ListApplicationsCommand = async (input, context) => {
|
|
211
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
212
|
+
const headers = {};
|
|
213
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
214
|
+
const query = map({
|
|
215
|
+
nextToken: [, input.nextToken],
|
|
216
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
217
|
+
});
|
|
218
|
+
let body;
|
|
219
|
+
return new __HttpRequest({
|
|
220
|
+
protocol,
|
|
221
|
+
hostname,
|
|
222
|
+
port,
|
|
223
|
+
method: "GET",
|
|
224
|
+
headers,
|
|
225
|
+
path: resolvedPath,
|
|
226
|
+
query,
|
|
227
|
+
body,
|
|
788
228
|
});
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
case "ValidationException": return [3, 8];
|
|
811
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 8];
|
|
812
|
-
}
|
|
813
|
-
return [3, 10];
|
|
814
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
815
|
-
case 3: throw _d.sent();
|
|
816
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
817
|
-
case 5: throw _d.sent();
|
|
818
|
-
case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
819
|
-
case 7: throw _d.sent();
|
|
820
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
821
|
-
case 9: throw _d.sent();
|
|
822
|
-
case 10:
|
|
823
|
-
parsedBody = parsedOutput.body;
|
|
824
|
-
throwDefaultError({
|
|
825
|
-
output: output,
|
|
826
|
-
parsedBody: parsedBody,
|
|
827
|
-
exceptionCtor: __BaseException,
|
|
828
|
-
errorCode: errorCode,
|
|
829
|
-
});
|
|
830
|
-
_d.label = 11;
|
|
831
|
-
case 11: return [2];
|
|
832
|
-
}
|
|
229
|
+
};
|
|
230
|
+
export const serializeAws_restJson1ListAssociatedAttributeGroupsCommand = async (input, context) => {
|
|
231
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
232
|
+
const headers = {};
|
|
233
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
234
|
+
"/applications/{application}/attribute-groups";
|
|
235
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
236
|
+
const query = map({
|
|
237
|
+
nextToken: [, input.nextToken],
|
|
238
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
239
|
+
});
|
|
240
|
+
let body;
|
|
241
|
+
return new __HttpRequest({
|
|
242
|
+
protocol,
|
|
243
|
+
hostname,
|
|
244
|
+
port,
|
|
245
|
+
method: "GET",
|
|
246
|
+
headers,
|
|
247
|
+
path: resolvedPath,
|
|
248
|
+
query,
|
|
249
|
+
body,
|
|
833
250
|
});
|
|
834
|
-
}
|
|
835
|
-
export
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
return [2, contents];
|
|
855
|
-
}
|
|
251
|
+
};
|
|
252
|
+
export const serializeAws_restJson1ListAssociatedResourcesCommand = async (input, context) => {
|
|
253
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
254
|
+
const headers = {};
|
|
255
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{application}/resources";
|
|
256
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
257
|
+
const query = map({
|
|
258
|
+
nextToken: [, input.nextToken],
|
|
259
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
260
|
+
});
|
|
261
|
+
let body;
|
|
262
|
+
return new __HttpRequest({
|
|
263
|
+
protocol,
|
|
264
|
+
hostname,
|
|
265
|
+
port,
|
|
266
|
+
method: "GET",
|
|
267
|
+
headers,
|
|
268
|
+
path: resolvedPath,
|
|
269
|
+
query,
|
|
270
|
+
body,
|
|
856
271
|
});
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
case "ValidationException": return [3, 6];
|
|
877
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 6];
|
|
878
|
-
}
|
|
879
|
-
return [3, 8];
|
|
880
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
881
|
-
case 3: throw _d.sent();
|
|
882
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
883
|
-
case 5: throw _d.sent();
|
|
884
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
885
|
-
case 7: throw _d.sent();
|
|
886
|
-
case 8:
|
|
887
|
-
parsedBody = parsedOutput.body;
|
|
888
|
-
throwDefaultError({
|
|
889
|
-
output: output,
|
|
890
|
-
parsedBody: parsedBody,
|
|
891
|
-
exceptionCtor: __BaseException,
|
|
892
|
-
errorCode: errorCode,
|
|
893
|
-
});
|
|
894
|
-
_d.label = 9;
|
|
895
|
-
case 9: return [2];
|
|
896
|
-
}
|
|
272
|
+
};
|
|
273
|
+
export const serializeAws_restJson1ListAttributeGroupsCommand = async (input, context) => {
|
|
274
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
275
|
+
const headers = {};
|
|
276
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups";
|
|
277
|
+
const query = map({
|
|
278
|
+
nextToken: [, input.nextToken],
|
|
279
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
280
|
+
});
|
|
281
|
+
let body;
|
|
282
|
+
return new __HttpRequest({
|
|
283
|
+
protocol,
|
|
284
|
+
hostname,
|
|
285
|
+
port,
|
|
286
|
+
method: "GET",
|
|
287
|
+
headers,
|
|
288
|
+
path: resolvedPath,
|
|
289
|
+
query,
|
|
290
|
+
body,
|
|
897
291
|
});
|
|
898
|
-
}
|
|
899
|
-
export
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
}
|
|
292
|
+
};
|
|
293
|
+
export const serializeAws_restJson1ListAttributeGroupsForApplicationCommand = async (input, context) => {
|
|
294
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
295
|
+
const headers = {};
|
|
296
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
297
|
+
"/applications/{application}/attribute-group-details";
|
|
298
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
299
|
+
const query = map({
|
|
300
|
+
nextToken: [, input.nextToken],
|
|
301
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
302
|
+
});
|
|
303
|
+
let body;
|
|
304
|
+
return new __HttpRequest({
|
|
305
|
+
protocol,
|
|
306
|
+
hostname,
|
|
307
|
+
port,
|
|
308
|
+
method: "GET",
|
|
309
|
+
headers,
|
|
310
|
+
path: resolvedPath,
|
|
311
|
+
query,
|
|
312
|
+
body,
|
|
920
313
|
});
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
case "InternalServerException": return [3, 2];
|
|
937
|
-
case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3, 2];
|
|
938
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
939
|
-
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException": return [3, 4];
|
|
940
|
-
case "ValidationException": return [3, 6];
|
|
941
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 6];
|
|
942
|
-
}
|
|
943
|
-
return [3, 8];
|
|
944
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
945
|
-
case 3: throw _d.sent();
|
|
946
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
947
|
-
case 5: throw _d.sent();
|
|
948
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
949
|
-
case 7: throw _d.sent();
|
|
950
|
-
case 8:
|
|
951
|
-
parsedBody = parsedOutput.body;
|
|
952
|
-
throwDefaultError({
|
|
953
|
-
output: output,
|
|
954
|
-
parsedBody: parsedBody,
|
|
955
|
-
exceptionCtor: __BaseException,
|
|
956
|
-
errorCode: errorCode,
|
|
957
|
-
});
|
|
958
|
-
_d.label = 9;
|
|
959
|
-
case 9: return [2];
|
|
960
|
-
}
|
|
314
|
+
};
|
|
315
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
316
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
317
|
+
const headers = {};
|
|
318
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
319
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
320
|
+
let body;
|
|
321
|
+
return new __HttpRequest({
|
|
322
|
+
protocol,
|
|
323
|
+
hostname,
|
|
324
|
+
port,
|
|
325
|
+
method: "GET",
|
|
326
|
+
headers,
|
|
327
|
+
path: resolvedPath,
|
|
328
|
+
body,
|
|
961
329
|
});
|
|
962
|
-
}
|
|
963
|
-
export
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
979
|
-
if (data.applicationArn != null) {
|
|
980
|
-
contents.applicationArn = __expectString(data.applicationArn);
|
|
981
|
-
}
|
|
982
|
-
if (data.attributeGroupArn != null) {
|
|
983
|
-
contents.attributeGroupArn = __expectString(data.attributeGroupArn);
|
|
984
|
-
}
|
|
985
|
-
return [2, contents];
|
|
986
|
-
}
|
|
330
|
+
};
|
|
331
|
+
export const serializeAws_restJson1SyncResourceCommand = async (input, context) => {
|
|
332
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
333
|
+
const headers = {};
|
|
334
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sync/{resourceType}/{resource}";
|
|
335
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", () => input.resourceType, "{resourceType}", false);
|
|
336
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resource", () => input.resource, "{resource}", false);
|
|
337
|
+
let body;
|
|
338
|
+
return new __HttpRequest({
|
|
339
|
+
protocol,
|
|
340
|
+
hostname,
|
|
341
|
+
port,
|
|
342
|
+
method: "POST",
|
|
343
|
+
headers,
|
|
344
|
+
path: resolvedPath,
|
|
345
|
+
body,
|
|
987
346
|
});
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 6];
|
|
1009
|
-
}
|
|
1010
|
-
return [3, 8];
|
|
1011
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1012
|
-
case 3: throw _d.sent();
|
|
1013
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1014
|
-
case 5: throw _d.sent();
|
|
1015
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1016
|
-
case 7: throw _d.sent();
|
|
1017
|
-
case 8:
|
|
1018
|
-
parsedBody = parsedOutput.body;
|
|
1019
|
-
throwDefaultError({
|
|
1020
|
-
output: output,
|
|
1021
|
-
parsedBody: parsedBody,
|
|
1022
|
-
exceptionCtor: __BaseException,
|
|
1023
|
-
errorCode: errorCode,
|
|
1024
|
-
});
|
|
1025
|
-
_d.label = 9;
|
|
1026
|
-
case 9: return [2];
|
|
1027
|
-
}
|
|
347
|
+
};
|
|
348
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
349
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
350
|
+
const headers = {
|
|
351
|
+
"content-type": "application/json",
|
|
352
|
+
};
|
|
353
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
354
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
355
|
+
let body;
|
|
356
|
+
body = JSON.stringify({
|
|
357
|
+
...(input.tags != null && { tags: serializeAws_restJson1Tags(input.tags, context) }),
|
|
358
|
+
});
|
|
359
|
+
return new __HttpRequest({
|
|
360
|
+
protocol,
|
|
361
|
+
hostname,
|
|
362
|
+
port,
|
|
363
|
+
method: "POST",
|
|
364
|
+
headers,
|
|
365
|
+
path: resolvedPath,
|
|
366
|
+
body,
|
|
1028
367
|
});
|
|
1029
|
-
}
|
|
1030
|
-
export
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
}
|
|
1049
|
-
if (data.resourceArn != null) {
|
|
1050
|
-
contents.resourceArn = __expectString(data.resourceArn);
|
|
1051
|
-
}
|
|
1052
|
-
return [2, contents];
|
|
1053
|
-
}
|
|
368
|
+
};
|
|
369
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
370
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
371
|
+
const headers = {};
|
|
372
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
373
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
374
|
+
const query = map({
|
|
375
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
376
|
+
});
|
|
377
|
+
let body;
|
|
378
|
+
return new __HttpRequest({
|
|
379
|
+
protocol,
|
|
380
|
+
hostname,
|
|
381
|
+
port,
|
|
382
|
+
method: "DELETE",
|
|
383
|
+
headers,
|
|
384
|
+
path: resolvedPath,
|
|
385
|
+
query,
|
|
386
|
+
body,
|
|
1054
387
|
});
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
}
|
|
1077
|
-
return [3, 8];
|
|
1078
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1079
|
-
case 3: throw _d.sent();
|
|
1080
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1081
|
-
case 5: throw _d.sent();
|
|
1082
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1083
|
-
case 7: throw _d.sent();
|
|
1084
|
-
case 8:
|
|
1085
|
-
parsedBody = parsedOutput.body;
|
|
1086
|
-
throwDefaultError({
|
|
1087
|
-
output: output,
|
|
1088
|
-
parsedBody: parsedBody,
|
|
1089
|
-
exceptionCtor: __BaseException,
|
|
1090
|
-
errorCode: errorCode,
|
|
1091
|
-
});
|
|
1092
|
-
_d.label = 9;
|
|
1093
|
-
case 9: return [2];
|
|
1094
|
-
}
|
|
388
|
+
};
|
|
389
|
+
export const serializeAws_restJson1UpdateApplicationCommand = async (input, context) => {
|
|
390
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
391
|
+
const headers = {
|
|
392
|
+
"content-type": "application/json",
|
|
393
|
+
};
|
|
394
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{application}";
|
|
395
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application, "{application}", false);
|
|
396
|
+
let body;
|
|
397
|
+
body = JSON.stringify({
|
|
398
|
+
...(input.description != null && { description: input.description }),
|
|
399
|
+
...(input.name != null && { name: input.name }),
|
|
400
|
+
});
|
|
401
|
+
return new __HttpRequest({
|
|
402
|
+
protocol,
|
|
403
|
+
hostname,
|
|
404
|
+
port,
|
|
405
|
+
method: "PATCH",
|
|
406
|
+
headers,
|
|
407
|
+
path: resolvedPath,
|
|
408
|
+
body,
|
|
1095
409
|
});
|
|
1096
|
-
}
|
|
1097
|
-
export
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
}
|
|
1119
|
-
if (data.creationTime != null) {
|
|
1120
|
-
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
1121
|
-
}
|
|
1122
|
-
if (data.description != null) {
|
|
1123
|
-
contents.description = __expectString(data.description);
|
|
1124
|
-
}
|
|
1125
|
-
if (data.id != null) {
|
|
1126
|
-
contents.id = __expectString(data.id);
|
|
1127
|
-
}
|
|
1128
|
-
if (data.integrations != null) {
|
|
1129
|
-
contents.integrations = deserializeAws_restJson1Integrations(data.integrations, context);
|
|
1130
|
-
}
|
|
1131
|
-
if (data.lastUpdateTime != null) {
|
|
1132
|
-
contents.lastUpdateTime = __expectNonNull(__parseRfc3339DateTime(data.lastUpdateTime));
|
|
1133
|
-
}
|
|
1134
|
-
if (data.name != null) {
|
|
1135
|
-
contents.name = __expectString(data.name);
|
|
1136
|
-
}
|
|
1137
|
-
if (data.tags != null) {
|
|
1138
|
-
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1139
|
-
}
|
|
1140
|
-
return [2, contents];
|
|
1141
|
-
}
|
|
410
|
+
};
|
|
411
|
+
export const serializeAws_restJson1UpdateAttributeGroupCommand = async (input, context) => {
|
|
412
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
413
|
+
const headers = {
|
|
414
|
+
"content-type": "application/json",
|
|
415
|
+
};
|
|
416
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups/{attributeGroup}";
|
|
417
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "attributeGroup", () => input.attributeGroup, "{attributeGroup}", false);
|
|
418
|
+
let body;
|
|
419
|
+
body = JSON.stringify({
|
|
420
|
+
...(input.attributes != null && { attributes: input.attributes }),
|
|
421
|
+
...(input.description != null && { description: input.description }),
|
|
422
|
+
...(input.name != null && { name: input.name }),
|
|
423
|
+
});
|
|
424
|
+
return new __HttpRequest({
|
|
425
|
+
protocol,
|
|
426
|
+
hostname,
|
|
427
|
+
port,
|
|
428
|
+
method: "PATCH",
|
|
429
|
+
headers,
|
|
430
|
+
path: resolvedPath,
|
|
431
|
+
body,
|
|
1142
432
|
});
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
_a = [__assign({}, output)];
|
|
1151
|
-
_c = {};
|
|
1152
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1153
|
-
case 1:
|
|
1154
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1155
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1156
|
-
_b = errorCode;
|
|
1157
|
-
switch (_b) {
|
|
1158
|
-
case "ConflictException": return [3, 2];
|
|
1159
|
-
case "com.amazonaws.servicecatalogappregistry#ConflictException": return [3, 2];
|
|
1160
|
-
case "InternalServerException": return [3, 4];
|
|
1161
|
-
case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3, 4];
|
|
1162
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
1163
|
-
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException": return [3, 6];
|
|
1164
|
-
case "ValidationException": return [3, 8];
|
|
1165
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 8];
|
|
1166
|
-
}
|
|
1167
|
-
return [3, 10];
|
|
1168
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1169
|
-
case 3: throw _d.sent();
|
|
1170
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1171
|
-
case 5: throw _d.sent();
|
|
1172
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1173
|
-
case 7: throw _d.sent();
|
|
1174
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1175
|
-
case 9: throw _d.sent();
|
|
1176
|
-
case 10:
|
|
1177
|
-
parsedBody = parsedOutput.body;
|
|
1178
|
-
throwDefaultError({
|
|
1179
|
-
output: output,
|
|
1180
|
-
parsedBody: parsedBody,
|
|
1181
|
-
exceptionCtor: __BaseException,
|
|
1182
|
-
errorCode: errorCode,
|
|
1183
|
-
});
|
|
1184
|
-
_d.label = 11;
|
|
1185
|
-
case 11: return [2];
|
|
1186
|
-
}
|
|
433
|
+
};
|
|
434
|
+
export const deserializeAws_restJson1AssociateAttributeGroupCommand = async (output, context) => {
|
|
435
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
436
|
+
return deserializeAws_restJson1AssociateAttributeGroupCommandError(output, context);
|
|
437
|
+
}
|
|
438
|
+
const contents = map({
|
|
439
|
+
$metadata: deserializeMetadata(output),
|
|
1187
440
|
});
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
441
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
442
|
+
if (data.applicationArn != null) {
|
|
443
|
+
contents.applicationArn = __expectString(data.applicationArn);
|
|
444
|
+
}
|
|
445
|
+
if (data.attributeGroupArn != null) {
|
|
446
|
+
contents.attributeGroupArn = __expectString(data.attributeGroupArn);
|
|
447
|
+
}
|
|
448
|
+
return contents;
|
|
449
|
+
};
|
|
450
|
+
const deserializeAws_restJson1AssociateAttributeGroupCommandError = 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 "ConflictException":
|
|
458
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
459
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
460
|
+
case "InternalServerException":
|
|
461
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
462
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
463
|
+
case "ResourceNotFoundException":
|
|
464
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
465
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
466
|
+
case "ServiceQuotaExceededException":
|
|
467
|
+
case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException":
|
|
468
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
469
|
+
case "ValidationException":
|
|
470
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
471
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(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_restJson1AssociateResourceCommand = async (output, context) => {
|
|
483
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
484
|
+
return deserializeAws_restJson1AssociateResourceCommandError(output, context);
|
|
485
|
+
}
|
|
486
|
+
const contents = map({
|
|
487
|
+
$metadata: deserializeMetadata(output),
|
|
1210
488
|
});
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
489
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
490
|
+
if (data.applicationArn != null) {
|
|
491
|
+
contents.applicationArn = __expectString(data.applicationArn);
|
|
492
|
+
}
|
|
493
|
+
if (data.resourceArn != null) {
|
|
494
|
+
contents.resourceArn = __expectString(data.resourceArn);
|
|
495
|
+
}
|
|
496
|
+
return contents;
|
|
497
|
+
};
|
|
498
|
+
const deserializeAws_restJson1AssociateResourceCommandError = async (output, context) => {
|
|
499
|
+
const parsedOutput = {
|
|
500
|
+
...output,
|
|
501
|
+
body: await parseErrorBody(output.body, context),
|
|
502
|
+
};
|
|
503
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
504
|
+
switch (errorCode) {
|
|
505
|
+
case "ConflictException":
|
|
506
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
507
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
508
|
+
case "InternalServerException":
|
|
509
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
510
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
511
|
+
case "ResourceNotFoundException":
|
|
512
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
513
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
514
|
+
case "ServiceQuotaExceededException":
|
|
515
|
+
case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException":
|
|
516
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
517
|
+
case "ValidationException":
|
|
518
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
519
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
520
|
+
default:
|
|
521
|
+
const parsedBody = parsedOutput.body;
|
|
522
|
+
throwDefaultError({
|
|
523
|
+
output,
|
|
524
|
+
parsedBody,
|
|
525
|
+
exceptionCtor: __BaseException,
|
|
526
|
+
errorCode,
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
export const deserializeAws_restJson1CreateApplicationCommand = async (output, context) => {
|
|
531
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
532
|
+
return deserializeAws_restJson1CreateApplicationCommandError(output, context);
|
|
533
|
+
}
|
|
534
|
+
const contents = map({
|
|
535
|
+
$metadata: deserializeMetadata(output),
|
|
1251
536
|
});
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
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
|
-
return [2, contents];
|
|
1294
|
-
}
|
|
537
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
538
|
+
if (data.application != null) {
|
|
539
|
+
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
540
|
+
}
|
|
541
|
+
return contents;
|
|
542
|
+
};
|
|
543
|
+
const deserializeAws_restJson1CreateApplicationCommandError = async (output, context) => {
|
|
544
|
+
const parsedOutput = {
|
|
545
|
+
...output,
|
|
546
|
+
body: await parseErrorBody(output.body, context),
|
|
547
|
+
};
|
|
548
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
549
|
+
switch (errorCode) {
|
|
550
|
+
case "ConflictException":
|
|
551
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
552
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
553
|
+
case "InternalServerException":
|
|
554
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
555
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
556
|
+
case "ServiceQuotaExceededException":
|
|
557
|
+
case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException":
|
|
558
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
559
|
+
case "ValidationException":
|
|
560
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
561
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
562
|
+
default:
|
|
563
|
+
const parsedBody = parsedOutput.body;
|
|
564
|
+
throwDefaultError({
|
|
565
|
+
output,
|
|
566
|
+
parsedBody,
|
|
567
|
+
exceptionCtor: __BaseException,
|
|
568
|
+
errorCode,
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
export const deserializeAws_restJson1CreateAttributeGroupCommand = async (output, context) => {
|
|
573
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
574
|
+
return deserializeAws_restJson1CreateAttributeGroupCommandError(output, context);
|
|
575
|
+
}
|
|
576
|
+
const contents = map({
|
|
577
|
+
$metadata: deserializeMetadata(output),
|
|
1295
578
|
});
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
return
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
_d.label = 11;
|
|
1338
|
-
case 11: return [2];
|
|
1339
|
-
}
|
|
579
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
580
|
+
if (data.attributeGroup != null) {
|
|
581
|
+
contents.attributeGroup = deserializeAws_restJson1AttributeGroup(data.attributeGroup, context);
|
|
582
|
+
}
|
|
583
|
+
return contents;
|
|
584
|
+
};
|
|
585
|
+
const deserializeAws_restJson1CreateAttributeGroupCommandError = async (output, context) => {
|
|
586
|
+
const parsedOutput = {
|
|
587
|
+
...output,
|
|
588
|
+
body: await parseErrorBody(output.body, context),
|
|
589
|
+
};
|
|
590
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
591
|
+
switch (errorCode) {
|
|
592
|
+
case "ConflictException":
|
|
593
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
594
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
595
|
+
case "InternalServerException":
|
|
596
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
597
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
598
|
+
case "ServiceQuotaExceededException":
|
|
599
|
+
case "com.amazonaws.servicecatalogappregistry#ServiceQuotaExceededException":
|
|
600
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
601
|
+
case "ValidationException":
|
|
602
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
603
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
604
|
+
default:
|
|
605
|
+
const parsedBody = parsedOutput.body;
|
|
606
|
+
throwDefaultError({
|
|
607
|
+
output,
|
|
608
|
+
parsedBody,
|
|
609
|
+
exceptionCtor: __BaseException,
|
|
610
|
+
errorCode,
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
export const deserializeAws_restJson1DeleteApplicationCommand = async (output, context) => {
|
|
615
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
616
|
+
return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
|
|
617
|
+
}
|
|
618
|
+
const contents = map({
|
|
619
|
+
$metadata: deserializeMetadata(output),
|
|
1340
620
|
});
|
|
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
|
-
|
|
621
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
622
|
+
if (data.application != null) {
|
|
623
|
+
contents.application = deserializeAws_restJson1ApplicationSummary(data.application, context);
|
|
624
|
+
}
|
|
625
|
+
return contents;
|
|
626
|
+
};
|
|
627
|
+
const deserializeAws_restJson1DeleteApplicationCommandError = async (output, context) => {
|
|
628
|
+
const parsedOutput = {
|
|
629
|
+
...output,
|
|
630
|
+
body: await parseErrorBody(output.body, context),
|
|
631
|
+
};
|
|
632
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
633
|
+
switch (errorCode) {
|
|
634
|
+
case "InternalServerException":
|
|
635
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
636
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
637
|
+
case "ResourceNotFoundException":
|
|
638
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
639
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
640
|
+
case "ValidationException":
|
|
641
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
642
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
643
|
+
default:
|
|
644
|
+
const parsedBody = parsedOutput.body;
|
|
645
|
+
throwDefaultError({
|
|
646
|
+
output,
|
|
647
|
+
parsedBody,
|
|
648
|
+
exceptionCtor: __BaseException,
|
|
649
|
+
errorCode,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
export const deserializeAws_restJson1DeleteAttributeGroupCommand = async (output, context) => {
|
|
654
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
655
|
+
return deserializeAws_restJson1DeleteAttributeGroupCommandError(output, context);
|
|
656
|
+
}
|
|
657
|
+
const contents = map({
|
|
658
|
+
$metadata: deserializeMetadata(output),
|
|
1366
659
|
});
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
return
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
parsedBody
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
660
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
661
|
+
if (data.attributeGroup != null) {
|
|
662
|
+
contents.attributeGroup = deserializeAws_restJson1AttributeGroupSummary(data.attributeGroup, context);
|
|
663
|
+
}
|
|
664
|
+
return contents;
|
|
665
|
+
};
|
|
666
|
+
const deserializeAws_restJson1DeleteAttributeGroupCommandError = async (output, context) => {
|
|
667
|
+
const parsedOutput = {
|
|
668
|
+
...output,
|
|
669
|
+
body: await parseErrorBody(output.body, context),
|
|
670
|
+
};
|
|
671
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
672
|
+
switch (errorCode) {
|
|
673
|
+
case "InternalServerException":
|
|
674
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
675
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
676
|
+
case "ResourceNotFoundException":
|
|
677
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
678
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
679
|
+
case "ValidationException":
|
|
680
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
681
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
682
|
+
default:
|
|
683
|
+
const parsedBody = parsedOutput.body;
|
|
684
|
+
throwDefaultError({
|
|
685
|
+
output,
|
|
686
|
+
parsedBody,
|
|
687
|
+
exceptionCtor: __BaseException,
|
|
688
|
+
errorCode,
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
export const deserializeAws_restJson1DisassociateAttributeGroupCommand = async (output, context) => {
|
|
693
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
694
|
+
return deserializeAws_restJson1DisassociateAttributeGroupCommandError(output, context);
|
|
695
|
+
}
|
|
696
|
+
const contents = map({
|
|
697
|
+
$metadata: deserializeMetadata(output),
|
|
1403
698
|
});
|
|
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
|
-
|
|
699
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
700
|
+
if (data.applicationArn != null) {
|
|
701
|
+
contents.applicationArn = __expectString(data.applicationArn);
|
|
702
|
+
}
|
|
703
|
+
if (data.attributeGroupArn != null) {
|
|
704
|
+
contents.attributeGroupArn = __expectString(data.attributeGroupArn);
|
|
705
|
+
}
|
|
706
|
+
return contents;
|
|
707
|
+
};
|
|
708
|
+
const deserializeAws_restJson1DisassociateAttributeGroupCommandError = async (output, context) => {
|
|
709
|
+
const parsedOutput = {
|
|
710
|
+
...output,
|
|
711
|
+
body: await parseErrorBody(output.body, context),
|
|
712
|
+
};
|
|
713
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
714
|
+
switch (errorCode) {
|
|
715
|
+
case "InternalServerException":
|
|
716
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
717
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
718
|
+
case "ResourceNotFoundException":
|
|
719
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
720
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
721
|
+
case "ValidationException":
|
|
722
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
723
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
724
|
+
default:
|
|
725
|
+
const parsedBody = parsedOutput.body;
|
|
726
|
+
throwDefaultError({
|
|
727
|
+
output,
|
|
728
|
+
parsedBody,
|
|
729
|
+
exceptionCtor: __BaseException,
|
|
730
|
+
errorCode,
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
export const deserializeAws_restJson1DisassociateResourceCommand = async (output, context) => {
|
|
735
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
736
|
+
return deserializeAws_restJson1DisassociateResourceCommandError(output, context);
|
|
737
|
+
}
|
|
738
|
+
const contents = map({
|
|
739
|
+
$metadata: deserializeMetadata(output),
|
|
1429
740
|
});
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
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
|
-
|
|
741
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
742
|
+
if (data.applicationArn != null) {
|
|
743
|
+
contents.applicationArn = __expectString(data.applicationArn);
|
|
744
|
+
}
|
|
745
|
+
if (data.resourceArn != null) {
|
|
746
|
+
contents.resourceArn = __expectString(data.resourceArn);
|
|
747
|
+
}
|
|
748
|
+
return contents;
|
|
749
|
+
};
|
|
750
|
+
const deserializeAws_restJson1DisassociateResourceCommandError = async (output, context) => {
|
|
751
|
+
const parsedOutput = {
|
|
752
|
+
...output,
|
|
753
|
+
body: await parseErrorBody(output.body, context),
|
|
754
|
+
};
|
|
755
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
756
|
+
switch (errorCode) {
|
|
757
|
+
case "InternalServerException":
|
|
758
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
759
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
760
|
+
case "ResourceNotFoundException":
|
|
761
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
762
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
763
|
+
case "ValidationException":
|
|
764
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
765
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
766
|
+
default:
|
|
767
|
+
const parsedBody = parsedOutput.body;
|
|
768
|
+
throwDefaultError({
|
|
769
|
+
output,
|
|
770
|
+
parsedBody,
|
|
771
|
+
exceptionCtor: __BaseException,
|
|
772
|
+
errorCode,
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
export const deserializeAws_restJson1GetApplicationCommand = async (output, context) => {
|
|
777
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
778
|
+
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
779
|
+
}
|
|
780
|
+
const contents = map({
|
|
781
|
+
$metadata: deserializeMetadata(output),
|
|
1470
782
|
});
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
783
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
784
|
+
if (data.arn != null) {
|
|
785
|
+
contents.arn = __expectString(data.arn);
|
|
786
|
+
}
|
|
787
|
+
if (data.associatedResourceCount != null) {
|
|
788
|
+
contents.associatedResourceCount = __expectInt32(data.associatedResourceCount);
|
|
789
|
+
}
|
|
790
|
+
if (data.creationTime != null) {
|
|
791
|
+
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
792
|
+
}
|
|
793
|
+
if (data.description != null) {
|
|
794
|
+
contents.description = __expectString(data.description);
|
|
795
|
+
}
|
|
796
|
+
if (data.id != null) {
|
|
797
|
+
contents.id = __expectString(data.id);
|
|
798
|
+
}
|
|
799
|
+
if (data.integrations != null) {
|
|
800
|
+
contents.integrations = deserializeAws_restJson1Integrations(data.integrations, context);
|
|
801
|
+
}
|
|
802
|
+
if (data.lastUpdateTime != null) {
|
|
803
|
+
contents.lastUpdateTime = __expectNonNull(__parseRfc3339DateTime(data.lastUpdateTime));
|
|
804
|
+
}
|
|
805
|
+
if (data.name != null) {
|
|
806
|
+
contents.name = __expectString(data.name);
|
|
807
|
+
}
|
|
808
|
+
if (data.tags != null) {
|
|
809
|
+
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
810
|
+
}
|
|
811
|
+
return contents;
|
|
812
|
+
};
|
|
813
|
+
const deserializeAws_restJson1GetApplicationCommandError = async (output, context) => {
|
|
814
|
+
const parsedOutput = {
|
|
815
|
+
...output,
|
|
816
|
+
body: await parseErrorBody(output.body, context),
|
|
817
|
+
};
|
|
818
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
819
|
+
switch (errorCode) {
|
|
820
|
+
case "ConflictException":
|
|
821
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
822
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
823
|
+
case "InternalServerException":
|
|
824
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
825
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
826
|
+
case "ResourceNotFoundException":
|
|
827
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
828
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
829
|
+
case "ValidationException":
|
|
830
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
831
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
832
|
+
default:
|
|
833
|
+
const parsedBody = parsedOutput.body;
|
|
834
|
+
throwDefaultError({
|
|
835
|
+
output,
|
|
836
|
+
parsedBody,
|
|
837
|
+
exceptionCtor: __BaseException,
|
|
838
|
+
errorCode,
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
export const deserializeAws_restJson1GetAssociatedResourceCommand = async (output, context) => {
|
|
843
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
844
|
+
return deserializeAws_restJson1GetAssociatedResourceCommandError(output, context);
|
|
845
|
+
}
|
|
846
|
+
const contents = map({
|
|
847
|
+
$metadata: deserializeMetadata(output),
|
|
1496
848
|
});
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
return
|
|
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
|
-
case 9: return [2];
|
|
1536
|
-
}
|
|
849
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
850
|
+
if (data.resource != null) {
|
|
851
|
+
contents.resource = deserializeAws_restJson1Resource(data.resource, context);
|
|
852
|
+
}
|
|
853
|
+
return contents;
|
|
854
|
+
};
|
|
855
|
+
const deserializeAws_restJson1GetAssociatedResourceCommandError = async (output, context) => {
|
|
856
|
+
const parsedOutput = {
|
|
857
|
+
...output,
|
|
858
|
+
body: await parseErrorBody(output.body, context),
|
|
859
|
+
};
|
|
860
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
861
|
+
switch (errorCode) {
|
|
862
|
+
case "InternalServerException":
|
|
863
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
864
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
865
|
+
case "ResourceNotFoundException":
|
|
866
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
867
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
868
|
+
case "ValidationException":
|
|
869
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
870
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
871
|
+
default:
|
|
872
|
+
const parsedBody = parsedOutput.body;
|
|
873
|
+
throwDefaultError({
|
|
874
|
+
output,
|
|
875
|
+
parsedBody,
|
|
876
|
+
exceptionCtor: __BaseException,
|
|
877
|
+
errorCode,
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
export const deserializeAws_restJson1GetAttributeGroupCommand = async (output, context) => {
|
|
882
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
883
|
+
return deserializeAws_restJson1GetAttributeGroupCommandError(output, context);
|
|
884
|
+
}
|
|
885
|
+
const contents = map({
|
|
886
|
+
$metadata: deserializeMetadata(output),
|
|
1537
887
|
});
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
888
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
889
|
+
if (data.arn != null) {
|
|
890
|
+
contents.arn = __expectString(data.arn);
|
|
891
|
+
}
|
|
892
|
+
if (data.attributes != null) {
|
|
893
|
+
contents.attributes = __expectString(data.attributes);
|
|
894
|
+
}
|
|
895
|
+
if (data.creationTime != null) {
|
|
896
|
+
contents.creationTime = __expectNonNull(__parseRfc3339DateTime(data.creationTime));
|
|
897
|
+
}
|
|
898
|
+
if (data.description != null) {
|
|
899
|
+
contents.description = __expectString(data.description);
|
|
900
|
+
}
|
|
901
|
+
if (data.id != null) {
|
|
902
|
+
contents.id = __expectString(data.id);
|
|
903
|
+
}
|
|
904
|
+
if (data.lastUpdateTime != null) {
|
|
905
|
+
contents.lastUpdateTime = __expectNonNull(__parseRfc3339DateTime(data.lastUpdateTime));
|
|
906
|
+
}
|
|
907
|
+
if (data.name != null) {
|
|
908
|
+
contents.name = __expectString(data.name);
|
|
909
|
+
}
|
|
910
|
+
if (data.tags != null) {
|
|
911
|
+
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
912
|
+
}
|
|
913
|
+
return contents;
|
|
914
|
+
};
|
|
915
|
+
const deserializeAws_restJson1GetAttributeGroupCommandError = async (output, context) => {
|
|
916
|
+
const parsedOutput = {
|
|
917
|
+
...output,
|
|
918
|
+
body: await parseErrorBody(output.body, context),
|
|
919
|
+
};
|
|
920
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
921
|
+
switch (errorCode) {
|
|
922
|
+
case "ConflictException":
|
|
923
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
924
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
925
|
+
case "InternalServerException":
|
|
926
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
927
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
928
|
+
case "ResourceNotFoundException":
|
|
929
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
930
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
931
|
+
case "ValidationException":
|
|
932
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
933
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
934
|
+
default:
|
|
935
|
+
const parsedBody = parsedOutput.body;
|
|
936
|
+
throwDefaultError({
|
|
937
|
+
output,
|
|
938
|
+
parsedBody,
|
|
939
|
+
exceptionCtor: __BaseException,
|
|
940
|
+
errorCode,
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
export const deserializeAws_restJson1ListApplicationsCommand = async (output, context) => {
|
|
945
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
946
|
+
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
947
|
+
}
|
|
948
|
+
const contents = map({
|
|
949
|
+
$metadata: deserializeMetadata(output),
|
|
1563
950
|
});
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
parsedBody
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
951
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
952
|
+
if (data.applications != null) {
|
|
953
|
+
contents.applications = deserializeAws_restJson1ApplicationSummaries(data.applications, context);
|
|
954
|
+
}
|
|
955
|
+
if (data.nextToken != null) {
|
|
956
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
957
|
+
}
|
|
958
|
+
return contents;
|
|
959
|
+
};
|
|
960
|
+
const deserializeAws_restJson1ListApplicationsCommandError = async (output, context) => {
|
|
961
|
+
const parsedOutput = {
|
|
962
|
+
...output,
|
|
963
|
+
body: await parseErrorBody(output.body, context),
|
|
964
|
+
};
|
|
965
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
966
|
+
switch (errorCode) {
|
|
967
|
+
case "InternalServerException":
|
|
968
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
969
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
970
|
+
case "ValidationException":
|
|
971
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
972
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
973
|
+
default:
|
|
974
|
+
const parsedBody = parsedOutput.body;
|
|
975
|
+
throwDefaultError({
|
|
976
|
+
output,
|
|
977
|
+
parsedBody,
|
|
978
|
+
exceptionCtor: __BaseException,
|
|
979
|
+
errorCode,
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
};
|
|
983
|
+
export const deserializeAws_restJson1ListAssociatedAttributeGroupsCommand = async (output, context) => {
|
|
984
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
985
|
+
return deserializeAws_restJson1ListAssociatedAttributeGroupsCommandError(output, context);
|
|
986
|
+
}
|
|
987
|
+
const contents = map({
|
|
988
|
+
$metadata: deserializeMetadata(output),
|
|
1600
989
|
});
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
990
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
991
|
+
if (data.attributeGroups != null) {
|
|
992
|
+
contents.attributeGroups = deserializeAws_restJson1AttributeGroupIds(data.attributeGroups, context);
|
|
993
|
+
}
|
|
994
|
+
if (data.nextToken != null) {
|
|
995
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
996
|
+
}
|
|
997
|
+
return contents;
|
|
998
|
+
};
|
|
999
|
+
const deserializeAws_restJson1ListAssociatedAttributeGroupsCommandError = async (output, context) => {
|
|
1000
|
+
const parsedOutput = {
|
|
1001
|
+
...output,
|
|
1002
|
+
body: await parseErrorBody(output.body, context),
|
|
1003
|
+
};
|
|
1004
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1005
|
+
switch (errorCode) {
|
|
1006
|
+
case "InternalServerException":
|
|
1007
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1008
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1009
|
+
case "ResourceNotFoundException":
|
|
1010
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1011
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1012
|
+
case "ValidationException":
|
|
1013
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1014
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1015
|
+
default:
|
|
1016
|
+
const parsedBody = parsedOutput.body;
|
|
1017
|
+
throwDefaultError({
|
|
1018
|
+
output,
|
|
1019
|
+
parsedBody,
|
|
1020
|
+
exceptionCtor: __BaseException,
|
|
1021
|
+
errorCode,
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
export const deserializeAws_restJson1ListAssociatedResourcesCommand = async (output, context) => {
|
|
1026
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1027
|
+
return deserializeAws_restJson1ListAssociatedResourcesCommandError(output, context);
|
|
1028
|
+
}
|
|
1029
|
+
const contents = map({
|
|
1030
|
+
$metadata: deserializeMetadata(output),
|
|
1626
1031
|
});
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1032
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1033
|
+
if (data.nextToken != null) {
|
|
1034
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1035
|
+
}
|
|
1036
|
+
if (data.resources != null) {
|
|
1037
|
+
contents.resources = deserializeAws_restJson1Resources(data.resources, context);
|
|
1038
|
+
}
|
|
1039
|
+
return contents;
|
|
1040
|
+
};
|
|
1041
|
+
const deserializeAws_restJson1ListAssociatedResourcesCommandError = async (output, context) => {
|
|
1042
|
+
const parsedOutput = {
|
|
1043
|
+
...output,
|
|
1044
|
+
body: await parseErrorBody(output.body, context),
|
|
1045
|
+
};
|
|
1046
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1047
|
+
switch (errorCode) {
|
|
1048
|
+
case "InternalServerException":
|
|
1049
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1050
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1051
|
+
case "ResourceNotFoundException":
|
|
1052
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1053
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1054
|
+
case "ValidationException":
|
|
1055
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1056
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1057
|
+
default:
|
|
1058
|
+
const parsedBody = parsedOutput.body;
|
|
1059
|
+
throwDefaultError({
|
|
1060
|
+
output,
|
|
1061
|
+
parsedBody,
|
|
1062
|
+
exceptionCtor: __BaseException,
|
|
1063
|
+
errorCode,
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
};
|
|
1067
|
+
export const deserializeAws_restJson1ListAttributeGroupsCommand = async (output, context) => {
|
|
1068
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1069
|
+
return deserializeAws_restJson1ListAttributeGroupsCommandError(output, context);
|
|
1070
|
+
}
|
|
1071
|
+
const contents = map({
|
|
1072
|
+
$metadata: deserializeMetadata(output),
|
|
1667
1073
|
});
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1074
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1075
|
+
if (data.attributeGroups != null) {
|
|
1076
|
+
contents.attributeGroups = deserializeAws_restJson1AttributeGroupSummaries(data.attributeGroups, context);
|
|
1077
|
+
}
|
|
1078
|
+
if (data.nextToken != null) {
|
|
1079
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1080
|
+
}
|
|
1081
|
+
return contents;
|
|
1082
|
+
};
|
|
1083
|
+
const deserializeAws_restJson1ListAttributeGroupsCommandError = async (output, context) => {
|
|
1084
|
+
const parsedOutput = {
|
|
1085
|
+
...output,
|
|
1086
|
+
body: await parseErrorBody(output.body, context),
|
|
1087
|
+
};
|
|
1088
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1089
|
+
switch (errorCode) {
|
|
1090
|
+
case "InternalServerException":
|
|
1091
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1092
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1093
|
+
case "ValidationException":
|
|
1094
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1095
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1096
|
+
default:
|
|
1097
|
+
const parsedBody = parsedOutput.body;
|
|
1098
|
+
throwDefaultError({
|
|
1099
|
+
output,
|
|
1100
|
+
parsedBody,
|
|
1101
|
+
exceptionCtor: __BaseException,
|
|
1102
|
+
errorCode,
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
export const deserializeAws_restJson1ListAttributeGroupsForApplicationCommand = async (output, context) => {
|
|
1107
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1108
|
+
return deserializeAws_restJson1ListAttributeGroupsForApplicationCommandError(output, context);
|
|
1109
|
+
}
|
|
1110
|
+
const contents = map({
|
|
1111
|
+
$metadata: deserializeMetadata(output),
|
|
1690
1112
|
});
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1113
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1114
|
+
if (data.attributeGroupsDetails != null) {
|
|
1115
|
+
contents.attributeGroupsDetails = deserializeAws_restJson1AttributeGroupDetailsList(data.attributeGroupsDetails, context);
|
|
1116
|
+
}
|
|
1117
|
+
if (data.nextToken != null) {
|
|
1118
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
1119
|
+
}
|
|
1120
|
+
return contents;
|
|
1121
|
+
};
|
|
1122
|
+
const deserializeAws_restJson1ListAttributeGroupsForApplicationCommandError = async (output, context) => {
|
|
1123
|
+
const parsedOutput = {
|
|
1124
|
+
...output,
|
|
1125
|
+
body: await parseErrorBody(output.body, context),
|
|
1126
|
+
};
|
|
1127
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1128
|
+
switch (errorCode) {
|
|
1129
|
+
case "InternalServerException":
|
|
1130
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1131
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1132
|
+
case "ResourceNotFoundException":
|
|
1133
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1134
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1135
|
+
case "ValidationException":
|
|
1136
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1137
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1138
|
+
default:
|
|
1139
|
+
const parsedBody = parsedOutput.body;
|
|
1140
|
+
throwDefaultError({
|
|
1141
|
+
output,
|
|
1142
|
+
parsedBody,
|
|
1143
|
+
exceptionCtor: __BaseException,
|
|
1144
|
+
errorCode,
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1149
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1150
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
1151
|
+
}
|
|
1152
|
+
const contents = map({
|
|
1153
|
+
$metadata: deserializeMetadata(output),
|
|
1731
1154
|
});
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1155
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1156
|
+
if (data.tags != null) {
|
|
1157
|
+
contents.tags = deserializeAws_restJson1Tags(data.tags, context);
|
|
1158
|
+
}
|
|
1159
|
+
return contents;
|
|
1160
|
+
};
|
|
1161
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
1162
|
+
const parsedOutput = {
|
|
1163
|
+
...output,
|
|
1164
|
+
body: await parseErrorBody(output.body, context),
|
|
1165
|
+
};
|
|
1166
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1167
|
+
switch (errorCode) {
|
|
1168
|
+
case "InternalServerException":
|
|
1169
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1170
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1171
|
+
case "ResourceNotFoundException":
|
|
1172
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1173
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1174
|
+
case "ValidationException":
|
|
1175
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1176
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1177
|
+
default:
|
|
1178
|
+
const parsedBody = parsedOutput.body;
|
|
1179
|
+
throwDefaultError({
|
|
1180
|
+
output,
|
|
1181
|
+
parsedBody,
|
|
1182
|
+
exceptionCtor: __BaseException,
|
|
1183
|
+
errorCode,
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
export const deserializeAws_restJson1SyncResourceCommand = async (output, context) => {
|
|
1188
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1189
|
+
return deserializeAws_restJson1SyncResourceCommandError(output, context);
|
|
1190
|
+
}
|
|
1191
|
+
const contents = map({
|
|
1192
|
+
$metadata: deserializeMetadata(output),
|
|
1760
1193
|
});
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1194
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1195
|
+
if (data.actionTaken != null) {
|
|
1196
|
+
contents.actionTaken = __expectString(data.actionTaken);
|
|
1197
|
+
}
|
|
1198
|
+
if (data.applicationArn != null) {
|
|
1199
|
+
contents.applicationArn = __expectString(data.applicationArn);
|
|
1200
|
+
}
|
|
1201
|
+
if (data.resourceArn != null) {
|
|
1202
|
+
contents.resourceArn = __expectString(data.resourceArn);
|
|
1203
|
+
}
|
|
1204
|
+
return contents;
|
|
1205
|
+
};
|
|
1206
|
+
const deserializeAws_restJson1SyncResourceCommandError = async (output, context) => {
|
|
1207
|
+
const parsedOutput = {
|
|
1208
|
+
...output,
|
|
1209
|
+
body: await parseErrorBody(output.body, context),
|
|
1210
|
+
};
|
|
1211
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1212
|
+
switch (errorCode) {
|
|
1213
|
+
case "ConflictException":
|
|
1214
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
1215
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1216
|
+
case "InternalServerException":
|
|
1217
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1218
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1219
|
+
case "ResourceNotFoundException":
|
|
1220
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1221
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1222
|
+
default:
|
|
1223
|
+
const parsedBody = parsedOutput.body;
|
|
1224
|
+
throwDefaultError({
|
|
1225
|
+
output,
|
|
1226
|
+
parsedBody,
|
|
1227
|
+
exceptionCtor: __BaseException,
|
|
1228
|
+
errorCode,
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
1233
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1234
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
1235
|
+
}
|
|
1236
|
+
const contents = map({
|
|
1237
|
+
$metadata: deserializeMetadata(output),
|
|
1801
1238
|
});
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1239
|
+
await collectBody(output.body, context);
|
|
1240
|
+
return contents;
|
|
1241
|
+
};
|
|
1242
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1243
|
+
const parsedOutput = {
|
|
1244
|
+
...output,
|
|
1245
|
+
body: await parseErrorBody(output.body, context),
|
|
1246
|
+
};
|
|
1247
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1248
|
+
switch (errorCode) {
|
|
1249
|
+
case "InternalServerException":
|
|
1250
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1251
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1252
|
+
case "ResourceNotFoundException":
|
|
1253
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1254
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1255
|
+
case "ValidationException":
|
|
1256
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1257
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1258
|
+
default:
|
|
1259
|
+
const parsedBody = parsedOutput.body;
|
|
1260
|
+
throwDefaultError({
|
|
1261
|
+
output,
|
|
1262
|
+
parsedBody,
|
|
1263
|
+
exceptionCtor: __BaseException,
|
|
1264
|
+
errorCode,
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
};
|
|
1268
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
1269
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1270
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
1271
|
+
}
|
|
1272
|
+
const contents = map({
|
|
1273
|
+
$metadata: deserializeMetadata(output),
|
|
1819
1274
|
});
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
errorCode: errorCode,
|
|
1856
|
-
});
|
|
1857
|
-
_d.label = 9;
|
|
1858
|
-
case 9: return [2];
|
|
1859
|
-
}
|
|
1275
|
+
await collectBody(output.body, context);
|
|
1276
|
+
return contents;
|
|
1277
|
+
};
|
|
1278
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1279
|
+
const parsedOutput = {
|
|
1280
|
+
...output,
|
|
1281
|
+
body: await parseErrorBody(output.body, context),
|
|
1282
|
+
};
|
|
1283
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1284
|
+
switch (errorCode) {
|
|
1285
|
+
case "InternalServerException":
|
|
1286
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1287
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1288
|
+
case "ResourceNotFoundException":
|
|
1289
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1290
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1291
|
+
case "ValidationException":
|
|
1292
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1293
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1294
|
+
default:
|
|
1295
|
+
const parsedBody = parsedOutput.body;
|
|
1296
|
+
throwDefaultError({
|
|
1297
|
+
output,
|
|
1298
|
+
parsedBody,
|
|
1299
|
+
exceptionCtor: __BaseException,
|
|
1300
|
+
errorCode,
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
export const deserializeAws_restJson1UpdateApplicationCommand = async (output, context) => {
|
|
1305
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1306
|
+
return deserializeAws_restJson1UpdateApplicationCommandError(output, context);
|
|
1307
|
+
}
|
|
1308
|
+
const contents = map({
|
|
1309
|
+
$metadata: deserializeMetadata(output),
|
|
1860
1310
|
});
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1311
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1312
|
+
if (data.application != null) {
|
|
1313
|
+
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
1314
|
+
}
|
|
1315
|
+
return contents;
|
|
1316
|
+
};
|
|
1317
|
+
const deserializeAws_restJson1UpdateApplicationCommandError = async (output, context) => {
|
|
1318
|
+
const parsedOutput = {
|
|
1319
|
+
...output,
|
|
1320
|
+
body: await parseErrorBody(output.body, context),
|
|
1321
|
+
};
|
|
1322
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1323
|
+
switch (errorCode) {
|
|
1324
|
+
case "ConflictException":
|
|
1325
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
1326
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1327
|
+
case "InternalServerException":
|
|
1328
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1329
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1330
|
+
case "ResourceNotFoundException":
|
|
1331
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1332
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1333
|
+
case "ValidationException":
|
|
1334
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1335
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1336
|
+
default:
|
|
1337
|
+
const parsedBody = parsedOutput.body;
|
|
1338
|
+
throwDefaultError({
|
|
1339
|
+
output,
|
|
1340
|
+
parsedBody,
|
|
1341
|
+
exceptionCtor: __BaseException,
|
|
1342
|
+
errorCode,
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1346
|
+
export const deserializeAws_restJson1UpdateAttributeGroupCommand = async (output, context) => {
|
|
1347
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1348
|
+
return deserializeAws_restJson1UpdateAttributeGroupCommandError(output, context);
|
|
1349
|
+
}
|
|
1350
|
+
const contents = map({
|
|
1351
|
+
$metadata: deserializeMetadata(output),
|
|
1878
1352
|
});
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
return
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1353
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1354
|
+
if (data.attributeGroup != null) {
|
|
1355
|
+
contents.attributeGroup = deserializeAws_restJson1AttributeGroup(data.attributeGroup, context);
|
|
1356
|
+
}
|
|
1357
|
+
return contents;
|
|
1358
|
+
};
|
|
1359
|
+
const deserializeAws_restJson1UpdateAttributeGroupCommandError = async (output, context) => {
|
|
1360
|
+
const parsedOutput = {
|
|
1361
|
+
...output,
|
|
1362
|
+
body: await parseErrorBody(output.body, context),
|
|
1363
|
+
};
|
|
1364
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1365
|
+
switch (errorCode) {
|
|
1366
|
+
case "ConflictException":
|
|
1367
|
+
case "com.amazonaws.servicecatalogappregistry#ConflictException":
|
|
1368
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1369
|
+
case "InternalServerException":
|
|
1370
|
+
case "com.amazonaws.servicecatalogappregistry#InternalServerException":
|
|
1371
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1372
|
+
case "ResourceNotFoundException":
|
|
1373
|
+
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException":
|
|
1374
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1375
|
+
case "ValidationException":
|
|
1376
|
+
case "com.amazonaws.servicecatalogappregistry#ValidationException":
|
|
1377
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1378
|
+
default:
|
|
1379
|
+
const parsedBody = parsedOutput.body;
|
|
1380
|
+
throwDefaultError({
|
|
1381
|
+
output,
|
|
1382
|
+
parsedBody,
|
|
1383
|
+
exceptionCtor: __BaseException,
|
|
1384
|
+
errorCode,
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
const map = __map;
|
|
1389
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1390
|
+
const contents = map({});
|
|
1391
|
+
const data = parsedOutput.body;
|
|
1392
|
+
if (data.message != null) {
|
|
1393
|
+
contents.message = __expectString(data.message);
|
|
1394
|
+
}
|
|
1395
|
+
const exception = new ConflictException({
|
|
1396
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1397
|
+
...contents,
|
|
1919
1398
|
});
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
});
|
|
1932
|
-
_a = __expectNonNull;
|
|
1933
|
-
_b = __expectObject;
|
|
1934
|
-
return [4, parseBody(output.body, context)];
|
|
1935
|
-
case 1:
|
|
1936
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1937
|
-
if (data.application != null) {
|
|
1938
|
-
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
1939
|
-
}
|
|
1940
|
-
return [2, contents];
|
|
1941
|
-
}
|
|
1399
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1400
|
+
};
|
|
1401
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1402
|
+
const contents = map({});
|
|
1403
|
+
const data = parsedOutput.body;
|
|
1404
|
+
if (data.message != null) {
|
|
1405
|
+
contents.message = __expectString(data.message);
|
|
1406
|
+
}
|
|
1407
|
+
const exception = new InternalServerException({
|
|
1408
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1409
|
+
...contents,
|
|
1942
1410
|
});
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1955
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1956
|
-
_b = errorCode;
|
|
1957
|
-
switch (_b) {
|
|
1958
|
-
case "ConflictException": return [3, 2];
|
|
1959
|
-
case "com.amazonaws.servicecatalogappregistry#ConflictException": return [3, 2];
|
|
1960
|
-
case "InternalServerException": return [3, 4];
|
|
1961
|
-
case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3, 4];
|
|
1962
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
1963
|
-
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException": return [3, 6];
|
|
1964
|
-
case "ValidationException": return [3, 8];
|
|
1965
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 8];
|
|
1966
|
-
}
|
|
1967
|
-
return [3, 10];
|
|
1968
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1969
|
-
case 3: throw _d.sent();
|
|
1970
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1971
|
-
case 5: throw _d.sent();
|
|
1972
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1973
|
-
case 7: throw _d.sent();
|
|
1974
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1975
|
-
case 9: throw _d.sent();
|
|
1976
|
-
case 10:
|
|
1977
|
-
parsedBody = parsedOutput.body;
|
|
1978
|
-
throwDefaultError({
|
|
1979
|
-
output: output,
|
|
1980
|
-
parsedBody: parsedBody,
|
|
1981
|
-
exceptionCtor: __BaseException,
|
|
1982
|
-
errorCode: errorCode,
|
|
1983
|
-
});
|
|
1984
|
-
_d.label = 11;
|
|
1985
|
-
case 11: return [2];
|
|
1986
|
-
}
|
|
1411
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1412
|
+
};
|
|
1413
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1414
|
+
const contents = map({});
|
|
1415
|
+
const data = parsedOutput.body;
|
|
1416
|
+
if (data.message != null) {
|
|
1417
|
+
contents.message = __expectString(data.message);
|
|
1418
|
+
}
|
|
1419
|
+
const exception = new ResourceNotFoundException({
|
|
1420
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1421
|
+
...contents,
|
|
1987
1422
|
});
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
});
|
|
2000
|
-
_a = __expectNonNull;
|
|
2001
|
-
_b = __expectObject;
|
|
2002
|
-
return [4, parseBody(output.body, context)];
|
|
2003
|
-
case 1:
|
|
2004
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2005
|
-
if (data.attributeGroup != null) {
|
|
2006
|
-
contents.attributeGroup = deserializeAws_restJson1AttributeGroup(data.attributeGroup, context);
|
|
2007
|
-
}
|
|
2008
|
-
return [2, contents];
|
|
2009
|
-
}
|
|
1423
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1424
|
+
};
|
|
1425
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1426
|
+
const contents = map({});
|
|
1427
|
+
const data = parsedOutput.body;
|
|
1428
|
+
if (data.message != null) {
|
|
1429
|
+
contents.message = __expectString(data.message);
|
|
1430
|
+
}
|
|
1431
|
+
const exception = new ServiceQuotaExceededException({
|
|
1432
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1433
|
+
...contents,
|
|
2010
1434
|
});
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2023
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2024
|
-
_b = errorCode;
|
|
2025
|
-
switch (_b) {
|
|
2026
|
-
case "ConflictException": return [3, 2];
|
|
2027
|
-
case "com.amazonaws.servicecatalogappregistry#ConflictException": return [3, 2];
|
|
2028
|
-
case "InternalServerException": return [3, 4];
|
|
2029
|
-
case "com.amazonaws.servicecatalogappregistry#InternalServerException": return [3, 4];
|
|
2030
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
2031
|
-
case "com.amazonaws.servicecatalogappregistry#ResourceNotFoundException": return [3, 6];
|
|
2032
|
-
case "ValidationException": return [3, 8];
|
|
2033
|
-
case "com.amazonaws.servicecatalogappregistry#ValidationException": return [3, 8];
|
|
2034
|
-
}
|
|
2035
|
-
return [3, 10];
|
|
2036
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2037
|
-
case 3: throw _d.sent();
|
|
2038
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2039
|
-
case 5: throw _d.sent();
|
|
2040
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2041
|
-
case 7: throw _d.sent();
|
|
2042
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2043
|
-
case 9: throw _d.sent();
|
|
2044
|
-
case 10:
|
|
2045
|
-
parsedBody = parsedOutput.body;
|
|
2046
|
-
throwDefaultError({
|
|
2047
|
-
output: output,
|
|
2048
|
-
parsedBody: parsedBody,
|
|
2049
|
-
exceptionCtor: __BaseException,
|
|
2050
|
-
errorCode: errorCode,
|
|
2051
|
-
});
|
|
2052
|
-
_d.label = 11;
|
|
2053
|
-
case 11: return [2];
|
|
2054
|
-
}
|
|
1435
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1436
|
+
};
|
|
1437
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1438
|
+
const contents = map({});
|
|
1439
|
+
const data = parsedOutput.body;
|
|
1440
|
+
if (data.message != null) {
|
|
1441
|
+
contents.message = __expectString(data.message);
|
|
1442
|
+
}
|
|
1443
|
+
const exception = new ValidationException({
|
|
1444
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1445
|
+
...contents,
|
|
2055
1446
|
});
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
return __generator(this, function (_a) {
|
|
2061
|
-
contents = map({});
|
|
2062
|
-
data = parsedOutput.body;
|
|
2063
|
-
if (data.message != null) {
|
|
2064
|
-
contents.message = __expectString(data.message);
|
|
2065
|
-
}
|
|
2066
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2067
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2068
|
-
});
|
|
2069
|
-
}); };
|
|
2070
|
-
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2071
|
-
var contents, data, exception;
|
|
2072
|
-
return __generator(this, function (_a) {
|
|
2073
|
-
contents = map({});
|
|
2074
|
-
data = parsedOutput.body;
|
|
2075
|
-
if (data.message != null) {
|
|
2076
|
-
contents.message = __expectString(data.message);
|
|
2077
|
-
}
|
|
2078
|
-
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2079
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2080
|
-
});
|
|
2081
|
-
}); };
|
|
2082
|
-
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2083
|
-
var contents, data, exception;
|
|
2084
|
-
return __generator(this, function (_a) {
|
|
2085
|
-
contents = map({});
|
|
2086
|
-
data = parsedOutput.body;
|
|
2087
|
-
if (data.message != null) {
|
|
2088
|
-
contents.message = __expectString(data.message);
|
|
2089
|
-
}
|
|
2090
|
-
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2091
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2092
|
-
});
|
|
2093
|
-
}); };
|
|
2094
|
-
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2095
|
-
var contents, data, exception;
|
|
2096
|
-
return __generator(this, function (_a) {
|
|
2097
|
-
contents = map({});
|
|
2098
|
-
data = parsedOutput.body;
|
|
2099
|
-
if (data.message != null) {
|
|
2100
|
-
contents.message = __expectString(data.message);
|
|
2101
|
-
}
|
|
2102
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2103
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2104
|
-
});
|
|
2105
|
-
}); };
|
|
2106
|
-
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2107
|
-
var contents, data, exception;
|
|
2108
|
-
return __generator(this, function (_a) {
|
|
2109
|
-
contents = map({});
|
|
2110
|
-
data = parsedOutput.body;
|
|
2111
|
-
if (data.message != null) {
|
|
2112
|
-
contents.message = __expectString(data.message);
|
|
2113
|
-
}
|
|
2114
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
2115
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
2116
|
-
});
|
|
2117
|
-
}); };
|
|
2118
|
-
var serializeAws_restJson1Tags = function (input, context) {
|
|
2119
|
-
return Object.entries(input).reduce(function (acc, _a) {
|
|
2120
|
-
var _b;
|
|
2121
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1447
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1448
|
+
};
|
|
1449
|
+
const serializeAws_restJson1Tags = (input, context) => {
|
|
1450
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2122
1451
|
if (value === null) {
|
|
2123
1452
|
return acc;
|
|
2124
1453
|
}
|
|
2125
|
-
return
|
|
1454
|
+
return {
|
|
1455
|
+
...acc,
|
|
1456
|
+
[key]: value,
|
|
1457
|
+
};
|
|
2126
1458
|
}, {});
|
|
2127
1459
|
};
|
|
2128
|
-
|
|
1460
|
+
const deserializeAws_restJson1Application = (output, context) => {
|
|
2129
1461
|
return {
|
|
2130
1462
|
arn: __expectString(output.arn),
|
|
2131
1463
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
@@ -2136,10 +1468,10 @@ var deserializeAws_restJson1Application = function (output, context) {
|
|
|
2136
1468
|
tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
|
|
2137
1469
|
};
|
|
2138
1470
|
};
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
.filter(
|
|
2142
|
-
.map(
|
|
1471
|
+
const deserializeAws_restJson1ApplicationSummaries = (output, context) => {
|
|
1472
|
+
const retVal = (output || [])
|
|
1473
|
+
.filter((e) => e != null)
|
|
1474
|
+
.map((entry) => {
|
|
2143
1475
|
if (entry === null) {
|
|
2144
1476
|
return null;
|
|
2145
1477
|
}
|
|
@@ -2147,7 +1479,7 @@ var deserializeAws_restJson1ApplicationSummaries = function (output, context) {
|
|
|
2147
1479
|
});
|
|
2148
1480
|
return retVal;
|
|
2149
1481
|
};
|
|
2150
|
-
|
|
1482
|
+
const deserializeAws_restJson1ApplicationSummary = (output, context) => {
|
|
2151
1483
|
return {
|
|
2152
1484
|
arn: __expectString(output.arn),
|
|
2153
1485
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
@@ -2157,7 +1489,7 @@ var deserializeAws_restJson1ApplicationSummary = function (output, context) {
|
|
|
2157
1489
|
name: __expectString(output.name),
|
|
2158
1490
|
};
|
|
2159
1491
|
};
|
|
2160
|
-
|
|
1492
|
+
const deserializeAws_restJson1AttributeGroup = (output, context) => {
|
|
2161
1493
|
return {
|
|
2162
1494
|
arn: __expectString(output.arn),
|
|
2163
1495
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
@@ -2168,17 +1500,17 @@ var deserializeAws_restJson1AttributeGroup = function (output, context) {
|
|
|
2168
1500
|
tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
|
|
2169
1501
|
};
|
|
2170
1502
|
};
|
|
2171
|
-
|
|
1503
|
+
const deserializeAws_restJson1AttributeGroupDetails = (output, context) => {
|
|
2172
1504
|
return {
|
|
2173
1505
|
arn: __expectString(output.arn),
|
|
2174
1506
|
id: __expectString(output.id),
|
|
2175
1507
|
name: __expectString(output.name),
|
|
2176
1508
|
};
|
|
2177
1509
|
};
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
.filter(
|
|
2181
|
-
.map(
|
|
1510
|
+
const deserializeAws_restJson1AttributeGroupDetailsList = (output, context) => {
|
|
1511
|
+
const retVal = (output || [])
|
|
1512
|
+
.filter((e) => e != null)
|
|
1513
|
+
.map((entry) => {
|
|
2182
1514
|
if (entry === null) {
|
|
2183
1515
|
return null;
|
|
2184
1516
|
}
|
|
@@ -2186,10 +1518,10 @@ var deserializeAws_restJson1AttributeGroupDetailsList = function (output, contex
|
|
|
2186
1518
|
});
|
|
2187
1519
|
return retVal;
|
|
2188
1520
|
};
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
.filter(
|
|
2192
|
-
.map(
|
|
1521
|
+
const deserializeAws_restJson1AttributeGroupIds = (output, context) => {
|
|
1522
|
+
const retVal = (output || [])
|
|
1523
|
+
.filter((e) => e != null)
|
|
1524
|
+
.map((entry) => {
|
|
2193
1525
|
if (entry === null) {
|
|
2194
1526
|
return null;
|
|
2195
1527
|
}
|
|
@@ -2197,10 +1529,10 @@ var deserializeAws_restJson1AttributeGroupIds = function (output, context) {
|
|
|
2197
1529
|
});
|
|
2198
1530
|
return retVal;
|
|
2199
1531
|
};
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
.filter(
|
|
2203
|
-
.map(
|
|
1532
|
+
const deserializeAws_restJson1AttributeGroupSummaries = (output, context) => {
|
|
1533
|
+
const retVal = (output || [])
|
|
1534
|
+
.filter((e) => e != null)
|
|
1535
|
+
.map((entry) => {
|
|
2204
1536
|
if (entry === null) {
|
|
2205
1537
|
return null;
|
|
2206
1538
|
}
|
|
@@ -2208,7 +1540,7 @@ var deserializeAws_restJson1AttributeGroupSummaries = function (output, context)
|
|
|
2208
1540
|
});
|
|
2209
1541
|
return retVal;
|
|
2210
1542
|
};
|
|
2211
|
-
|
|
1543
|
+
const deserializeAws_restJson1AttributeGroupSummary = (output, context) => {
|
|
2212
1544
|
return {
|
|
2213
1545
|
arn: __expectString(output.arn),
|
|
2214
1546
|
creationTime: output.creationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.creationTime)) : undefined,
|
|
@@ -2218,12 +1550,12 @@ var deserializeAws_restJson1AttributeGroupSummary = function (output, context) {
|
|
|
2218
1550
|
name: __expectString(output.name),
|
|
2219
1551
|
};
|
|
2220
1552
|
};
|
|
2221
|
-
|
|
1553
|
+
const deserializeAws_restJson1Integrations = (output, context) => {
|
|
2222
1554
|
return {
|
|
2223
1555
|
resourceGroup: output.resourceGroup != null ? deserializeAws_restJson1ResourceGroup(output.resourceGroup, context) : undefined,
|
|
2224
1556
|
};
|
|
2225
1557
|
};
|
|
2226
|
-
|
|
1558
|
+
const deserializeAws_restJson1Resource = (output, context) => {
|
|
2227
1559
|
return {
|
|
2228
1560
|
arn: __expectString(output.arn),
|
|
2229
1561
|
associationTime: output.associationTime != null ? __expectNonNull(__parseRfc3339DateTime(output.associationTime)) : undefined,
|
|
@@ -2233,28 +1565,28 @@ var deserializeAws_restJson1Resource = function (output, context) {
|
|
|
2233
1565
|
name: __expectString(output.name),
|
|
2234
1566
|
};
|
|
2235
1567
|
};
|
|
2236
|
-
|
|
1568
|
+
const deserializeAws_restJson1ResourceGroup = (output, context) => {
|
|
2237
1569
|
return {
|
|
2238
1570
|
arn: __expectString(output.arn),
|
|
2239
1571
|
errorMessage: __expectString(output.errorMessage),
|
|
2240
1572
|
state: __expectString(output.state),
|
|
2241
1573
|
};
|
|
2242
1574
|
};
|
|
2243
|
-
|
|
1575
|
+
const deserializeAws_restJson1ResourceInfo = (output, context) => {
|
|
2244
1576
|
return {
|
|
2245
1577
|
arn: __expectString(output.arn),
|
|
2246
1578
|
name: __expectString(output.name),
|
|
2247
1579
|
};
|
|
2248
1580
|
};
|
|
2249
|
-
|
|
1581
|
+
const deserializeAws_restJson1ResourceIntegrations = (output, context) => {
|
|
2250
1582
|
return {
|
|
2251
1583
|
resourceGroup: output.resourceGroup != null ? deserializeAws_restJson1ResourceGroup(output.resourceGroup, context) : undefined,
|
|
2252
1584
|
};
|
|
2253
1585
|
};
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
.filter(
|
|
2257
|
-
.map(
|
|
1586
|
+
const deserializeAws_restJson1Resources = (output, context) => {
|
|
1587
|
+
const retVal = (output || [])
|
|
1588
|
+
.filter((e) => e != null)
|
|
1589
|
+
.map((entry) => {
|
|
2258
1590
|
if (entry === null) {
|
|
2259
1591
|
return null;
|
|
2260
1592
|
}
|
|
@@ -2262,67 +1594,50 @@ var deserializeAws_restJson1Resources = function (output, context) {
|
|
|
2262
1594
|
});
|
|
2263
1595
|
return retVal;
|
|
2264
1596
|
};
|
|
2265
|
-
|
|
2266
|
-
return Object.entries(output).reduce(
|
|
2267
|
-
var _b;
|
|
2268
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1597
|
+
const deserializeAws_restJson1Tags = (output, context) => {
|
|
1598
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2269
1599
|
if (value === null) {
|
|
2270
1600
|
return acc;
|
|
2271
1601
|
}
|
|
2272
|
-
return
|
|
1602
|
+
return {
|
|
1603
|
+
...acc,
|
|
1604
|
+
[key]: __expectString(value),
|
|
1605
|
+
};
|
|
2273
1606
|
}, {});
|
|
2274
1607
|
};
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
});
|
|
2283
|
-
};
|
|
2284
|
-
var collectBody = function (streamBody, context) {
|
|
2285
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1608
|
+
const deserializeMetadata = (output) => ({
|
|
1609
|
+
httpStatusCode: output.statusCode,
|
|
1610
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1611
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1612
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1613
|
+
});
|
|
1614
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2286
1615
|
if (streamBody instanceof Uint8Array) {
|
|
2287
1616
|
return Promise.resolve(streamBody);
|
|
2288
1617
|
}
|
|
2289
1618
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2290
1619
|
};
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
1620
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1621
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1622
|
+
value !== null &&
|
|
1623
|
+
value !== "" &&
|
|
1624
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1625
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1626
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1627
|
+
if (encoded.length) {
|
|
1628
|
+
return JSON.parse(encoded);
|
|
1629
|
+
}
|
|
1630
|
+
return {};
|
|
1631
|
+
});
|
|
1632
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1633
|
+
const value = await parseBody(errorBody, context);
|
|
1634
|
+
value.message = value.message ?? value.Message;
|
|
1635
|
+
return value;
|
|
2300
1636
|
};
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
}
|
|
2306
|
-
return {};
|
|
2307
|
-
});
|
|
2308
|
-
};
|
|
2309
|
-
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2310
|
-
var value;
|
|
2311
|
-
var _a;
|
|
2312
|
-
return __generator(this, function (_b) {
|
|
2313
|
-
switch (_b.label) {
|
|
2314
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
2315
|
-
case 1:
|
|
2316
|
-
value = _b.sent();
|
|
2317
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2318
|
-
return [2, value];
|
|
2319
|
-
}
|
|
2320
|
-
});
|
|
2321
|
-
}); };
|
|
2322
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
2323
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2324
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2325
|
-
var cleanValue = rawValue;
|
|
1637
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1638
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1639
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1640
|
+
let cleanValue = rawValue;
|
|
2326
1641
|
if (typeof cleanValue === "number") {
|
|
2327
1642
|
cleanValue = cleanValue.toString();
|
|
2328
1643
|
}
|
|
@@ -2337,7 +1652,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2337
1652
|
}
|
|
2338
1653
|
return cleanValue;
|
|
2339
1654
|
};
|
|
2340
|
-
|
|
1655
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2341
1656
|
if (headerKey !== undefined) {
|
|
2342
1657
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2343
1658
|
}
|