@aws-sdk/client-outposts 3.42.0 → 3.46.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 +50 -0
- package/README.md +10 -10
- package/dist-cjs/Outposts.js +180 -0
- package/dist-cjs/commands/CancelOrderCommand.js +36 -0
- package/dist-cjs/commands/CreateSiteCommand.js +36 -0
- package/dist-cjs/commands/GetCatalogItemCommand.js +36 -0
- package/dist-cjs/commands/GetOrderCommand.js +36 -0
- package/dist-cjs/commands/GetSiteAddressCommand.js +36 -0
- package/dist-cjs/commands/GetSiteCommand.js +36 -0
- package/dist-cjs/commands/ListCatalogItemsCommand.js +36 -0
- package/dist-cjs/commands/ListOrdersCommand.js +36 -0
- package/dist-cjs/commands/UpdateOutpostCommand.js +36 -0
- package/dist-cjs/commands/UpdateSiteAddressCommand.js +36 -0
- package/dist-cjs/commands/UpdateSiteCommand.js +36 -0
- package/dist-cjs/commands/UpdateSiteRackPhysicalPropertiesCommand.js +36 -0
- package/dist-cjs/commands/index.js +12 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +318 -25
- package/dist-cjs/pagination/ListCatalogItemsPaginator.js +35 -0
- package/dist-cjs/pagination/ListOrdersPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1562 -119
- package/dist-cjs/runtimeConfig.js +0 -2
- package/dist-es/Outposts.js +180 -0
- package/dist-es/commands/CancelOrderCommand.js +39 -0
- package/dist-es/commands/CreateSiteCommand.js +39 -0
- package/dist-es/commands/GetCatalogItemCommand.js +39 -0
- package/dist-es/commands/GetOrderCommand.js +39 -0
- package/dist-es/commands/GetSiteAddressCommand.js +39 -0
- package/dist-es/commands/GetSiteCommand.js +39 -0
- package/dist-es/commands/ListCatalogItemsCommand.js +39 -0
- package/dist-es/commands/ListOrdersCommand.js +39 -0
- package/dist-es/commands/UpdateOutpostCommand.js +39 -0
- package/dist-es/commands/UpdateSiteAddressCommand.js +39 -0
- package/dist-es/commands/UpdateSiteCommand.js +39 -0
- package/dist-es/commands/UpdateSiteRackPhysicalPropertiesCommand.js +39 -0
- package/dist-es/commands/index.js +12 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +250 -16
- package/dist-es/pagination/ListCatalogItemsPaginator.js +74 -0
- package/dist-es/pagination/ListOrdersPaginator.js +74 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +1869 -265
- package/dist-es/runtimeConfig.js +0 -2
- package/dist-types/Outposts.d.ts +123 -6
- package/dist-types/OutpostsClient.d.ts +17 -5
- package/dist-types/commands/CancelOrderCommand.d.ts +37 -0
- package/dist-types/commands/CreateSiteCommand.d.ts +37 -0
- package/dist-types/commands/GetCatalogItemCommand.d.ts +35 -0
- package/dist-types/commands/GetOrderCommand.d.ts +35 -0
- package/dist-types/commands/GetSiteAddressCommand.d.ts +37 -0
- package/dist-types/commands/GetSiteCommand.d.ts +37 -0
- package/dist-types/commands/ListCatalogItemsCommand.d.ts +39 -0
- package/dist-types/commands/ListOrdersCommand.d.ts +36 -0
- package/dist-types/commands/ListOutpostsCommand.d.ts +2 -2
- package/dist-types/commands/ListSitesCommand.d.ts +1 -1
- package/dist-types/commands/UpdateOutpostCommand.d.ts +37 -0
- package/dist-types/commands/UpdateSiteAddressCommand.d.ts +46 -0
- package/dist-types/commands/UpdateSiteCommand.d.ts +37 -0
- package/dist-types/commands/UpdateSiteRackPhysicalPropertiesCommand.d.ts +40 -0
- package/dist-types/commands/index.d.ts +12 -0
- package/dist-types/models/models_0.d.ts +1206 -144
- package/dist-types/pagination/ListCatalogItemsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListOrdersPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/ts3.4/Outposts.d.ts +60 -0
- package/dist-types/ts3.4/OutpostsClient.d.ts +14 -2
- package/dist-types/ts3.4/commands/CancelOrderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateSiteCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetCatalogItemCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetOrderCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetSiteAddressCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetSiteCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListCatalogItemsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListOrdersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateOutpostCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateSiteAddressCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateSiteCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateSiteRackPhysicalPropertiesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +12 -0
- package/dist-types/ts3.4/models/models_0.d.ts +540 -51
- package/dist-types/ts3.4/pagination/ListCatalogItemsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListOrdersPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
- package/package.json +36 -43
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
4
|
+
export var serializeAws_restJson1CancelOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
6
|
+
return __generator(this, function (_c) {
|
|
7
|
+
switch (_c.label) {
|
|
8
|
+
case 0: return [4, context.endpoint()];
|
|
9
|
+
case 1:
|
|
10
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
11
|
+
headers = {};
|
|
12
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/orders/{OrderId}/cancel";
|
|
13
|
+
if (input.OrderId !== undefined) {
|
|
14
|
+
labelValue = input.OrderId;
|
|
15
|
+
if (labelValue.length <= 0) {
|
|
16
|
+
throw new Error("Empty value provided for input HTTP label: OrderId.");
|
|
17
|
+
}
|
|
18
|
+
resolvedPath = resolvedPath.replace("{OrderId}", __extendedEncodeURIComponent(labelValue));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
throw new Error("No value provided for input HTTP label: OrderId.");
|
|
22
|
+
}
|
|
23
|
+
return [2, new __HttpRequest({
|
|
24
|
+
protocol: protocol,
|
|
25
|
+
hostname: hostname,
|
|
26
|
+
port: port,
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers: headers,
|
|
29
|
+
path: resolvedPath,
|
|
30
|
+
body: body,
|
|
31
|
+
})];
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}); };
|
|
4
35
|
export var serializeAws_restJson1CreateOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
36
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
6
37
|
return __generator(this, function (_c) {
|
|
@@ -40,9 +71,43 @@ export var serializeAws_restJson1CreateOutpostCommand = function (input, context
|
|
|
40
71
|
"content-type": "application/json",
|
|
41
72
|
};
|
|
42
73
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts";
|
|
43
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AvailabilityZone !== undefined &&
|
|
74
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AvailabilityZone !== undefined &&
|
|
44
75
|
input.AvailabilityZone !== null && { AvailabilityZone: input.AvailabilityZone })), (input.AvailabilityZoneId !== undefined &&
|
|
45
|
-
input.AvailabilityZoneId !== null && { AvailabilityZoneId: input.AvailabilityZoneId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.
|
|
76
|
+
input.AvailabilityZoneId !== null && { AvailabilityZoneId: input.AvailabilityZoneId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.SupportedHardwareType !== undefined &&
|
|
77
|
+
input.SupportedHardwareType !== null && { SupportedHardwareType: input.SupportedHardwareType })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
78
|
+
return [2, new __HttpRequest({
|
|
79
|
+
protocol: protocol,
|
|
80
|
+
hostname: hostname,
|
|
81
|
+
port: port,
|
|
82
|
+
method: "POST",
|
|
83
|
+
headers: headers,
|
|
84
|
+
path: resolvedPath,
|
|
85
|
+
body: body,
|
|
86
|
+
})];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}); };
|
|
90
|
+
export var serializeAws_restJson1CreateSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
91
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
92
|
+
return __generator(this, function (_c) {
|
|
93
|
+
switch (_c.label) {
|
|
94
|
+
case 0: return [4, context.endpoint()];
|
|
95
|
+
case 1:
|
|
96
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
97
|
+
headers = {
|
|
98
|
+
"content-type": "application/json",
|
|
99
|
+
};
|
|
100
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites";
|
|
101
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes })), (input.OperatingAddress !== undefined &&
|
|
102
|
+
input.OperatingAddress !== null && {
|
|
103
|
+
OperatingAddress: serializeAws_restJson1Address(input.OperatingAddress, context),
|
|
104
|
+
})), (input.RackPhysicalProperties !== undefined &&
|
|
105
|
+
input.RackPhysicalProperties !== null && {
|
|
106
|
+
RackPhysicalProperties: serializeAws_restJson1RackPhysicalProperties(input.RackPhysicalProperties, context),
|
|
107
|
+
})), (input.ShippingAddress !== undefined &&
|
|
108
|
+
input.ShippingAddress !== null && {
|
|
109
|
+
ShippingAddress: serializeAws_restJson1Address(input.ShippingAddress, context),
|
|
110
|
+
})), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
46
111
|
return [2, new __HttpRequest({
|
|
47
112
|
protocol: protocol,
|
|
48
113
|
hostname: hostname,
|
|
@@ -117,6 +182,68 @@ export var serializeAws_restJson1DeleteSiteCommand = function (input, context) {
|
|
|
117
182
|
}
|
|
118
183
|
});
|
|
119
184
|
}); };
|
|
185
|
+
export var serializeAws_restJson1GetCatalogItemCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
186
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
187
|
+
return __generator(this, function (_c) {
|
|
188
|
+
switch (_c.label) {
|
|
189
|
+
case 0: return [4, context.endpoint()];
|
|
190
|
+
case 1:
|
|
191
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
192
|
+
headers = {};
|
|
193
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/catalog/item/{CatalogItemId}";
|
|
194
|
+
if (input.CatalogItemId !== undefined) {
|
|
195
|
+
labelValue = input.CatalogItemId;
|
|
196
|
+
if (labelValue.length <= 0) {
|
|
197
|
+
throw new Error("Empty value provided for input HTTP label: CatalogItemId.");
|
|
198
|
+
}
|
|
199
|
+
resolvedPath = resolvedPath.replace("{CatalogItemId}", __extendedEncodeURIComponent(labelValue));
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
throw new Error("No value provided for input HTTP label: CatalogItemId.");
|
|
203
|
+
}
|
|
204
|
+
return [2, new __HttpRequest({
|
|
205
|
+
protocol: protocol,
|
|
206
|
+
hostname: hostname,
|
|
207
|
+
port: port,
|
|
208
|
+
method: "GET",
|
|
209
|
+
headers: headers,
|
|
210
|
+
path: resolvedPath,
|
|
211
|
+
body: body,
|
|
212
|
+
})];
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}); };
|
|
216
|
+
export var serializeAws_restJson1GetOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
217
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
218
|
+
return __generator(this, function (_c) {
|
|
219
|
+
switch (_c.label) {
|
|
220
|
+
case 0: return [4, context.endpoint()];
|
|
221
|
+
case 1:
|
|
222
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
223
|
+
headers = {};
|
|
224
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/orders/{OrderId}";
|
|
225
|
+
if (input.OrderId !== undefined) {
|
|
226
|
+
labelValue = input.OrderId;
|
|
227
|
+
if (labelValue.length <= 0) {
|
|
228
|
+
throw new Error("Empty value provided for input HTTP label: OrderId.");
|
|
229
|
+
}
|
|
230
|
+
resolvedPath = resolvedPath.replace("{OrderId}", __extendedEncodeURIComponent(labelValue));
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
throw new Error("No value provided for input HTTP label: OrderId.");
|
|
234
|
+
}
|
|
235
|
+
return [2, new __HttpRequest({
|
|
236
|
+
protocol: protocol,
|
|
237
|
+
hostname: hostname,
|
|
238
|
+
port: port,
|
|
239
|
+
method: "GET",
|
|
240
|
+
headers: headers,
|
|
241
|
+
path: resolvedPath,
|
|
242
|
+
body: body,
|
|
243
|
+
})];
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}); };
|
|
120
247
|
export var serializeAws_restJson1GetOutpostCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
121
248
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
122
249
|
return __generator(this, function (_c) {
|
|
@@ -181,6 +308,122 @@ export var serializeAws_restJson1GetOutpostInstanceTypesCommand = function (inpu
|
|
|
181
308
|
}
|
|
182
309
|
});
|
|
183
310
|
}); };
|
|
311
|
+
export var serializeAws_restJson1GetSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
312
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
313
|
+
return __generator(this, function (_c) {
|
|
314
|
+
switch (_c.label) {
|
|
315
|
+
case 0: return [4, context.endpoint()];
|
|
316
|
+
case 1:
|
|
317
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
318
|
+
headers = {};
|
|
319
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}";
|
|
320
|
+
if (input.SiteId !== undefined) {
|
|
321
|
+
labelValue = input.SiteId;
|
|
322
|
+
if (labelValue.length <= 0) {
|
|
323
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
324
|
+
}
|
|
325
|
+
resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
329
|
+
}
|
|
330
|
+
return [2, new __HttpRequest({
|
|
331
|
+
protocol: protocol,
|
|
332
|
+
hostname: hostname,
|
|
333
|
+
port: port,
|
|
334
|
+
method: "GET",
|
|
335
|
+
headers: headers,
|
|
336
|
+
path: resolvedPath,
|
|
337
|
+
body: body,
|
|
338
|
+
})];
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}); };
|
|
342
|
+
export var serializeAws_restJson1GetSiteAddressCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
343
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
344
|
+
return __generator(this, function (_c) {
|
|
345
|
+
switch (_c.label) {
|
|
346
|
+
case 0: return [4, context.endpoint()];
|
|
347
|
+
case 1:
|
|
348
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
349
|
+
headers = {};
|
|
350
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}/address";
|
|
351
|
+
if (input.SiteId !== undefined) {
|
|
352
|
+
labelValue = input.SiteId;
|
|
353
|
+
if (labelValue.length <= 0) {
|
|
354
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
355
|
+
}
|
|
356
|
+
resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
360
|
+
}
|
|
361
|
+
query = __assign({}, (input.AddressType !== undefined && { AddressType: input.AddressType }));
|
|
362
|
+
return [2, new __HttpRequest({
|
|
363
|
+
protocol: protocol,
|
|
364
|
+
hostname: hostname,
|
|
365
|
+
port: port,
|
|
366
|
+
method: "GET",
|
|
367
|
+
headers: headers,
|
|
368
|
+
path: resolvedPath,
|
|
369
|
+
query: query,
|
|
370
|
+
body: body,
|
|
371
|
+
})];
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}); };
|
|
375
|
+
export var serializeAws_restJson1ListCatalogItemsCommand = 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 = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/catalog/items";
|
|
384
|
+
query = __assign(__assign(__assign(__assign(__assign({}, (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() })), (input.ItemClassFilter !== undefined && {
|
|
385
|
+
ItemClassFilter: (input.ItemClassFilter || []).map(function (_entry) { return _entry; }),
|
|
386
|
+
})), (input.SupportedStorageFilter !== undefined && {
|
|
387
|
+
SupportedStorageFilter: (input.SupportedStorageFilter || []).map(function (_entry) { return _entry; }),
|
|
388
|
+
})), (input.EC2FamilyFilter !== undefined && {
|
|
389
|
+
EC2FamilyFilter: (input.EC2FamilyFilter || []).map(function (_entry) { return _entry; }),
|
|
390
|
+
}));
|
|
391
|
+
return [2, new __HttpRequest({
|
|
392
|
+
protocol: protocol,
|
|
393
|
+
hostname: hostname,
|
|
394
|
+
port: port,
|
|
395
|
+
method: "GET",
|
|
396
|
+
headers: headers,
|
|
397
|
+
path: resolvedPath,
|
|
398
|
+
query: query,
|
|
399
|
+
body: body,
|
|
400
|
+
})];
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
}); };
|
|
404
|
+
export var serializeAws_restJson1ListOrdersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
405
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
406
|
+
return __generator(this, function (_c) {
|
|
407
|
+
switch (_c.label) {
|
|
408
|
+
case 0: return [4, context.endpoint()];
|
|
409
|
+
case 1:
|
|
410
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
411
|
+
headers = {};
|
|
412
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-orders";
|
|
413
|
+
query = __assign(__assign(__assign({}, (input.OutpostIdentifierFilter !== undefined && { OutpostIdentifierFilter: input.OutpostIdentifierFilter })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
414
|
+
return [2, new __HttpRequest({
|
|
415
|
+
protocol: protocol,
|
|
416
|
+
hostname: hostname,
|
|
417
|
+
port: port,
|
|
418
|
+
method: "GET",
|
|
419
|
+
headers: headers,
|
|
420
|
+
path: resolvedPath,
|
|
421
|
+
query: query,
|
|
422
|
+
body: body,
|
|
423
|
+
})];
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}); };
|
|
184
427
|
export var serializeAws_restJson1ListOutpostsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
185
428
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
186
429
|
return __generator(this, function (_c) {
|
|
@@ -331,47 +574,277 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
|
|
|
331
574
|
}
|
|
332
575
|
});
|
|
333
576
|
}); };
|
|
334
|
-
export var
|
|
335
|
-
var
|
|
577
|
+
export var serializeAws_restJson1UpdateOutpostCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
578
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
336
579
|
return __generator(this, function (_c) {
|
|
337
580
|
switch (_c.label) {
|
|
338
|
-
case 0:
|
|
339
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
340
|
-
return [2, deserializeAws_restJson1CreateOrderCommandError(output, context)];
|
|
341
|
-
}
|
|
342
|
-
contents = {
|
|
343
|
-
$metadata: deserializeMetadata(output),
|
|
344
|
-
Order: undefined,
|
|
345
|
-
};
|
|
346
|
-
_a = __expectNonNull;
|
|
347
|
-
_b = __expectObject;
|
|
348
|
-
return [4, parseBody(output.body, context)];
|
|
581
|
+
case 0: return [4, context.endpoint()];
|
|
349
582
|
case 1:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
583
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
584
|
+
headers = {
|
|
585
|
+
"content-type": "application/json",
|
|
586
|
+
};
|
|
587
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts/{OutpostId}";
|
|
588
|
+
if (input.OutpostId !== undefined) {
|
|
589
|
+
labelValue = input.OutpostId;
|
|
590
|
+
if (labelValue.length <= 0) {
|
|
591
|
+
throw new Error("Empty value provided for input HTTP label: OutpostId.");
|
|
592
|
+
}
|
|
593
|
+
resolvedPath = resolvedPath.replace("{OutpostId}", __extendedEncodeURIComponent(labelValue));
|
|
353
594
|
}
|
|
354
|
-
|
|
595
|
+
else {
|
|
596
|
+
throw new Error("No value provided for input HTTP label: OutpostId.");
|
|
597
|
+
}
|
|
598
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.SupportedHardwareType !== undefined &&
|
|
599
|
+
input.SupportedHardwareType !== null && { SupportedHardwareType: input.SupportedHardwareType })));
|
|
600
|
+
return [2, new __HttpRequest({
|
|
601
|
+
protocol: protocol,
|
|
602
|
+
hostname: hostname,
|
|
603
|
+
port: port,
|
|
604
|
+
method: "PATCH",
|
|
605
|
+
headers: headers,
|
|
606
|
+
path: resolvedPath,
|
|
607
|
+
body: body,
|
|
608
|
+
})];
|
|
355
609
|
}
|
|
356
610
|
});
|
|
357
611
|
}); };
|
|
358
|
-
var
|
|
359
|
-
var
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
case 0:
|
|
364
|
-
_a = [__assign({}, output)];
|
|
365
|
-
_j = {};
|
|
366
|
-
return [4, parseBody(output.body, context)];
|
|
612
|
+
export var serializeAws_restJson1UpdateSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
613
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
614
|
+
return __generator(this, function (_c) {
|
|
615
|
+
switch (_c.label) {
|
|
616
|
+
case 0: return [4, context.endpoint()];
|
|
367
617
|
case 1:
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
618
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
619
|
+
headers = {
|
|
620
|
+
"content-type": "application/json",
|
|
621
|
+
};
|
|
622
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}";
|
|
623
|
+
if (input.SiteId !== undefined) {
|
|
624
|
+
labelValue = input.SiteId;
|
|
625
|
+
if (labelValue.length <= 0) {
|
|
626
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
627
|
+
}
|
|
628
|
+
resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
632
|
+
}
|
|
633
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes })));
|
|
634
|
+
return [2, new __HttpRequest({
|
|
635
|
+
protocol: protocol,
|
|
636
|
+
hostname: hostname,
|
|
637
|
+
port: port,
|
|
638
|
+
method: "PATCH",
|
|
639
|
+
headers: headers,
|
|
640
|
+
path: resolvedPath,
|
|
641
|
+
body: body,
|
|
642
|
+
})];
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
}); };
|
|
646
|
+
export var serializeAws_restJson1UpdateSiteAddressCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
647
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
648
|
+
return __generator(this, function (_c) {
|
|
649
|
+
switch (_c.label) {
|
|
650
|
+
case 0: return [4, context.endpoint()];
|
|
651
|
+
case 1:
|
|
652
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
653
|
+
headers = {
|
|
654
|
+
"content-type": "application/json",
|
|
655
|
+
};
|
|
656
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}/address";
|
|
657
|
+
if (input.SiteId !== undefined) {
|
|
658
|
+
labelValue = input.SiteId;
|
|
659
|
+
if (labelValue.length <= 0) {
|
|
660
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
661
|
+
}
|
|
662
|
+
resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
666
|
+
}
|
|
667
|
+
body = JSON.stringify(__assign(__assign({}, (input.Address !== undefined &&
|
|
668
|
+
input.Address !== null && { Address: serializeAws_restJson1Address(input.Address, context) })), (input.AddressType !== undefined && input.AddressType !== null && { AddressType: input.AddressType })));
|
|
669
|
+
return [2, new __HttpRequest({
|
|
670
|
+
protocol: protocol,
|
|
671
|
+
hostname: hostname,
|
|
672
|
+
port: port,
|
|
673
|
+
method: "PUT",
|
|
674
|
+
headers: headers,
|
|
675
|
+
path: resolvedPath,
|
|
676
|
+
body: body,
|
|
677
|
+
})];
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
}); };
|
|
681
|
+
export var serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
682
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
683
|
+
return __generator(this, function (_c) {
|
|
684
|
+
switch (_c.label) {
|
|
685
|
+
case 0: return [4, context.endpoint()];
|
|
686
|
+
case 1:
|
|
687
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
688
|
+
headers = {
|
|
689
|
+
"content-type": "application/json",
|
|
690
|
+
};
|
|
691
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}/rackPhysicalProperties";
|
|
692
|
+
if (input.SiteId !== undefined) {
|
|
693
|
+
labelValue = input.SiteId;
|
|
694
|
+
if (labelValue.length <= 0) {
|
|
695
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
696
|
+
}
|
|
697
|
+
resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
701
|
+
}
|
|
702
|
+
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.FiberOpticCableType !== undefined &&
|
|
703
|
+
input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType })), (input.MaximumSupportedWeightLbs !== undefined &&
|
|
704
|
+
input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs })), (input.OpticalStandard !== undefined &&
|
|
705
|
+
input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard })), (input.PowerConnector !== undefined &&
|
|
706
|
+
input.PowerConnector !== null && { PowerConnector: input.PowerConnector })), (input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva })), (input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop })), (input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase })), (input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount })), (input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps })));
|
|
707
|
+
return [2, new __HttpRequest({
|
|
708
|
+
protocol: protocol,
|
|
709
|
+
hostname: hostname,
|
|
710
|
+
port: port,
|
|
711
|
+
method: "PATCH",
|
|
712
|
+
headers: headers,
|
|
713
|
+
path: resolvedPath,
|
|
714
|
+
body: body,
|
|
715
|
+
})];
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
}); };
|
|
719
|
+
export var deserializeAws_restJson1CancelOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
720
|
+
var contents;
|
|
721
|
+
return __generator(this, function (_a) {
|
|
722
|
+
switch (_a.label) {
|
|
723
|
+
case 0:
|
|
724
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
725
|
+
return [2, deserializeAws_restJson1CancelOrderCommandError(output, context)];
|
|
726
|
+
}
|
|
727
|
+
contents = {
|
|
728
|
+
$metadata: deserializeMetadata(output),
|
|
729
|
+
};
|
|
730
|
+
return [4, collectBody(output.body, context)];
|
|
731
|
+
case 1:
|
|
732
|
+
_a.sent();
|
|
733
|
+
return [2, Promise.resolve(contents)];
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
}); };
|
|
737
|
+
var deserializeAws_restJson1CancelOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
738
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
739
|
+
var _h;
|
|
740
|
+
return __generator(this, function (_j) {
|
|
741
|
+
switch (_j.label) {
|
|
742
|
+
case 0:
|
|
743
|
+
_a = [__assign({}, output)];
|
|
744
|
+
_h = {};
|
|
745
|
+
return [4, parseBody(output.body, context)];
|
|
746
|
+
case 1:
|
|
747
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
748
|
+
errorCode = "UnknownError";
|
|
749
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
750
|
+
_b = errorCode;
|
|
751
|
+
switch (_b) {
|
|
752
|
+
case "AccessDeniedException": return [3, 2];
|
|
753
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
754
|
+
case "ConflictException": return [3, 4];
|
|
755
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
756
|
+
case "InternalServerException": return [3, 6];
|
|
757
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
758
|
+
case "NotFoundException": return [3, 8];
|
|
759
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
760
|
+
case "ValidationException": return [3, 10];
|
|
761
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
762
|
+
}
|
|
763
|
+
return [3, 12];
|
|
764
|
+
case 2:
|
|
765
|
+
_c = [{}];
|
|
766
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
767
|
+
case 3:
|
|
768
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
769
|
+
return [3, 13];
|
|
770
|
+
case 4:
|
|
771
|
+
_d = [{}];
|
|
772
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
773
|
+
case 5:
|
|
774
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
775
|
+
return [3, 13];
|
|
776
|
+
case 6:
|
|
777
|
+
_e = [{}];
|
|
778
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
779
|
+
case 7:
|
|
780
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
781
|
+
return [3, 13];
|
|
782
|
+
case 8:
|
|
783
|
+
_f = [{}];
|
|
784
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
785
|
+
case 9:
|
|
786
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
787
|
+
return [3, 13];
|
|
788
|
+
case 10:
|
|
789
|
+
_g = [{}];
|
|
790
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
791
|
+
case 11:
|
|
792
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
793
|
+
return [3, 13];
|
|
794
|
+
case 12:
|
|
795
|
+
parsedBody = parsedOutput.body;
|
|
796
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
797
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
798
|
+
_j.label = 13;
|
|
799
|
+
case 13:
|
|
800
|
+
message = response.message || response.Message || errorCode;
|
|
801
|
+
response.message = message;
|
|
802
|
+
delete response.Message;
|
|
803
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
}); };
|
|
807
|
+
export var deserializeAws_restJson1CreateOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
808
|
+
var contents, data, _a, _b;
|
|
809
|
+
return __generator(this, function (_c) {
|
|
810
|
+
switch (_c.label) {
|
|
811
|
+
case 0:
|
|
812
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
813
|
+
return [2, deserializeAws_restJson1CreateOrderCommandError(output, context)];
|
|
814
|
+
}
|
|
815
|
+
contents = {
|
|
816
|
+
$metadata: deserializeMetadata(output),
|
|
817
|
+
Order: undefined,
|
|
818
|
+
};
|
|
819
|
+
_a = __expectNonNull;
|
|
820
|
+
_b = __expectObject;
|
|
821
|
+
return [4, parseBody(output.body, context)];
|
|
822
|
+
case 1:
|
|
823
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
824
|
+
if (data.Order !== undefined && data.Order !== null) {
|
|
825
|
+
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
826
|
+
}
|
|
827
|
+
return [2, Promise.resolve(contents)];
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
}); };
|
|
831
|
+
var deserializeAws_restJson1CreateOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
832
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
|
|
833
|
+
var _j;
|
|
834
|
+
return __generator(this, function (_k) {
|
|
835
|
+
switch (_k.label) {
|
|
836
|
+
case 0:
|
|
837
|
+
_a = [__assign({}, output)];
|
|
838
|
+
_j = {};
|
|
839
|
+
return [4, parseBody(output.body, context)];
|
|
840
|
+
case 1:
|
|
841
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
|
|
842
|
+
errorCode = "UnknownError";
|
|
843
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
844
|
+
_b = errorCode;
|
|
845
|
+
switch (_b) {
|
|
846
|
+
case "AccessDeniedException": return [3, 2];
|
|
847
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
375
848
|
case "ConflictException": return [3, 4];
|
|
376
849
|
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
377
850
|
case "InternalServerException": return [3, 6];
|
|
@@ -535,25 +1008,31 @@ var deserializeAws_restJson1CreateOutpostCommandError = function (output, contex
|
|
|
535
1008
|
}
|
|
536
1009
|
});
|
|
537
1010
|
}); };
|
|
538
|
-
export var
|
|
539
|
-
var contents;
|
|
540
|
-
return __generator(this, function (
|
|
541
|
-
switch (
|
|
1011
|
+
export var deserializeAws_restJson1CreateSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1012
|
+
var contents, data, _a, _b;
|
|
1013
|
+
return __generator(this, function (_c) {
|
|
1014
|
+
switch (_c.label) {
|
|
542
1015
|
case 0:
|
|
543
1016
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
544
|
-
return [2,
|
|
1017
|
+
return [2, deserializeAws_restJson1CreateSiteCommandError(output, context)];
|
|
545
1018
|
}
|
|
546
1019
|
contents = {
|
|
547
1020
|
$metadata: deserializeMetadata(output),
|
|
1021
|
+
Site: undefined,
|
|
548
1022
|
};
|
|
549
|
-
|
|
1023
|
+
_a = __expectNonNull;
|
|
1024
|
+
_b = __expectObject;
|
|
1025
|
+
return [4, parseBody(output.body, context)];
|
|
550
1026
|
case 1:
|
|
551
|
-
_a.sent();
|
|
1027
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1028
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
1029
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
1030
|
+
}
|
|
552
1031
|
return [2, Promise.resolve(contents)];
|
|
553
1032
|
}
|
|
554
1033
|
});
|
|
555
1034
|
}); };
|
|
556
|
-
var
|
|
1035
|
+
var deserializeAws_restJson1CreateSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
557
1036
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
558
1037
|
var _h;
|
|
559
1038
|
return __generator(this, function (_j) {
|
|
@@ -574,8 +1053,8 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
|
|
|
574
1053
|
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
575
1054
|
case "InternalServerException": return [3, 6];
|
|
576
1055
|
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
577
|
-
case "
|
|
578
|
-
case "com.amazonaws.outposts#
|
|
1056
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
1057
|
+
case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3, 8];
|
|
579
1058
|
case "ValidationException": return [3, 10];
|
|
580
1059
|
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
581
1060
|
}
|
|
@@ -600,7 +1079,7 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
|
|
|
600
1079
|
return [3, 13];
|
|
601
1080
|
case 8:
|
|
602
1081
|
_f = [{}];
|
|
603
|
-
return [4,
|
|
1082
|
+
return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
604
1083
|
case 9:
|
|
605
1084
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
606
1085
|
return [3, 13];
|
|
@@ -623,13 +1102,13 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
|
|
|
623
1102
|
}
|
|
624
1103
|
});
|
|
625
1104
|
}); };
|
|
626
|
-
export var
|
|
1105
|
+
export var deserializeAws_restJson1DeleteOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
627
1106
|
var contents;
|
|
628
1107
|
return __generator(this, function (_a) {
|
|
629
1108
|
switch (_a.label) {
|
|
630
1109
|
case 0:
|
|
631
1110
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
632
|
-
return [2,
|
|
1111
|
+
return [2, deserializeAws_restJson1DeleteOutpostCommandError(output, context)];
|
|
633
1112
|
}
|
|
634
1113
|
contents = {
|
|
635
1114
|
$metadata: deserializeMetadata(output),
|
|
@@ -641,7 +1120,7 @@ export var deserializeAws_restJson1DeleteSiteCommand = function (output, context
|
|
|
641
1120
|
}
|
|
642
1121
|
});
|
|
643
1122
|
}); };
|
|
644
|
-
var
|
|
1123
|
+
var deserializeAws_restJson1DeleteOutpostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
645
1124
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
646
1125
|
var _h;
|
|
647
1126
|
return __generator(this, function (_j) {
|
|
@@ -711,85 +1190,87 @@ var deserializeAws_restJson1DeleteSiteCommandError = function (output, context)
|
|
|
711
1190
|
}
|
|
712
1191
|
});
|
|
713
1192
|
}); };
|
|
714
|
-
export var
|
|
715
|
-
var contents
|
|
716
|
-
return __generator(this, function (
|
|
717
|
-
switch (
|
|
1193
|
+
export var deserializeAws_restJson1DeleteSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1194
|
+
var contents;
|
|
1195
|
+
return __generator(this, function (_a) {
|
|
1196
|
+
switch (_a.label) {
|
|
718
1197
|
case 0:
|
|
719
1198
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
720
|
-
return [2,
|
|
1199
|
+
return [2, deserializeAws_restJson1DeleteSiteCommandError(output, context)];
|
|
721
1200
|
}
|
|
722
1201
|
contents = {
|
|
723
1202
|
$metadata: deserializeMetadata(output),
|
|
724
|
-
Outpost: undefined,
|
|
725
1203
|
};
|
|
726
|
-
|
|
727
|
-
_b = __expectObject;
|
|
728
|
-
return [4, parseBody(output.body, context)];
|
|
1204
|
+
return [4, collectBody(output.body, context)];
|
|
729
1205
|
case 1:
|
|
730
|
-
|
|
731
|
-
if (data.Outpost !== undefined && data.Outpost !== null) {
|
|
732
|
-
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
733
|
-
}
|
|
1206
|
+
_a.sent();
|
|
734
1207
|
return [2, Promise.resolve(contents)];
|
|
735
1208
|
}
|
|
736
1209
|
});
|
|
737
1210
|
}); };
|
|
738
|
-
var
|
|
739
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
740
|
-
var
|
|
741
|
-
return __generator(this, function (
|
|
742
|
-
switch (
|
|
1211
|
+
var deserializeAws_restJson1DeleteSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1212
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
1213
|
+
var _h;
|
|
1214
|
+
return __generator(this, function (_j) {
|
|
1215
|
+
switch (_j.label) {
|
|
743
1216
|
case 0:
|
|
744
1217
|
_a = [__assign({}, output)];
|
|
745
|
-
|
|
1218
|
+
_h = {};
|
|
746
1219
|
return [4, parseBody(output.body, context)];
|
|
747
1220
|
case 1:
|
|
748
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1221
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
749
1222
|
errorCode = "UnknownError";
|
|
750
1223
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
751
1224
|
_b = errorCode;
|
|
752
1225
|
switch (_b) {
|
|
753
1226
|
case "AccessDeniedException": return [3, 2];
|
|
754
1227
|
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
755
|
-
case "
|
|
756
|
-
case "com.amazonaws.outposts#
|
|
757
|
-
case "
|
|
758
|
-
case "com.amazonaws.outposts#
|
|
759
|
-
case "
|
|
760
|
-
case "com.amazonaws.outposts#
|
|
1228
|
+
case "ConflictException": return [3, 4];
|
|
1229
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
1230
|
+
case "InternalServerException": return [3, 6];
|
|
1231
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
1232
|
+
case "NotFoundException": return [3, 8];
|
|
1233
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
1234
|
+
case "ValidationException": return [3, 10];
|
|
1235
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
761
1236
|
}
|
|
762
|
-
return [3,
|
|
1237
|
+
return [3, 12];
|
|
763
1238
|
case 2:
|
|
764
1239
|
_c = [{}];
|
|
765
1240
|
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
766
1241
|
case 3:
|
|
767
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
768
|
-
return [3,
|
|
1242
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1243
|
+
return [3, 13];
|
|
769
1244
|
case 4:
|
|
770
1245
|
_d = [{}];
|
|
771
|
-
return [4,
|
|
1246
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
772
1247
|
case 5:
|
|
773
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
774
|
-
return [3,
|
|
1248
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1249
|
+
return [3, 13];
|
|
775
1250
|
case 6:
|
|
776
1251
|
_e = [{}];
|
|
777
|
-
return [4,
|
|
1252
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
778
1253
|
case 7:
|
|
779
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
780
|
-
return [3,
|
|
1254
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1255
|
+
return [3, 13];
|
|
781
1256
|
case 8:
|
|
782
1257
|
_f = [{}];
|
|
783
|
-
return [4,
|
|
1258
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
784
1259
|
case 9:
|
|
785
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
786
|
-
return [3,
|
|
1260
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1261
|
+
return [3, 13];
|
|
787
1262
|
case 10:
|
|
1263
|
+
_g = [{}];
|
|
1264
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1265
|
+
case 11:
|
|
1266
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1267
|
+
return [3, 13];
|
|
1268
|
+
case 12:
|
|
788
1269
|
parsedBody = parsedOutput.body;
|
|
789
1270
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
790
1271
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
791
|
-
|
|
792
|
-
case
|
|
1272
|
+
_j.label = 13;
|
|
1273
|
+
case 13:
|
|
793
1274
|
message = response.message || response.Message || errorCode;
|
|
794
1275
|
response.message = message;
|
|
795
1276
|
delete response.Message;
|
|
@@ -797,97 +1278,77 @@ var deserializeAws_restJson1GetOutpostCommandError = function (output, context)
|
|
|
797
1278
|
}
|
|
798
1279
|
});
|
|
799
1280
|
}); };
|
|
800
|
-
export var
|
|
1281
|
+
export var deserializeAws_restJson1GetCatalogItemCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
801
1282
|
var contents, data, _a, _b;
|
|
802
1283
|
return __generator(this, function (_c) {
|
|
803
1284
|
switch (_c.label) {
|
|
804
1285
|
case 0:
|
|
805
1286
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
806
|
-
return [2,
|
|
1287
|
+
return [2, deserializeAws_restJson1GetCatalogItemCommandError(output, context)];
|
|
807
1288
|
}
|
|
808
1289
|
contents = {
|
|
809
1290
|
$metadata: deserializeMetadata(output),
|
|
810
|
-
|
|
811
|
-
NextToken: undefined,
|
|
812
|
-
OutpostArn: undefined,
|
|
813
|
-
OutpostId: undefined,
|
|
1291
|
+
CatalogItem: undefined,
|
|
814
1292
|
};
|
|
815
1293
|
_a = __expectNonNull;
|
|
816
1294
|
_b = __expectObject;
|
|
817
1295
|
return [4, parseBody(output.body, context)];
|
|
818
1296
|
case 1:
|
|
819
1297
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
820
|
-
if (data.
|
|
821
|
-
contents.
|
|
822
|
-
}
|
|
823
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
824
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
825
|
-
}
|
|
826
|
-
if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
|
|
827
|
-
contents.OutpostArn = __expectString(data.OutpostArn);
|
|
828
|
-
}
|
|
829
|
-
if (data.OutpostId !== undefined && data.OutpostId !== null) {
|
|
830
|
-
contents.OutpostId = __expectString(data.OutpostId);
|
|
1298
|
+
if (data.CatalogItem !== undefined && data.CatalogItem !== null) {
|
|
1299
|
+
contents.CatalogItem = deserializeAws_restJson1CatalogItem(data.CatalogItem, context);
|
|
831
1300
|
}
|
|
832
1301
|
return [2, Promise.resolve(contents)];
|
|
833
1302
|
}
|
|
834
1303
|
});
|
|
835
1304
|
}); };
|
|
836
|
-
var
|
|
837
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e,
|
|
838
|
-
var
|
|
839
|
-
return __generator(this, function (
|
|
840
|
-
switch (
|
|
1305
|
+
var deserializeAws_restJson1GetCatalogItemCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1306
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1307
|
+
var _f;
|
|
1308
|
+
return __generator(this, function (_g) {
|
|
1309
|
+
switch (_g.label) {
|
|
841
1310
|
case 0:
|
|
842
1311
|
_a = [__assign({}, output)];
|
|
843
|
-
|
|
1312
|
+
_f = {};
|
|
844
1313
|
return [4, parseBody(output.body, context)];
|
|
845
1314
|
case 1:
|
|
846
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1315
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
847
1316
|
errorCode = "UnknownError";
|
|
848
1317
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
849
1318
|
_b = errorCode;
|
|
850
1319
|
switch (_b) {
|
|
851
|
-
case "
|
|
852
|
-
case "com.amazonaws.outposts#
|
|
853
|
-
case "
|
|
854
|
-
case "com.amazonaws.outposts#
|
|
855
|
-
case "
|
|
856
|
-
case "com.amazonaws.outposts#
|
|
857
|
-
case "ValidationException": return [3, 8];
|
|
858
|
-
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1320
|
+
case "InternalServerException": return [3, 2];
|
|
1321
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
1322
|
+
case "NotFoundException": return [3, 4];
|
|
1323
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
1324
|
+
case "ValidationException": return [3, 6];
|
|
1325
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
859
1326
|
}
|
|
860
|
-
return [3,
|
|
1327
|
+
return [3, 8];
|
|
861
1328
|
case 2:
|
|
862
1329
|
_c = [{}];
|
|
863
|
-
return [4,
|
|
1330
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
864
1331
|
case 3:
|
|
865
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
866
|
-
return [3,
|
|
1332
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1333
|
+
return [3, 9];
|
|
867
1334
|
case 4:
|
|
868
1335
|
_d = [{}];
|
|
869
|
-
return [4,
|
|
1336
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
870
1337
|
case 5:
|
|
871
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
872
|
-
return [3,
|
|
1338
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1339
|
+
return [3, 9];
|
|
873
1340
|
case 6:
|
|
874
1341
|
_e = [{}];
|
|
875
|
-
return [4,
|
|
1342
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
876
1343
|
case 7:
|
|
877
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
878
|
-
return [3,
|
|
1344
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1345
|
+
return [3, 9];
|
|
879
1346
|
case 8:
|
|
880
|
-
_f = [{}];
|
|
881
|
-
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
882
|
-
case 9:
|
|
883
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
884
|
-
return [3, 11];
|
|
885
|
-
case 10:
|
|
886
1347
|
parsedBody = parsedOutput.body;
|
|
887
1348
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
888
1349
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
889
|
-
|
|
890
|
-
case
|
|
1350
|
+
_g.label = 9;
|
|
1351
|
+
case 9:
|
|
891
1352
|
message = response.message || response.Message || errorCode;
|
|
892
1353
|
response.message = message;
|
|
893
1354
|
delete response.Message;
|
|
@@ -895,35 +1356,31 @@ var deserializeAws_restJson1GetOutpostInstanceTypesCommandError = function (outp
|
|
|
895
1356
|
}
|
|
896
1357
|
});
|
|
897
1358
|
}); };
|
|
898
|
-
export var
|
|
1359
|
+
export var deserializeAws_restJson1GetOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
899
1360
|
var contents, data, _a, _b;
|
|
900
1361
|
return __generator(this, function (_c) {
|
|
901
1362
|
switch (_c.label) {
|
|
902
1363
|
case 0:
|
|
903
1364
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
904
|
-
return [2,
|
|
1365
|
+
return [2, deserializeAws_restJson1GetOrderCommandError(output, context)];
|
|
905
1366
|
}
|
|
906
1367
|
contents = {
|
|
907
1368
|
$metadata: deserializeMetadata(output),
|
|
908
|
-
|
|
909
|
-
Outposts: undefined,
|
|
1369
|
+
Order: undefined,
|
|
910
1370
|
};
|
|
911
1371
|
_a = __expectNonNull;
|
|
912
1372
|
_b = __expectObject;
|
|
913
1373
|
return [4, parseBody(output.body, context)];
|
|
914
1374
|
case 1:
|
|
915
1375
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
916
|
-
if (data.
|
|
917
|
-
contents.
|
|
918
|
-
}
|
|
919
|
-
if (data.Outposts !== undefined && data.Outposts !== null) {
|
|
920
|
-
contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
|
|
1376
|
+
if (data.Order !== undefined && data.Order !== null) {
|
|
1377
|
+
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
921
1378
|
}
|
|
922
1379
|
return [2, Promise.resolve(contents)];
|
|
923
1380
|
}
|
|
924
1381
|
});
|
|
925
1382
|
}); };
|
|
926
|
-
var
|
|
1383
|
+
var deserializeAws_restJson1GetOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
927
1384
|
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
928
1385
|
var _f;
|
|
929
1386
|
return __generator(this, function (_g) {
|
|
@@ -938,23 +1395,23 @@ var deserializeAws_restJson1ListOutpostsCommandError = function (output, context
|
|
|
938
1395
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
939
1396
|
_b = errorCode;
|
|
940
1397
|
switch (_b) {
|
|
941
|
-
case "
|
|
942
|
-
case "com.amazonaws.outposts#
|
|
943
|
-
case "
|
|
944
|
-
case "com.amazonaws.outposts#
|
|
1398
|
+
case "InternalServerException": return [3, 2];
|
|
1399
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
1400
|
+
case "NotFoundException": return [3, 4];
|
|
1401
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
945
1402
|
case "ValidationException": return [3, 6];
|
|
946
1403
|
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
947
1404
|
}
|
|
948
1405
|
return [3, 8];
|
|
949
1406
|
case 2:
|
|
950
1407
|
_c = [{}];
|
|
951
|
-
return [4,
|
|
1408
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
952
1409
|
case 3:
|
|
953
1410
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
954
1411
|
return [3, 9];
|
|
955
1412
|
case 4:
|
|
956
1413
|
_d = [{}];
|
|
957
|
-
return [4,
|
|
1414
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
958
1415
|
case 5:
|
|
959
1416
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
960
1417
|
return [3, 9];
|
|
@@ -977,45 +1434,41 @@ var deserializeAws_restJson1ListOutpostsCommandError = function (output, context
|
|
|
977
1434
|
}
|
|
978
1435
|
});
|
|
979
1436
|
}); };
|
|
980
|
-
export var
|
|
1437
|
+
export var deserializeAws_restJson1GetOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
981
1438
|
var contents, data, _a, _b;
|
|
982
1439
|
return __generator(this, function (_c) {
|
|
983
1440
|
switch (_c.label) {
|
|
984
1441
|
case 0:
|
|
985
1442
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
986
|
-
return [2,
|
|
1443
|
+
return [2, deserializeAws_restJson1GetOutpostCommandError(output, context)];
|
|
987
1444
|
}
|
|
988
1445
|
contents = {
|
|
989
1446
|
$metadata: deserializeMetadata(output),
|
|
990
|
-
|
|
991
|
-
Sites: undefined,
|
|
1447
|
+
Outpost: undefined,
|
|
992
1448
|
};
|
|
993
1449
|
_a = __expectNonNull;
|
|
994
1450
|
_b = __expectObject;
|
|
995
1451
|
return [4, parseBody(output.body, context)];
|
|
996
1452
|
case 1:
|
|
997
1453
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
998
|
-
if (data.
|
|
999
|
-
contents.
|
|
1000
|
-
}
|
|
1001
|
-
if (data.Sites !== undefined && data.Sites !== null) {
|
|
1002
|
-
contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
|
|
1454
|
+
if (data.Outpost !== undefined && data.Outpost !== null) {
|
|
1455
|
+
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
1003
1456
|
}
|
|
1004
1457
|
return [2, Promise.resolve(contents)];
|
|
1005
1458
|
}
|
|
1006
1459
|
});
|
|
1007
1460
|
}); };
|
|
1008
|
-
var
|
|
1009
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1010
|
-
var
|
|
1011
|
-
return __generator(this, function (
|
|
1012
|
-
switch (
|
|
1461
|
+
var deserializeAws_restJson1GetOutpostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1462
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1463
|
+
var _g;
|
|
1464
|
+
return __generator(this, function (_h) {
|
|
1465
|
+
switch (_h.label) {
|
|
1013
1466
|
case 0:
|
|
1014
1467
|
_a = [__assign({}, output)];
|
|
1015
|
-
|
|
1468
|
+
_g = {};
|
|
1016
1469
|
return [4, parseBody(output.body, context)];
|
|
1017
1470
|
case 1:
|
|
1018
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1471
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1019
1472
|
errorCode = "UnknownError";
|
|
1020
1473
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1021
1474
|
_b = errorCode;
|
|
@@ -1024,34 +1477,42 @@ var deserializeAws_restJson1ListSitesCommandError = function (output, context) {
|
|
|
1024
1477
|
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
1025
1478
|
case "InternalServerException": return [3, 4];
|
|
1026
1479
|
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
1027
|
-
case "
|
|
1028
|
-
case "com.amazonaws.outposts#
|
|
1480
|
+
case "NotFoundException": return [3, 6];
|
|
1481
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
1482
|
+
case "ValidationException": return [3, 8];
|
|
1483
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1029
1484
|
}
|
|
1030
|
-
return [3,
|
|
1485
|
+
return [3, 10];
|
|
1031
1486
|
case 2:
|
|
1032
1487
|
_c = [{}];
|
|
1033
1488
|
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1034
1489
|
case 3:
|
|
1035
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
1036
|
-
return [3,
|
|
1490
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1491
|
+
return [3, 11];
|
|
1037
1492
|
case 4:
|
|
1038
1493
|
_d = [{}];
|
|
1039
1494
|
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1040
1495
|
case 5:
|
|
1041
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
1042
|
-
return [3,
|
|
1496
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1497
|
+
return [3, 11];
|
|
1043
1498
|
case 6:
|
|
1044
1499
|
_e = [{}];
|
|
1045
|
-
return [4,
|
|
1500
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1046
1501
|
case 7:
|
|
1047
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
1048
|
-
return [3,
|
|
1502
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1503
|
+
return [3, 11];
|
|
1049
1504
|
case 8:
|
|
1505
|
+
_f = [{}];
|
|
1506
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1507
|
+
case 9:
|
|
1508
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1509
|
+
return [3, 11];
|
|
1510
|
+
case 10:
|
|
1050
1511
|
parsedBody = parsedOutput.body;
|
|
1051
1512
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1052
1513
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1053
|
-
|
|
1054
|
-
case
|
|
1514
|
+
_h.label = 11;
|
|
1515
|
+
case 11:
|
|
1055
1516
|
message = response.message || response.Message || errorCode;
|
|
1056
1517
|
response.message = message;
|
|
1057
1518
|
delete response.Message;
|
|
@@ -1059,38 +1520,796 @@ var deserializeAws_restJson1ListSitesCommandError = function (output, context) {
|
|
|
1059
1520
|
}
|
|
1060
1521
|
});
|
|
1061
1522
|
}); };
|
|
1062
|
-
export var
|
|
1523
|
+
export var deserializeAws_restJson1GetOutpostInstanceTypesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1063
1524
|
var contents, data, _a, _b;
|
|
1064
1525
|
return __generator(this, function (_c) {
|
|
1065
1526
|
switch (_c.label) {
|
|
1066
1527
|
case 0:
|
|
1067
1528
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1068
|
-
return [2,
|
|
1529
|
+
return [2, deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context)];
|
|
1069
1530
|
}
|
|
1070
1531
|
contents = {
|
|
1071
1532
|
$metadata: deserializeMetadata(output),
|
|
1072
|
-
|
|
1533
|
+
InstanceTypes: undefined,
|
|
1534
|
+
NextToken: undefined,
|
|
1535
|
+
OutpostArn: undefined,
|
|
1536
|
+
OutpostId: undefined,
|
|
1073
1537
|
};
|
|
1074
1538
|
_a = __expectNonNull;
|
|
1075
1539
|
_b = __expectObject;
|
|
1076
1540
|
return [4, parseBody(output.body, context)];
|
|
1077
1541
|
case 1:
|
|
1078
1542
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1079
|
-
if (data.
|
|
1080
|
-
contents.
|
|
1543
|
+
if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
|
|
1544
|
+
contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
|
|
1545
|
+
}
|
|
1546
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1547
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1548
|
+
}
|
|
1549
|
+
if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
|
|
1550
|
+
contents.OutpostArn = __expectString(data.OutpostArn);
|
|
1551
|
+
}
|
|
1552
|
+
if (data.OutpostId !== undefined && data.OutpostId !== null) {
|
|
1553
|
+
contents.OutpostId = __expectString(data.OutpostId);
|
|
1081
1554
|
}
|
|
1082
1555
|
return [2, Promise.resolve(contents)];
|
|
1083
1556
|
}
|
|
1084
1557
|
});
|
|
1085
1558
|
}); };
|
|
1086
|
-
var
|
|
1087
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1088
|
-
var
|
|
1089
|
-
return __generator(this, function (
|
|
1090
|
-
switch (
|
|
1559
|
+
var deserializeAws_restJson1GetOutpostInstanceTypesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1560
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1561
|
+
var _g;
|
|
1562
|
+
return __generator(this, function (_h) {
|
|
1563
|
+
switch (_h.label) {
|
|
1091
1564
|
case 0:
|
|
1092
1565
|
_a = [__assign({}, output)];
|
|
1093
|
-
|
|
1566
|
+
_g = {};
|
|
1567
|
+
return [4, parseBody(output.body, context)];
|
|
1568
|
+
case 1:
|
|
1569
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1570
|
+
errorCode = "UnknownError";
|
|
1571
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1572
|
+
_b = errorCode;
|
|
1573
|
+
switch (_b) {
|
|
1574
|
+
case "AccessDeniedException": return [3, 2];
|
|
1575
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
1576
|
+
case "InternalServerException": return [3, 4];
|
|
1577
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
1578
|
+
case "NotFoundException": return [3, 6];
|
|
1579
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
1580
|
+
case "ValidationException": return [3, 8];
|
|
1581
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1582
|
+
}
|
|
1583
|
+
return [3, 10];
|
|
1584
|
+
case 2:
|
|
1585
|
+
_c = [{}];
|
|
1586
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1587
|
+
case 3:
|
|
1588
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1589
|
+
return [3, 11];
|
|
1590
|
+
case 4:
|
|
1591
|
+
_d = [{}];
|
|
1592
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1593
|
+
case 5:
|
|
1594
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1595
|
+
return [3, 11];
|
|
1596
|
+
case 6:
|
|
1597
|
+
_e = [{}];
|
|
1598
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1599
|
+
case 7:
|
|
1600
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1601
|
+
return [3, 11];
|
|
1602
|
+
case 8:
|
|
1603
|
+
_f = [{}];
|
|
1604
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1605
|
+
case 9:
|
|
1606
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1607
|
+
return [3, 11];
|
|
1608
|
+
case 10:
|
|
1609
|
+
parsedBody = parsedOutput.body;
|
|
1610
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1611
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1612
|
+
_h.label = 11;
|
|
1613
|
+
case 11:
|
|
1614
|
+
message = response.message || response.Message || errorCode;
|
|
1615
|
+
response.message = message;
|
|
1616
|
+
delete response.Message;
|
|
1617
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
}); };
|
|
1621
|
+
export var deserializeAws_restJson1GetSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1622
|
+
var contents, data, _a, _b;
|
|
1623
|
+
return __generator(this, function (_c) {
|
|
1624
|
+
switch (_c.label) {
|
|
1625
|
+
case 0:
|
|
1626
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1627
|
+
return [2, deserializeAws_restJson1GetSiteCommandError(output, context)];
|
|
1628
|
+
}
|
|
1629
|
+
contents = {
|
|
1630
|
+
$metadata: deserializeMetadata(output),
|
|
1631
|
+
Site: undefined,
|
|
1632
|
+
};
|
|
1633
|
+
_a = __expectNonNull;
|
|
1634
|
+
_b = __expectObject;
|
|
1635
|
+
return [4, parseBody(output.body, context)];
|
|
1636
|
+
case 1:
|
|
1637
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1638
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
1639
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
1640
|
+
}
|
|
1641
|
+
return [2, Promise.resolve(contents)];
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
}); };
|
|
1645
|
+
var deserializeAws_restJson1GetSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1646
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1647
|
+
var _g;
|
|
1648
|
+
return __generator(this, function (_h) {
|
|
1649
|
+
switch (_h.label) {
|
|
1650
|
+
case 0:
|
|
1651
|
+
_a = [__assign({}, output)];
|
|
1652
|
+
_g = {};
|
|
1653
|
+
return [4, parseBody(output.body, context)];
|
|
1654
|
+
case 1:
|
|
1655
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1656
|
+
errorCode = "UnknownError";
|
|
1657
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1658
|
+
_b = errorCode;
|
|
1659
|
+
switch (_b) {
|
|
1660
|
+
case "AccessDeniedException": return [3, 2];
|
|
1661
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
1662
|
+
case "InternalServerException": return [3, 4];
|
|
1663
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
1664
|
+
case "NotFoundException": return [3, 6];
|
|
1665
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
1666
|
+
case "ValidationException": return [3, 8];
|
|
1667
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1668
|
+
}
|
|
1669
|
+
return [3, 10];
|
|
1670
|
+
case 2:
|
|
1671
|
+
_c = [{}];
|
|
1672
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1673
|
+
case 3:
|
|
1674
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1675
|
+
return [3, 11];
|
|
1676
|
+
case 4:
|
|
1677
|
+
_d = [{}];
|
|
1678
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1679
|
+
case 5:
|
|
1680
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1681
|
+
return [3, 11];
|
|
1682
|
+
case 6:
|
|
1683
|
+
_e = [{}];
|
|
1684
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1685
|
+
case 7:
|
|
1686
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1687
|
+
return [3, 11];
|
|
1688
|
+
case 8:
|
|
1689
|
+
_f = [{}];
|
|
1690
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1691
|
+
case 9:
|
|
1692
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1693
|
+
return [3, 11];
|
|
1694
|
+
case 10:
|
|
1695
|
+
parsedBody = parsedOutput.body;
|
|
1696
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1697
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1698
|
+
_h.label = 11;
|
|
1699
|
+
case 11:
|
|
1700
|
+
message = response.message || response.Message || errorCode;
|
|
1701
|
+
response.message = message;
|
|
1702
|
+
delete response.Message;
|
|
1703
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
}); };
|
|
1707
|
+
export var deserializeAws_restJson1GetSiteAddressCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1708
|
+
var contents, data, _a, _b;
|
|
1709
|
+
return __generator(this, function (_c) {
|
|
1710
|
+
switch (_c.label) {
|
|
1711
|
+
case 0:
|
|
1712
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1713
|
+
return [2, deserializeAws_restJson1GetSiteAddressCommandError(output, context)];
|
|
1714
|
+
}
|
|
1715
|
+
contents = {
|
|
1716
|
+
$metadata: deserializeMetadata(output),
|
|
1717
|
+
Address: undefined,
|
|
1718
|
+
AddressType: undefined,
|
|
1719
|
+
SiteId: undefined,
|
|
1720
|
+
};
|
|
1721
|
+
_a = __expectNonNull;
|
|
1722
|
+
_b = __expectObject;
|
|
1723
|
+
return [4, parseBody(output.body, context)];
|
|
1724
|
+
case 1:
|
|
1725
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1726
|
+
if (data.Address !== undefined && data.Address !== null) {
|
|
1727
|
+
contents.Address = deserializeAws_restJson1Address(data.Address, context);
|
|
1728
|
+
}
|
|
1729
|
+
if (data.AddressType !== undefined && data.AddressType !== null) {
|
|
1730
|
+
contents.AddressType = __expectString(data.AddressType);
|
|
1731
|
+
}
|
|
1732
|
+
if (data.SiteId !== undefined && data.SiteId !== null) {
|
|
1733
|
+
contents.SiteId = __expectString(data.SiteId);
|
|
1734
|
+
}
|
|
1735
|
+
return [2, Promise.resolve(contents)];
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
}); };
|
|
1739
|
+
var deserializeAws_restJson1GetSiteAddressCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1740
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1741
|
+
var _g;
|
|
1742
|
+
return __generator(this, function (_h) {
|
|
1743
|
+
switch (_h.label) {
|
|
1744
|
+
case 0:
|
|
1745
|
+
_a = [__assign({}, output)];
|
|
1746
|
+
_g = {};
|
|
1747
|
+
return [4, parseBody(output.body, context)];
|
|
1748
|
+
case 1:
|
|
1749
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1750
|
+
errorCode = "UnknownError";
|
|
1751
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1752
|
+
_b = errorCode;
|
|
1753
|
+
switch (_b) {
|
|
1754
|
+
case "AccessDeniedException": return [3, 2];
|
|
1755
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
1756
|
+
case "InternalServerException": return [3, 4];
|
|
1757
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
1758
|
+
case "NotFoundException": return [3, 6];
|
|
1759
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
1760
|
+
case "ValidationException": return [3, 8];
|
|
1761
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1762
|
+
}
|
|
1763
|
+
return [3, 10];
|
|
1764
|
+
case 2:
|
|
1765
|
+
_c = [{}];
|
|
1766
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1767
|
+
case 3:
|
|
1768
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1769
|
+
return [3, 11];
|
|
1770
|
+
case 4:
|
|
1771
|
+
_d = [{}];
|
|
1772
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1773
|
+
case 5:
|
|
1774
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1775
|
+
return [3, 11];
|
|
1776
|
+
case 6:
|
|
1777
|
+
_e = [{}];
|
|
1778
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1779
|
+
case 7:
|
|
1780
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1781
|
+
return [3, 11];
|
|
1782
|
+
case 8:
|
|
1783
|
+
_f = [{}];
|
|
1784
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1785
|
+
case 9:
|
|
1786
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1787
|
+
return [3, 11];
|
|
1788
|
+
case 10:
|
|
1789
|
+
parsedBody = parsedOutput.body;
|
|
1790
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1791
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1792
|
+
_h.label = 11;
|
|
1793
|
+
case 11:
|
|
1794
|
+
message = response.message || response.Message || errorCode;
|
|
1795
|
+
response.message = message;
|
|
1796
|
+
delete response.Message;
|
|
1797
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1798
|
+
}
|
|
1799
|
+
});
|
|
1800
|
+
}); };
|
|
1801
|
+
export var deserializeAws_restJson1ListCatalogItemsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1802
|
+
var contents, data, _a, _b;
|
|
1803
|
+
return __generator(this, function (_c) {
|
|
1804
|
+
switch (_c.label) {
|
|
1805
|
+
case 0:
|
|
1806
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1807
|
+
return [2, deserializeAws_restJson1ListCatalogItemsCommandError(output, context)];
|
|
1808
|
+
}
|
|
1809
|
+
contents = {
|
|
1810
|
+
$metadata: deserializeMetadata(output),
|
|
1811
|
+
CatalogItems: undefined,
|
|
1812
|
+
NextToken: undefined,
|
|
1813
|
+
};
|
|
1814
|
+
_a = __expectNonNull;
|
|
1815
|
+
_b = __expectObject;
|
|
1816
|
+
return [4, parseBody(output.body, context)];
|
|
1817
|
+
case 1:
|
|
1818
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1819
|
+
if (data.CatalogItems !== undefined && data.CatalogItems !== null) {
|
|
1820
|
+
contents.CatalogItems = deserializeAws_restJson1CatalogItemListDefinition(data.CatalogItems, context);
|
|
1821
|
+
}
|
|
1822
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1823
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1824
|
+
}
|
|
1825
|
+
return [2, Promise.resolve(contents)];
|
|
1826
|
+
}
|
|
1827
|
+
});
|
|
1828
|
+
}); };
|
|
1829
|
+
var deserializeAws_restJson1ListCatalogItemsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1830
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1831
|
+
var _f;
|
|
1832
|
+
return __generator(this, function (_g) {
|
|
1833
|
+
switch (_g.label) {
|
|
1834
|
+
case 0:
|
|
1835
|
+
_a = [__assign({}, output)];
|
|
1836
|
+
_f = {};
|
|
1837
|
+
return [4, parseBody(output.body, context)];
|
|
1838
|
+
case 1:
|
|
1839
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
1840
|
+
errorCode = "UnknownError";
|
|
1841
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1842
|
+
_b = errorCode;
|
|
1843
|
+
switch (_b) {
|
|
1844
|
+
case "InternalServerException": return [3, 2];
|
|
1845
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
1846
|
+
case "NotFoundException": return [3, 4];
|
|
1847
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
1848
|
+
case "ValidationException": return [3, 6];
|
|
1849
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
1850
|
+
}
|
|
1851
|
+
return [3, 8];
|
|
1852
|
+
case 2:
|
|
1853
|
+
_c = [{}];
|
|
1854
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1855
|
+
case 3:
|
|
1856
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1857
|
+
return [3, 9];
|
|
1858
|
+
case 4:
|
|
1859
|
+
_d = [{}];
|
|
1860
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1861
|
+
case 5:
|
|
1862
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1863
|
+
return [3, 9];
|
|
1864
|
+
case 6:
|
|
1865
|
+
_e = [{}];
|
|
1866
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1867
|
+
case 7:
|
|
1868
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1869
|
+
return [3, 9];
|
|
1870
|
+
case 8:
|
|
1871
|
+
parsedBody = parsedOutput.body;
|
|
1872
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1873
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1874
|
+
_g.label = 9;
|
|
1875
|
+
case 9:
|
|
1876
|
+
message = response.message || response.Message || errorCode;
|
|
1877
|
+
response.message = message;
|
|
1878
|
+
delete response.Message;
|
|
1879
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1880
|
+
}
|
|
1881
|
+
});
|
|
1882
|
+
}); };
|
|
1883
|
+
export var deserializeAws_restJson1ListOrdersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1884
|
+
var contents, data, _a, _b;
|
|
1885
|
+
return __generator(this, function (_c) {
|
|
1886
|
+
switch (_c.label) {
|
|
1887
|
+
case 0:
|
|
1888
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1889
|
+
return [2, deserializeAws_restJson1ListOrdersCommandError(output, context)];
|
|
1890
|
+
}
|
|
1891
|
+
contents = {
|
|
1892
|
+
$metadata: deserializeMetadata(output),
|
|
1893
|
+
NextToken: undefined,
|
|
1894
|
+
Orders: undefined,
|
|
1895
|
+
};
|
|
1896
|
+
_a = __expectNonNull;
|
|
1897
|
+
_b = __expectObject;
|
|
1898
|
+
return [4, parseBody(output.body, context)];
|
|
1899
|
+
case 1:
|
|
1900
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1901
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1902
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1903
|
+
}
|
|
1904
|
+
if (data.Orders !== undefined && data.Orders !== null) {
|
|
1905
|
+
contents.Orders = deserializeAws_restJson1OrderSummaryListDefinition(data.Orders, context);
|
|
1906
|
+
}
|
|
1907
|
+
return [2, Promise.resolve(contents)];
|
|
1908
|
+
}
|
|
1909
|
+
});
|
|
1910
|
+
}); };
|
|
1911
|
+
var deserializeAws_restJson1ListOrdersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1912
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1913
|
+
var _g;
|
|
1914
|
+
return __generator(this, function (_h) {
|
|
1915
|
+
switch (_h.label) {
|
|
1916
|
+
case 0:
|
|
1917
|
+
_a = [__assign({}, output)];
|
|
1918
|
+
_g = {};
|
|
1919
|
+
return [4, parseBody(output.body, context)];
|
|
1920
|
+
case 1:
|
|
1921
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1922
|
+
errorCode = "UnknownError";
|
|
1923
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1924
|
+
_b = errorCode;
|
|
1925
|
+
switch (_b) {
|
|
1926
|
+
case "AccessDeniedException": return [3, 2];
|
|
1927
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
1928
|
+
case "InternalServerException": return [3, 4];
|
|
1929
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
1930
|
+
case "NotFoundException": return [3, 6];
|
|
1931
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 6];
|
|
1932
|
+
case "ValidationException": return [3, 8];
|
|
1933
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 8];
|
|
1934
|
+
}
|
|
1935
|
+
return [3, 10];
|
|
1936
|
+
case 2:
|
|
1937
|
+
_c = [{}];
|
|
1938
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1939
|
+
case 3:
|
|
1940
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1941
|
+
return [3, 11];
|
|
1942
|
+
case 4:
|
|
1943
|
+
_d = [{}];
|
|
1944
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1945
|
+
case 5:
|
|
1946
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1947
|
+
return [3, 11];
|
|
1948
|
+
case 6:
|
|
1949
|
+
_e = [{}];
|
|
1950
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
1951
|
+
case 7:
|
|
1952
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1953
|
+
return [3, 11];
|
|
1954
|
+
case 8:
|
|
1955
|
+
_f = [{}];
|
|
1956
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1957
|
+
case 9:
|
|
1958
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1959
|
+
return [3, 11];
|
|
1960
|
+
case 10:
|
|
1961
|
+
parsedBody = parsedOutput.body;
|
|
1962
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1963
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1964
|
+
_h.label = 11;
|
|
1965
|
+
case 11:
|
|
1966
|
+
message = response.message || response.Message || errorCode;
|
|
1967
|
+
response.message = message;
|
|
1968
|
+
delete response.Message;
|
|
1969
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1970
|
+
}
|
|
1971
|
+
});
|
|
1972
|
+
}); };
|
|
1973
|
+
export var deserializeAws_restJson1ListOutpostsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1974
|
+
var contents, data, _a, _b;
|
|
1975
|
+
return __generator(this, function (_c) {
|
|
1976
|
+
switch (_c.label) {
|
|
1977
|
+
case 0:
|
|
1978
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1979
|
+
return [2, deserializeAws_restJson1ListOutpostsCommandError(output, context)];
|
|
1980
|
+
}
|
|
1981
|
+
contents = {
|
|
1982
|
+
$metadata: deserializeMetadata(output),
|
|
1983
|
+
NextToken: undefined,
|
|
1984
|
+
Outposts: undefined,
|
|
1985
|
+
};
|
|
1986
|
+
_a = __expectNonNull;
|
|
1987
|
+
_b = __expectObject;
|
|
1988
|
+
return [4, parseBody(output.body, context)];
|
|
1989
|
+
case 1:
|
|
1990
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1991
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1992
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
1993
|
+
}
|
|
1994
|
+
if (data.Outposts !== undefined && data.Outposts !== null) {
|
|
1995
|
+
contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
|
|
1996
|
+
}
|
|
1997
|
+
return [2, Promise.resolve(contents)];
|
|
1998
|
+
}
|
|
1999
|
+
});
|
|
2000
|
+
}); };
|
|
2001
|
+
var deserializeAws_restJson1ListOutpostsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2002
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
2003
|
+
var _f;
|
|
2004
|
+
return __generator(this, function (_g) {
|
|
2005
|
+
switch (_g.label) {
|
|
2006
|
+
case 0:
|
|
2007
|
+
_a = [__assign({}, output)];
|
|
2008
|
+
_f = {};
|
|
2009
|
+
return [4, parseBody(output.body, context)];
|
|
2010
|
+
case 1:
|
|
2011
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
2012
|
+
errorCode = "UnknownError";
|
|
2013
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2014
|
+
_b = errorCode;
|
|
2015
|
+
switch (_b) {
|
|
2016
|
+
case "AccessDeniedException": return [3, 2];
|
|
2017
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2018
|
+
case "InternalServerException": return [3, 4];
|
|
2019
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
2020
|
+
case "ValidationException": return [3, 6];
|
|
2021
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
2022
|
+
}
|
|
2023
|
+
return [3, 8];
|
|
2024
|
+
case 2:
|
|
2025
|
+
_c = [{}];
|
|
2026
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2027
|
+
case 3:
|
|
2028
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2029
|
+
return [3, 9];
|
|
2030
|
+
case 4:
|
|
2031
|
+
_d = [{}];
|
|
2032
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2033
|
+
case 5:
|
|
2034
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2035
|
+
return [3, 9];
|
|
2036
|
+
case 6:
|
|
2037
|
+
_e = [{}];
|
|
2038
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2039
|
+
case 7:
|
|
2040
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2041
|
+
return [3, 9];
|
|
2042
|
+
case 8:
|
|
2043
|
+
parsedBody = parsedOutput.body;
|
|
2044
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2045
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2046
|
+
_g.label = 9;
|
|
2047
|
+
case 9:
|
|
2048
|
+
message = response.message || response.Message || errorCode;
|
|
2049
|
+
response.message = message;
|
|
2050
|
+
delete response.Message;
|
|
2051
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2052
|
+
}
|
|
2053
|
+
});
|
|
2054
|
+
}); };
|
|
2055
|
+
export var deserializeAws_restJson1ListSitesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2056
|
+
var contents, data, _a, _b;
|
|
2057
|
+
return __generator(this, function (_c) {
|
|
2058
|
+
switch (_c.label) {
|
|
2059
|
+
case 0:
|
|
2060
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2061
|
+
return [2, deserializeAws_restJson1ListSitesCommandError(output, context)];
|
|
2062
|
+
}
|
|
2063
|
+
contents = {
|
|
2064
|
+
$metadata: deserializeMetadata(output),
|
|
2065
|
+
NextToken: undefined,
|
|
2066
|
+
Sites: undefined,
|
|
2067
|
+
};
|
|
2068
|
+
_a = __expectNonNull;
|
|
2069
|
+
_b = __expectObject;
|
|
2070
|
+
return [4, parseBody(output.body, context)];
|
|
2071
|
+
case 1:
|
|
2072
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2073
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2074
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
2075
|
+
}
|
|
2076
|
+
if (data.Sites !== undefined && data.Sites !== null) {
|
|
2077
|
+
contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
|
|
2078
|
+
}
|
|
2079
|
+
return [2, Promise.resolve(contents)];
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
}); };
|
|
2083
|
+
var deserializeAws_restJson1ListSitesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2084
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
2085
|
+
var _f;
|
|
2086
|
+
return __generator(this, function (_g) {
|
|
2087
|
+
switch (_g.label) {
|
|
2088
|
+
case 0:
|
|
2089
|
+
_a = [__assign({}, output)];
|
|
2090
|
+
_f = {};
|
|
2091
|
+
return [4, parseBody(output.body, context)];
|
|
2092
|
+
case 1:
|
|
2093
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
2094
|
+
errorCode = "UnknownError";
|
|
2095
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2096
|
+
_b = errorCode;
|
|
2097
|
+
switch (_b) {
|
|
2098
|
+
case "AccessDeniedException": return [3, 2];
|
|
2099
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2100
|
+
case "InternalServerException": return [3, 4];
|
|
2101
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 4];
|
|
2102
|
+
case "ValidationException": return [3, 6];
|
|
2103
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
2104
|
+
}
|
|
2105
|
+
return [3, 8];
|
|
2106
|
+
case 2:
|
|
2107
|
+
_c = [{}];
|
|
2108
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2109
|
+
case 3:
|
|
2110
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2111
|
+
return [3, 9];
|
|
2112
|
+
case 4:
|
|
2113
|
+
_d = [{}];
|
|
2114
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2115
|
+
case 5:
|
|
2116
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2117
|
+
return [3, 9];
|
|
2118
|
+
case 6:
|
|
2119
|
+
_e = [{}];
|
|
2120
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2121
|
+
case 7:
|
|
2122
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2123
|
+
return [3, 9];
|
|
2124
|
+
case 8:
|
|
2125
|
+
parsedBody = parsedOutput.body;
|
|
2126
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2127
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2128
|
+
_g.label = 9;
|
|
2129
|
+
case 9:
|
|
2130
|
+
message = response.message || response.Message || errorCode;
|
|
2131
|
+
response.message = message;
|
|
2132
|
+
delete response.Message;
|
|
2133
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2134
|
+
}
|
|
2135
|
+
});
|
|
2136
|
+
}); };
|
|
2137
|
+
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2138
|
+
var contents, data, _a, _b;
|
|
2139
|
+
return __generator(this, function (_c) {
|
|
2140
|
+
switch (_c.label) {
|
|
2141
|
+
case 0:
|
|
2142
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2143
|
+
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
2144
|
+
}
|
|
2145
|
+
contents = {
|
|
2146
|
+
$metadata: deserializeMetadata(output),
|
|
2147
|
+
Tags: undefined,
|
|
2148
|
+
};
|
|
2149
|
+
_a = __expectNonNull;
|
|
2150
|
+
_b = __expectObject;
|
|
2151
|
+
return [4, parseBody(output.body, context)];
|
|
2152
|
+
case 1:
|
|
2153
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2154
|
+
if (data.Tags !== undefined && data.Tags !== null) {
|
|
2155
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
2156
|
+
}
|
|
2157
|
+
return [2, Promise.resolve(contents)];
|
|
2158
|
+
}
|
|
2159
|
+
});
|
|
2160
|
+
}); };
|
|
2161
|
+
var deserializeAws_restJson1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2162
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
2163
|
+
var _f;
|
|
2164
|
+
return __generator(this, function (_g) {
|
|
2165
|
+
switch (_g.label) {
|
|
2166
|
+
case 0:
|
|
2167
|
+
_a = [__assign({}, output)];
|
|
2168
|
+
_f = {};
|
|
2169
|
+
return [4, parseBody(output.body, context)];
|
|
2170
|
+
case 1:
|
|
2171
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
2172
|
+
errorCode = "UnknownError";
|
|
2173
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2174
|
+
_b = errorCode;
|
|
2175
|
+
switch (_b) {
|
|
2176
|
+
case "InternalServerException": return [3, 2];
|
|
2177
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
2178
|
+
case "NotFoundException": return [3, 4];
|
|
2179
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
2180
|
+
case "ValidationException": return [3, 6];
|
|
2181
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
2182
|
+
}
|
|
2183
|
+
return [3, 8];
|
|
2184
|
+
case 2:
|
|
2185
|
+
_c = [{}];
|
|
2186
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2187
|
+
case 3:
|
|
2188
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2189
|
+
return [3, 9];
|
|
2190
|
+
case 4:
|
|
2191
|
+
_d = [{}];
|
|
2192
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2193
|
+
case 5:
|
|
2194
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2195
|
+
return [3, 9];
|
|
2196
|
+
case 6:
|
|
2197
|
+
_e = [{}];
|
|
2198
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2199
|
+
case 7:
|
|
2200
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2201
|
+
return [3, 9];
|
|
2202
|
+
case 8:
|
|
2203
|
+
parsedBody = parsedOutput.body;
|
|
2204
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2205
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2206
|
+
_g.label = 9;
|
|
2207
|
+
case 9:
|
|
2208
|
+
message = response.message || response.Message || errorCode;
|
|
2209
|
+
response.message = message;
|
|
2210
|
+
delete response.Message;
|
|
2211
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2212
|
+
}
|
|
2213
|
+
});
|
|
2214
|
+
}); };
|
|
2215
|
+
export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2216
|
+
var contents;
|
|
2217
|
+
return __generator(this, function (_a) {
|
|
2218
|
+
switch (_a.label) {
|
|
2219
|
+
case 0:
|
|
2220
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2221
|
+
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
2222
|
+
}
|
|
2223
|
+
contents = {
|
|
2224
|
+
$metadata: deserializeMetadata(output),
|
|
2225
|
+
};
|
|
2226
|
+
return [4, collectBody(output.body, context)];
|
|
2227
|
+
case 1:
|
|
2228
|
+
_a.sent();
|
|
2229
|
+
return [2, Promise.resolve(contents)];
|
|
2230
|
+
}
|
|
2231
|
+
});
|
|
2232
|
+
}); };
|
|
2233
|
+
var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2234
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
2235
|
+
var _f;
|
|
2236
|
+
return __generator(this, function (_g) {
|
|
2237
|
+
switch (_g.label) {
|
|
2238
|
+
case 0:
|
|
2239
|
+
_a = [__assign({}, output)];
|
|
2240
|
+
_f = {};
|
|
2241
|
+
return [4, parseBody(output.body, context)];
|
|
2242
|
+
case 1:
|
|
2243
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
2244
|
+
errorCode = "UnknownError";
|
|
2245
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2246
|
+
_b = errorCode;
|
|
2247
|
+
switch (_b) {
|
|
2248
|
+
case "InternalServerException": return [3, 2];
|
|
2249
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 2];
|
|
2250
|
+
case "NotFoundException": return [3, 4];
|
|
2251
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 4];
|
|
2252
|
+
case "ValidationException": return [3, 6];
|
|
2253
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 6];
|
|
2254
|
+
}
|
|
2255
|
+
return [3, 8];
|
|
2256
|
+
case 2:
|
|
2257
|
+
_c = [{}];
|
|
2258
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2259
|
+
case 3:
|
|
2260
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2261
|
+
return [3, 9];
|
|
2262
|
+
case 4:
|
|
2263
|
+
_d = [{}];
|
|
2264
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2265
|
+
case 5:
|
|
2266
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2267
|
+
return [3, 9];
|
|
2268
|
+
case 6:
|
|
2269
|
+
_e = [{}];
|
|
2270
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2271
|
+
case 7:
|
|
2272
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2273
|
+
return [3, 9];
|
|
2274
|
+
case 8:
|
|
2275
|
+
parsedBody = parsedOutput.body;
|
|
2276
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2277
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2278
|
+
_g.label = 9;
|
|
2279
|
+
case 9:
|
|
2280
|
+
message = response.message || response.Message || errorCode;
|
|
2281
|
+
response.message = message;
|
|
2282
|
+
delete response.Message;
|
|
2283
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2284
|
+
}
|
|
2285
|
+
});
|
|
2286
|
+
}); };
|
|
2287
|
+
export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2288
|
+
var contents;
|
|
2289
|
+
return __generator(this, function (_a) {
|
|
2290
|
+
switch (_a.label) {
|
|
2291
|
+
case 0:
|
|
2292
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2293
|
+
return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
|
|
2294
|
+
}
|
|
2295
|
+
contents = {
|
|
2296
|
+
$metadata: deserializeMetadata(output),
|
|
2297
|
+
};
|
|
2298
|
+
return [4, collectBody(output.body, context)];
|
|
2299
|
+
case 1:
|
|
2300
|
+
_a.sent();
|
|
2301
|
+
return [2, Promise.resolve(contents)];
|
|
2302
|
+
}
|
|
2303
|
+
});
|
|
2304
|
+
}); };
|
|
2305
|
+
var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2306
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
2307
|
+
var _f;
|
|
2308
|
+
return __generator(this, function (_g) {
|
|
2309
|
+
switch (_g.label) {
|
|
2310
|
+
case 0:
|
|
2311
|
+
_a = [__assign({}, output)];
|
|
2312
|
+
_f = {};
|
|
1094
2313
|
return [4, parseBody(output.body, context)];
|
|
1095
2314
|
case 1:
|
|
1096
2315
|
parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
|
|
@@ -1121,15 +2340,203 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1121
2340
|
case 6:
|
|
1122
2341
|
_e = [{}];
|
|
1123
2342
|
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1124
|
-
case 7:
|
|
1125
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1126
|
-
return [3, 9];
|
|
1127
|
-
case 8:
|
|
2343
|
+
case 7:
|
|
2344
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2345
|
+
return [3, 9];
|
|
2346
|
+
case 8:
|
|
2347
|
+
parsedBody = parsedOutput.body;
|
|
2348
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2349
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2350
|
+
_g.label = 9;
|
|
2351
|
+
case 9:
|
|
2352
|
+
message = response.message || response.Message || errorCode;
|
|
2353
|
+
response.message = message;
|
|
2354
|
+
delete response.Message;
|
|
2355
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2356
|
+
}
|
|
2357
|
+
});
|
|
2358
|
+
}); };
|
|
2359
|
+
export var deserializeAws_restJson1UpdateOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2360
|
+
var contents, data, _a, _b;
|
|
2361
|
+
return __generator(this, function (_c) {
|
|
2362
|
+
switch (_c.label) {
|
|
2363
|
+
case 0:
|
|
2364
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2365
|
+
return [2, deserializeAws_restJson1UpdateOutpostCommandError(output, context)];
|
|
2366
|
+
}
|
|
2367
|
+
contents = {
|
|
2368
|
+
$metadata: deserializeMetadata(output),
|
|
2369
|
+
Outpost: undefined,
|
|
2370
|
+
};
|
|
2371
|
+
_a = __expectNonNull;
|
|
2372
|
+
_b = __expectObject;
|
|
2373
|
+
return [4, parseBody(output.body, context)];
|
|
2374
|
+
case 1:
|
|
2375
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2376
|
+
if (data.Outpost !== undefined && data.Outpost !== null) {
|
|
2377
|
+
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
2378
|
+
}
|
|
2379
|
+
return [2, Promise.resolve(contents)];
|
|
2380
|
+
}
|
|
2381
|
+
});
|
|
2382
|
+
}); };
|
|
2383
|
+
var deserializeAws_restJson1UpdateOutpostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2384
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2385
|
+
var _h;
|
|
2386
|
+
return __generator(this, function (_j) {
|
|
2387
|
+
switch (_j.label) {
|
|
2388
|
+
case 0:
|
|
2389
|
+
_a = [__assign({}, output)];
|
|
2390
|
+
_h = {};
|
|
2391
|
+
return [4, parseBody(output.body, context)];
|
|
2392
|
+
case 1:
|
|
2393
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2394
|
+
errorCode = "UnknownError";
|
|
2395
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2396
|
+
_b = errorCode;
|
|
2397
|
+
switch (_b) {
|
|
2398
|
+
case "AccessDeniedException": return [3, 2];
|
|
2399
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2400
|
+
case "ConflictException": return [3, 4];
|
|
2401
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
2402
|
+
case "InternalServerException": return [3, 6];
|
|
2403
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
2404
|
+
case "NotFoundException": return [3, 8];
|
|
2405
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
2406
|
+
case "ValidationException": return [3, 10];
|
|
2407
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
2408
|
+
}
|
|
2409
|
+
return [3, 12];
|
|
2410
|
+
case 2:
|
|
2411
|
+
_c = [{}];
|
|
2412
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2413
|
+
case 3:
|
|
2414
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2415
|
+
return [3, 13];
|
|
2416
|
+
case 4:
|
|
2417
|
+
_d = [{}];
|
|
2418
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2419
|
+
case 5:
|
|
2420
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2421
|
+
return [3, 13];
|
|
2422
|
+
case 6:
|
|
2423
|
+
_e = [{}];
|
|
2424
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2425
|
+
case 7:
|
|
2426
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2427
|
+
return [3, 13];
|
|
2428
|
+
case 8:
|
|
2429
|
+
_f = [{}];
|
|
2430
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2431
|
+
case 9:
|
|
2432
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2433
|
+
return [3, 13];
|
|
2434
|
+
case 10:
|
|
2435
|
+
_g = [{}];
|
|
2436
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2437
|
+
case 11:
|
|
2438
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2439
|
+
return [3, 13];
|
|
2440
|
+
case 12:
|
|
2441
|
+
parsedBody = parsedOutput.body;
|
|
2442
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2443
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2444
|
+
_j.label = 13;
|
|
2445
|
+
case 13:
|
|
2446
|
+
message = response.message || response.Message || errorCode;
|
|
2447
|
+
response.message = message;
|
|
2448
|
+
delete response.Message;
|
|
2449
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2450
|
+
}
|
|
2451
|
+
});
|
|
2452
|
+
}); };
|
|
2453
|
+
export var deserializeAws_restJson1UpdateSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2454
|
+
var contents, data, _a, _b;
|
|
2455
|
+
return __generator(this, function (_c) {
|
|
2456
|
+
switch (_c.label) {
|
|
2457
|
+
case 0:
|
|
2458
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2459
|
+
return [2, deserializeAws_restJson1UpdateSiteCommandError(output, context)];
|
|
2460
|
+
}
|
|
2461
|
+
contents = {
|
|
2462
|
+
$metadata: deserializeMetadata(output),
|
|
2463
|
+
Site: undefined,
|
|
2464
|
+
};
|
|
2465
|
+
_a = __expectNonNull;
|
|
2466
|
+
_b = __expectObject;
|
|
2467
|
+
return [4, parseBody(output.body, context)];
|
|
2468
|
+
case 1:
|
|
2469
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2470
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
2471
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
2472
|
+
}
|
|
2473
|
+
return [2, Promise.resolve(contents)];
|
|
2474
|
+
}
|
|
2475
|
+
});
|
|
2476
|
+
}); };
|
|
2477
|
+
var deserializeAws_restJson1UpdateSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2478
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2479
|
+
var _h;
|
|
2480
|
+
return __generator(this, function (_j) {
|
|
2481
|
+
switch (_j.label) {
|
|
2482
|
+
case 0:
|
|
2483
|
+
_a = [__assign({}, output)];
|
|
2484
|
+
_h = {};
|
|
2485
|
+
return [4, parseBody(output.body, context)];
|
|
2486
|
+
case 1:
|
|
2487
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2488
|
+
errorCode = "UnknownError";
|
|
2489
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2490
|
+
_b = errorCode;
|
|
2491
|
+
switch (_b) {
|
|
2492
|
+
case "AccessDeniedException": return [3, 2];
|
|
2493
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2494
|
+
case "ConflictException": return [3, 4];
|
|
2495
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
2496
|
+
case "InternalServerException": return [3, 6];
|
|
2497
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
2498
|
+
case "NotFoundException": return [3, 8];
|
|
2499
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
2500
|
+
case "ValidationException": return [3, 10];
|
|
2501
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
2502
|
+
}
|
|
2503
|
+
return [3, 12];
|
|
2504
|
+
case 2:
|
|
2505
|
+
_c = [{}];
|
|
2506
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2507
|
+
case 3:
|
|
2508
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2509
|
+
return [3, 13];
|
|
2510
|
+
case 4:
|
|
2511
|
+
_d = [{}];
|
|
2512
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
2513
|
+
case 5:
|
|
2514
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2515
|
+
return [3, 13];
|
|
2516
|
+
case 6:
|
|
2517
|
+
_e = [{}];
|
|
2518
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2519
|
+
case 7:
|
|
2520
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2521
|
+
return [3, 13];
|
|
2522
|
+
case 8:
|
|
2523
|
+
_f = [{}];
|
|
2524
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2525
|
+
case 9:
|
|
2526
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2527
|
+
return [3, 13];
|
|
2528
|
+
case 10:
|
|
2529
|
+
_g = [{}];
|
|
2530
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2531
|
+
case 11:
|
|
2532
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2533
|
+
return [3, 13];
|
|
2534
|
+
case 12:
|
|
1128
2535
|
parsedBody = parsedOutput.body;
|
|
1129
2536
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1130
2537
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1131
|
-
|
|
1132
|
-
case
|
|
2538
|
+
_j.label = 13;
|
|
2539
|
+
case 13:
|
|
1133
2540
|
message = response.message || response.Message || errorCode;
|
|
1134
2541
|
response.message = message;
|
|
1135
2542
|
delete response.Message;
|
|
@@ -1137,71 +2544,97 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1137
2544
|
}
|
|
1138
2545
|
});
|
|
1139
2546
|
}); };
|
|
1140
|
-
export var
|
|
1141
|
-
var contents;
|
|
1142
|
-
return __generator(this, function (
|
|
1143
|
-
switch (
|
|
2547
|
+
export var deserializeAws_restJson1UpdateSiteAddressCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2548
|
+
var contents, data, _a, _b;
|
|
2549
|
+
return __generator(this, function (_c) {
|
|
2550
|
+
switch (_c.label) {
|
|
1144
2551
|
case 0:
|
|
1145
2552
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1146
|
-
return [2,
|
|
2553
|
+
return [2, deserializeAws_restJson1UpdateSiteAddressCommandError(output, context)];
|
|
1147
2554
|
}
|
|
1148
2555
|
contents = {
|
|
1149
2556
|
$metadata: deserializeMetadata(output),
|
|
2557
|
+
Address: undefined,
|
|
2558
|
+
AddressType: undefined,
|
|
1150
2559
|
};
|
|
1151
|
-
|
|
2560
|
+
_a = __expectNonNull;
|
|
2561
|
+
_b = __expectObject;
|
|
2562
|
+
return [4, parseBody(output.body, context)];
|
|
1152
2563
|
case 1:
|
|
1153
|
-
_a.sent();
|
|
2564
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2565
|
+
if (data.Address !== undefined && data.Address !== null) {
|
|
2566
|
+
contents.Address = deserializeAws_restJson1Address(data.Address, context);
|
|
2567
|
+
}
|
|
2568
|
+
if (data.AddressType !== undefined && data.AddressType !== null) {
|
|
2569
|
+
contents.AddressType = __expectString(data.AddressType);
|
|
2570
|
+
}
|
|
1154
2571
|
return [2, Promise.resolve(contents)];
|
|
1155
2572
|
}
|
|
1156
2573
|
});
|
|
1157
2574
|
}); };
|
|
1158
|
-
var
|
|
1159
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1160
|
-
var
|
|
1161
|
-
return __generator(this, function (
|
|
1162
|
-
switch (
|
|
2575
|
+
var deserializeAws_restJson1UpdateSiteAddressCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2576
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2577
|
+
var _h;
|
|
2578
|
+
return __generator(this, function (_j) {
|
|
2579
|
+
switch (_j.label) {
|
|
1163
2580
|
case 0:
|
|
1164
2581
|
_a = [__assign({}, output)];
|
|
1165
|
-
|
|
2582
|
+
_h = {};
|
|
1166
2583
|
return [4, parseBody(output.body, context)];
|
|
1167
2584
|
case 1:
|
|
1168
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
2585
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
1169
2586
|
errorCode = "UnknownError";
|
|
1170
2587
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1171
2588
|
_b = errorCode;
|
|
1172
2589
|
switch (_b) {
|
|
1173
|
-
case "
|
|
1174
|
-
case "com.amazonaws.outposts#
|
|
1175
|
-
case "
|
|
1176
|
-
case "com.amazonaws.outposts#
|
|
1177
|
-
case "
|
|
1178
|
-
case "com.amazonaws.outposts#
|
|
2590
|
+
case "AccessDeniedException": return [3, 2];
|
|
2591
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2592
|
+
case "ConflictException": return [3, 4];
|
|
2593
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
2594
|
+
case "InternalServerException": return [3, 6];
|
|
2595
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
2596
|
+
case "NotFoundException": return [3, 8];
|
|
2597
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
2598
|
+
case "ValidationException": return [3, 10];
|
|
2599
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
1179
2600
|
}
|
|
1180
|
-
return [3,
|
|
2601
|
+
return [3, 12];
|
|
1181
2602
|
case 2:
|
|
1182
2603
|
_c = [{}];
|
|
1183
|
-
return [4,
|
|
2604
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1184
2605
|
case 3:
|
|
1185
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
1186
|
-
return [3,
|
|
2606
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2607
|
+
return [3, 13];
|
|
1187
2608
|
case 4:
|
|
1188
2609
|
_d = [{}];
|
|
1189
|
-
return [4,
|
|
2610
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1190
2611
|
case 5:
|
|
1191
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
1192
|
-
return [3,
|
|
2612
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2613
|
+
return [3, 13];
|
|
1193
2614
|
case 6:
|
|
1194
2615
|
_e = [{}];
|
|
1195
|
-
return [4,
|
|
2616
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1196
2617
|
case 7:
|
|
1197
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
1198
|
-
return [3,
|
|
2618
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2619
|
+
return [3, 13];
|
|
1199
2620
|
case 8:
|
|
2621
|
+
_f = [{}];
|
|
2622
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2623
|
+
case 9:
|
|
2624
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2625
|
+
return [3, 13];
|
|
2626
|
+
case 10:
|
|
2627
|
+
_g = [{}];
|
|
2628
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2629
|
+
case 11:
|
|
2630
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2631
|
+
return [3, 13];
|
|
2632
|
+
case 12:
|
|
1200
2633
|
parsedBody = parsedOutput.body;
|
|
1201
2634
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1202
2635
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1203
|
-
|
|
1204
|
-
case
|
|
2636
|
+
_j.label = 13;
|
|
2637
|
+
case 13:
|
|
1205
2638
|
message = response.message || response.Message || errorCode;
|
|
1206
2639
|
response.message = message;
|
|
1207
2640
|
delete response.Message;
|
|
@@ -1209,71 +2642,93 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
1209
2642
|
}
|
|
1210
2643
|
});
|
|
1211
2644
|
}); };
|
|
1212
|
-
export var
|
|
1213
|
-
var contents;
|
|
1214
|
-
return __generator(this, function (
|
|
1215
|
-
switch (
|
|
2645
|
+
export var deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2646
|
+
var contents, data, _a, _b;
|
|
2647
|
+
return __generator(this, function (_c) {
|
|
2648
|
+
switch (_c.label) {
|
|
1216
2649
|
case 0:
|
|
1217
2650
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1218
|
-
return [2,
|
|
2651
|
+
return [2, deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError(output, context)];
|
|
1219
2652
|
}
|
|
1220
2653
|
contents = {
|
|
1221
2654
|
$metadata: deserializeMetadata(output),
|
|
2655
|
+
Site: undefined,
|
|
1222
2656
|
};
|
|
1223
|
-
|
|
2657
|
+
_a = __expectNonNull;
|
|
2658
|
+
_b = __expectObject;
|
|
2659
|
+
return [4, parseBody(output.body, context)];
|
|
1224
2660
|
case 1:
|
|
1225
|
-
_a.sent();
|
|
2661
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2662
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
2663
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
2664
|
+
}
|
|
1226
2665
|
return [2, Promise.resolve(contents)];
|
|
1227
2666
|
}
|
|
1228
2667
|
});
|
|
1229
2668
|
}); };
|
|
1230
|
-
var
|
|
1231
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1232
|
-
var
|
|
1233
|
-
return __generator(this, function (
|
|
1234
|
-
switch (
|
|
2669
|
+
var deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2670
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2671
|
+
var _h;
|
|
2672
|
+
return __generator(this, function (_j) {
|
|
2673
|
+
switch (_j.label) {
|
|
1235
2674
|
case 0:
|
|
1236
2675
|
_a = [__assign({}, output)];
|
|
1237
|
-
|
|
2676
|
+
_h = {};
|
|
1238
2677
|
return [4, parseBody(output.body, context)];
|
|
1239
2678
|
case 1:
|
|
1240
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
2679
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
1241
2680
|
errorCode = "UnknownError";
|
|
1242
2681
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1243
2682
|
_b = errorCode;
|
|
1244
2683
|
switch (_b) {
|
|
1245
|
-
case "
|
|
1246
|
-
case "com.amazonaws.outposts#
|
|
1247
|
-
case "
|
|
1248
|
-
case "com.amazonaws.outposts#
|
|
1249
|
-
case "
|
|
1250
|
-
case "com.amazonaws.outposts#
|
|
2684
|
+
case "AccessDeniedException": return [3, 2];
|
|
2685
|
+
case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
|
|
2686
|
+
case "ConflictException": return [3, 4];
|
|
2687
|
+
case "com.amazonaws.outposts#ConflictException": return [3, 4];
|
|
2688
|
+
case "InternalServerException": return [3, 6];
|
|
2689
|
+
case "com.amazonaws.outposts#InternalServerException": return [3, 6];
|
|
2690
|
+
case "NotFoundException": return [3, 8];
|
|
2691
|
+
case "com.amazonaws.outposts#NotFoundException": return [3, 8];
|
|
2692
|
+
case "ValidationException": return [3, 10];
|
|
2693
|
+
case "com.amazonaws.outposts#ValidationException": return [3, 10];
|
|
1251
2694
|
}
|
|
1252
|
-
return [3,
|
|
2695
|
+
return [3, 12];
|
|
1253
2696
|
case 2:
|
|
1254
2697
|
_c = [{}];
|
|
1255
|
-
return [4,
|
|
2698
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1256
2699
|
case 3:
|
|
1257
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
1258
|
-
return [3,
|
|
2700
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2701
|
+
return [3, 13];
|
|
1259
2702
|
case 4:
|
|
1260
2703
|
_d = [{}];
|
|
1261
|
-
return [4,
|
|
2704
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1262
2705
|
case 5:
|
|
1263
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
1264
|
-
return [3,
|
|
2706
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2707
|
+
return [3, 13];
|
|
1265
2708
|
case 6:
|
|
1266
2709
|
_e = [{}];
|
|
1267
|
-
return [4,
|
|
2710
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1268
2711
|
case 7:
|
|
1269
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
1270
|
-
return [3,
|
|
2712
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2713
|
+
return [3, 13];
|
|
1271
2714
|
case 8:
|
|
2715
|
+
_f = [{}];
|
|
2716
|
+
return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
2717
|
+
case 9:
|
|
2718
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2719
|
+
return [3, 13];
|
|
2720
|
+
case 10:
|
|
2721
|
+
_g = [{}];
|
|
2722
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2723
|
+
case 11:
|
|
2724
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2725
|
+
return [3, 13];
|
|
2726
|
+
case 12:
|
|
1272
2727
|
parsedBody = parsedOutput.body;
|
|
1273
2728
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1274
2729
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1275
|
-
|
|
1276
|
-
case
|
|
2730
|
+
_j.label = 13;
|
|
2731
|
+
case 13:
|
|
1277
2732
|
message = response.message || response.Message || errorCode;
|
|
1278
2733
|
response.message = message;
|
|
1279
2734
|
delete response.Message;
|
|
@@ -1385,6 +2840,11 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
|
|
|
1385
2840
|
return [2, contents];
|
|
1386
2841
|
});
|
|
1387
2842
|
}); };
|
|
2843
|
+
var serializeAws_restJson1Address = function (input, context) {
|
|
2844
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AddressLine1 !== undefined && input.AddressLine1 !== null && { AddressLine1: input.AddressLine1 })), (input.AddressLine2 !== undefined && input.AddressLine2 !== null && { AddressLine2: input.AddressLine2 })), (input.AddressLine3 !== undefined && input.AddressLine3 !== null && { AddressLine3: input.AddressLine3 })), (input.City !== undefined && input.City !== null && { City: input.City })), (input.ContactName !== undefined && input.ContactName !== null && { ContactName: input.ContactName })), (input.ContactPhoneNumber !== undefined &&
|
|
2845
|
+
input.ContactPhoneNumber !== null && { ContactPhoneNumber: input.ContactPhoneNumber })), (input.CountryCode !== undefined && input.CountryCode !== null && { CountryCode: input.CountryCode })), (input.DistrictOrCounty !== undefined &&
|
|
2846
|
+
input.DistrictOrCounty !== null && { DistrictOrCounty: input.DistrictOrCounty })), (input.Municipality !== undefined && input.Municipality !== null && { Municipality: input.Municipality })), (input.PostalCode !== undefined && input.PostalCode !== null && { PostalCode: input.PostalCode })), (input.StateOrRegion !== undefined && input.StateOrRegion !== null && { StateOrRegion: input.StateOrRegion }));
|
|
2847
|
+
};
|
|
1388
2848
|
var serializeAws_restJson1LineItemRequest = function (input, context) {
|
|
1389
2849
|
return __assign(__assign({}, (input.CatalogItemId !== undefined && input.CatalogItemId !== null && { CatalogItemId: input.CatalogItemId })), (input.Quantity !== undefined && input.Quantity !== null && { Quantity: input.Quantity }));
|
|
1390
2850
|
};
|
|
@@ -1398,6 +2858,13 @@ var serializeAws_restJson1LineItemRequestListDefinition = function (input, conte
|
|
|
1398
2858
|
return serializeAws_restJson1LineItemRequest(entry, context);
|
|
1399
2859
|
});
|
|
1400
2860
|
};
|
|
2861
|
+
var serializeAws_restJson1RackPhysicalProperties = function (input, context) {
|
|
2862
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.FiberOpticCableType !== undefined &&
|
|
2863
|
+
input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType })), (input.MaximumSupportedWeightLbs !== undefined &&
|
|
2864
|
+
input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs })), (input.OpticalStandard !== undefined &&
|
|
2865
|
+
input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard })), (input.PowerConnector !== undefined &&
|
|
2866
|
+
input.PowerConnector !== null && { PowerConnector: input.PowerConnector })), (input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva })), (input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop })), (input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase })), (input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount })), (input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps }));
|
|
2867
|
+
};
|
|
1401
2868
|
var serializeAws_restJson1TagMap = function (input, context) {
|
|
1402
2869
|
return Object.entries(input).reduce(function (acc, _a) {
|
|
1403
2870
|
var _b;
|
|
@@ -1408,6 +2875,65 @@ var serializeAws_restJson1TagMap = function (input, context) {
|
|
|
1408
2875
|
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
1409
2876
|
}, {});
|
|
1410
2877
|
};
|
|
2878
|
+
var deserializeAws_restJson1Address = function (output, context) {
|
|
2879
|
+
return {
|
|
2880
|
+
AddressLine1: __expectString(output.AddressLine1),
|
|
2881
|
+
AddressLine2: __expectString(output.AddressLine2),
|
|
2882
|
+
AddressLine3: __expectString(output.AddressLine3),
|
|
2883
|
+
City: __expectString(output.City),
|
|
2884
|
+
ContactName: __expectString(output.ContactName),
|
|
2885
|
+
ContactPhoneNumber: __expectString(output.ContactPhoneNumber),
|
|
2886
|
+
CountryCode: __expectString(output.CountryCode),
|
|
2887
|
+
DistrictOrCounty: __expectString(output.DistrictOrCounty),
|
|
2888
|
+
Municipality: __expectString(output.Municipality),
|
|
2889
|
+
PostalCode: __expectString(output.PostalCode),
|
|
2890
|
+
StateOrRegion: __expectString(output.StateOrRegion),
|
|
2891
|
+
};
|
|
2892
|
+
};
|
|
2893
|
+
var deserializeAws_restJson1CatalogItem = function (output, context) {
|
|
2894
|
+
return {
|
|
2895
|
+
CatalogItemId: __expectString(output.CatalogItemId),
|
|
2896
|
+
EC2Capacities: output.EC2Capacities !== undefined && output.EC2Capacities !== null
|
|
2897
|
+
? deserializeAws_restJson1EC2CapacityListDefinition(output.EC2Capacities, context)
|
|
2898
|
+
: undefined,
|
|
2899
|
+
ItemStatus: __expectString(output.ItemStatus),
|
|
2900
|
+
PowerKva: __limitedParseFloat32(output.PowerKva),
|
|
2901
|
+
SupportedStorage: output.SupportedStorage !== undefined && output.SupportedStorage !== null
|
|
2902
|
+
? deserializeAws_restJson1SupportedStorageList(output.SupportedStorage, context)
|
|
2903
|
+
: undefined,
|
|
2904
|
+
SupportedUplinkGbps: output.SupportedUplinkGbps !== undefined && output.SupportedUplinkGbps !== null
|
|
2905
|
+
? deserializeAws_restJson1SupportedUplinkGbpsListDefinition(output.SupportedUplinkGbps, context)
|
|
2906
|
+
: undefined,
|
|
2907
|
+
WeightLbs: __expectInt32(output.WeightLbs),
|
|
2908
|
+
};
|
|
2909
|
+
};
|
|
2910
|
+
var deserializeAws_restJson1CatalogItemListDefinition = function (output, context) {
|
|
2911
|
+
return (output || [])
|
|
2912
|
+
.filter(function (e) { return e != null; })
|
|
2913
|
+
.map(function (entry) {
|
|
2914
|
+
if (entry === null) {
|
|
2915
|
+
return null;
|
|
2916
|
+
}
|
|
2917
|
+
return deserializeAws_restJson1CatalogItem(entry, context);
|
|
2918
|
+
});
|
|
2919
|
+
};
|
|
2920
|
+
var deserializeAws_restJson1EC2Capacity = function (output, context) {
|
|
2921
|
+
return {
|
|
2922
|
+
Family: __expectString(output.Family),
|
|
2923
|
+
MaxSize: __expectString(output.MaxSize),
|
|
2924
|
+
Quantity: __expectString(output.Quantity),
|
|
2925
|
+
};
|
|
2926
|
+
};
|
|
2927
|
+
var deserializeAws_restJson1EC2CapacityListDefinition = function (output, context) {
|
|
2928
|
+
return (output || [])
|
|
2929
|
+
.filter(function (e) { return e != null; })
|
|
2930
|
+
.map(function (entry) {
|
|
2931
|
+
if (entry === null) {
|
|
2932
|
+
return null;
|
|
2933
|
+
}
|
|
2934
|
+
return deserializeAws_restJson1EC2Capacity(entry, context);
|
|
2935
|
+
});
|
|
2936
|
+
};
|
|
1411
2937
|
var deserializeAws_restJson1InstanceTypeItem = function (output, context) {
|
|
1412
2938
|
return {
|
|
1413
2939
|
InstanceType: __expectString(output.InstanceType),
|
|
@@ -1441,6 +2967,16 @@ var deserializeAws_restJson1LineItemListDefinition = function (output, context)
|
|
|
1441
2967
|
return deserializeAws_restJson1LineItem(entry, context);
|
|
1442
2968
|
});
|
|
1443
2969
|
};
|
|
2970
|
+
var deserializeAws_restJson1LineItemStatusCounts = function (output, context) {
|
|
2971
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
2972
|
+
var _b;
|
|
2973
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
2974
|
+
if (value === null) {
|
|
2975
|
+
return acc;
|
|
2976
|
+
}
|
|
2977
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectInt32(value), _b));
|
|
2978
|
+
}, {});
|
|
2979
|
+
};
|
|
1444
2980
|
var deserializeAws_restJson1Order = function (output, context) {
|
|
1445
2981
|
return {
|
|
1446
2982
|
LineItems: output.LineItems !== undefined && output.LineItems !== null
|
|
@@ -1458,6 +2994,33 @@ var deserializeAws_restJson1Order = function (output, context) {
|
|
|
1458
2994
|
Status: __expectString(output.Status),
|
|
1459
2995
|
};
|
|
1460
2996
|
};
|
|
2997
|
+
var deserializeAws_restJson1OrderSummary = function (output, context) {
|
|
2998
|
+
return {
|
|
2999
|
+
LineItemCountsByStatus: output.LineItemCountsByStatus !== undefined && output.LineItemCountsByStatus !== null
|
|
3000
|
+
? deserializeAws_restJson1LineItemStatusCounts(output.LineItemCountsByStatus, context)
|
|
3001
|
+
: undefined,
|
|
3002
|
+
OrderFulfilledDate: output.OrderFulfilledDate !== undefined && output.OrderFulfilledDate !== null
|
|
3003
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderFulfilledDate)))
|
|
3004
|
+
: undefined,
|
|
3005
|
+
OrderId: __expectString(output.OrderId),
|
|
3006
|
+
OrderSubmissionDate: output.OrderSubmissionDate !== undefined && output.OrderSubmissionDate !== null
|
|
3007
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderSubmissionDate)))
|
|
3008
|
+
: undefined,
|
|
3009
|
+
OrderType: __expectString(output.OrderType),
|
|
3010
|
+
OutpostId: __expectString(output.OutpostId),
|
|
3011
|
+
Status: __expectString(output.Status),
|
|
3012
|
+
};
|
|
3013
|
+
};
|
|
3014
|
+
var deserializeAws_restJson1OrderSummaryListDefinition = function (output, context) {
|
|
3015
|
+
return (output || [])
|
|
3016
|
+
.filter(function (e) { return e != null; })
|
|
3017
|
+
.map(function (entry) {
|
|
3018
|
+
if (entry === null) {
|
|
3019
|
+
return null;
|
|
3020
|
+
}
|
|
3021
|
+
return deserializeAws_restJson1OrderSummary(entry, context);
|
|
3022
|
+
});
|
|
3023
|
+
};
|
|
1461
3024
|
var deserializeAws_restJson1Outpost = function (output, context) {
|
|
1462
3025
|
return {
|
|
1463
3026
|
AvailabilityZone: __expectString(output.AvailabilityZone),
|
|
@@ -1470,6 +3033,7 @@ var deserializeAws_restJson1Outpost = function (output, context) {
|
|
|
1470
3033
|
OwnerId: __expectString(output.OwnerId),
|
|
1471
3034
|
SiteArn: __expectString(output.SiteArn),
|
|
1472
3035
|
SiteId: __expectString(output.SiteId),
|
|
3036
|
+
SupportedHardwareType: __expectString(output.SupportedHardwareType),
|
|
1473
3037
|
Tags: output.Tags !== undefined && output.Tags !== null
|
|
1474
3038
|
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
1475
3039
|
: undefined,
|
|
@@ -1485,11 +3049,31 @@ var deserializeAws_restJson1outpostListDefinition = function (output, context) {
|
|
|
1485
3049
|
return deserializeAws_restJson1Outpost(entry, context);
|
|
1486
3050
|
});
|
|
1487
3051
|
};
|
|
3052
|
+
var deserializeAws_restJson1RackPhysicalProperties = function (output, context) {
|
|
3053
|
+
return {
|
|
3054
|
+
FiberOpticCableType: __expectString(output.FiberOpticCableType),
|
|
3055
|
+
MaximumSupportedWeightLbs: __expectString(output.MaximumSupportedWeightLbs),
|
|
3056
|
+
OpticalStandard: __expectString(output.OpticalStandard),
|
|
3057
|
+
PowerConnector: __expectString(output.PowerConnector),
|
|
3058
|
+
PowerDrawKva: __expectString(output.PowerDrawKva),
|
|
3059
|
+
PowerFeedDrop: __expectString(output.PowerFeedDrop),
|
|
3060
|
+
PowerPhase: __expectString(output.PowerPhase),
|
|
3061
|
+
UplinkCount: __expectString(output.UplinkCount),
|
|
3062
|
+
UplinkGbps: __expectString(output.UplinkGbps),
|
|
3063
|
+
};
|
|
3064
|
+
};
|
|
1488
3065
|
var deserializeAws_restJson1Site = function (output, context) {
|
|
1489
3066
|
return {
|
|
1490
3067
|
AccountId: __expectString(output.AccountId),
|
|
1491
3068
|
Description: __expectString(output.Description),
|
|
1492
3069
|
Name: __expectString(output.Name),
|
|
3070
|
+
Notes: __expectString(output.Notes),
|
|
3071
|
+
OperatingAddressCity: __expectString(output.OperatingAddressCity),
|
|
3072
|
+
OperatingAddressCountryCode: __expectString(output.OperatingAddressCountryCode),
|
|
3073
|
+
OperatingAddressStateOrRegion: __expectString(output.OperatingAddressStateOrRegion),
|
|
3074
|
+
RackPhysicalProperties: output.RackPhysicalProperties !== undefined && output.RackPhysicalProperties !== null
|
|
3075
|
+
? deserializeAws_restJson1RackPhysicalProperties(output.RackPhysicalProperties, context)
|
|
3076
|
+
: undefined,
|
|
1493
3077
|
SiteArn: __expectString(output.SiteArn),
|
|
1494
3078
|
SiteId: __expectString(output.SiteId),
|
|
1495
3079
|
Tags: output.Tags !== undefined && output.Tags !== null
|
|
@@ -1507,6 +3091,26 @@ var deserializeAws_restJson1siteListDefinition = function (output, context) {
|
|
|
1507
3091
|
return deserializeAws_restJson1Site(entry, context);
|
|
1508
3092
|
});
|
|
1509
3093
|
};
|
|
3094
|
+
var deserializeAws_restJson1SupportedStorageList = function (output, context) {
|
|
3095
|
+
return (output || [])
|
|
3096
|
+
.filter(function (e) { return e != null; })
|
|
3097
|
+
.map(function (entry) {
|
|
3098
|
+
if (entry === null) {
|
|
3099
|
+
return null;
|
|
3100
|
+
}
|
|
3101
|
+
return __expectString(entry);
|
|
3102
|
+
});
|
|
3103
|
+
};
|
|
3104
|
+
var deserializeAws_restJson1SupportedUplinkGbpsListDefinition = function (output, context) {
|
|
3105
|
+
return (output || [])
|
|
3106
|
+
.filter(function (e) { return e != null; })
|
|
3107
|
+
.map(function (entry) {
|
|
3108
|
+
if (entry === null) {
|
|
3109
|
+
return null;
|
|
3110
|
+
}
|
|
3111
|
+
return __expectInt32(entry);
|
|
3112
|
+
});
|
|
3113
|
+
};
|
|
1510
3114
|
var deserializeAws_restJson1TagMap = function (output, context) {
|
|
1511
3115
|
return Object.entries(output).reduce(function (acc, _a) {
|
|
1512
3116
|
var _b;
|