@aws-sdk/client-outposts 3.41.0 → 3.45.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 +41 -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-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-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 +5 -5
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSitesCommand = exports.deserializeAws_restJson1ListOutpostsCommand = exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = exports.deserializeAws_restJson1GetOutpostCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteOutpostCommand = exports.deserializeAws_restJson1CreateOutpostCommand = exports.deserializeAws_restJson1CreateOrderCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSitesCommand = exports.serializeAws_restJson1ListOutpostsCommand = exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = exports.serializeAws_restJson1GetOutpostCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteOutpostCommand = exports.serializeAws_restJson1CreateOutpostCommand = exports.serializeAws_restJson1CreateOrderCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.deserializeAws_restJson1UpdateSiteAddressCommand = exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UpdateOutpostCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSitesCommand = exports.deserializeAws_restJson1ListOutpostsCommand = exports.deserializeAws_restJson1ListOrdersCommand = exports.deserializeAws_restJson1ListCatalogItemsCommand = exports.deserializeAws_restJson1GetSiteAddressCommand = exports.deserializeAws_restJson1GetSiteCommand = exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = exports.deserializeAws_restJson1GetOutpostCommand = exports.deserializeAws_restJson1GetOrderCommand = exports.deserializeAws_restJson1GetCatalogItemCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteOutpostCommand = exports.deserializeAws_restJson1CreateSiteCommand = exports.deserializeAws_restJson1CreateOutpostCommand = exports.deserializeAws_restJson1CreateOrderCommand = exports.deserializeAws_restJson1CancelOrderCommand = exports.serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.serializeAws_restJson1UpdateSiteAddressCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UpdateOutpostCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSitesCommand = exports.serializeAws_restJson1ListOutpostsCommand = exports.serializeAws_restJson1ListOrdersCommand = exports.serializeAws_restJson1ListCatalogItemsCommand = exports.serializeAws_restJson1GetSiteAddressCommand = exports.serializeAws_restJson1GetSiteCommand = exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = exports.serializeAws_restJson1GetOutpostCommand = exports.serializeAws_restJson1GetOrderCommand = exports.serializeAws_restJson1GetCatalogItemCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteOutpostCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateOutpostCommand = exports.serializeAws_restJson1CreateOrderCommand = exports.serializeAws_restJson1CancelOrderCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const serializeAws_restJson1CancelOrderCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orders/{OrderId}/cancel";
|
|
10
|
+
if (input.OrderId !== undefined) {
|
|
11
|
+
const labelValue = input.OrderId;
|
|
12
|
+
if (labelValue.length <= 0) {
|
|
13
|
+
throw new Error("Empty value provided for input HTTP label: OrderId.");
|
|
14
|
+
}
|
|
15
|
+
resolvedPath = resolvedPath.replace("{OrderId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
throw new Error("No value provided for input HTTP label: OrderId.");
|
|
19
|
+
}
|
|
20
|
+
let body;
|
|
21
|
+
return new protocol_http_1.HttpRequest({
|
|
22
|
+
protocol,
|
|
23
|
+
hostname,
|
|
24
|
+
port,
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers,
|
|
27
|
+
path: resolvedPath,
|
|
28
|
+
body,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
exports.serializeAws_restJson1CancelOrderCommand = serializeAws_restJson1CancelOrderCommand;
|
|
6
32
|
const serializeAws_restJson1CreateOrderCommand = async (input, context) => {
|
|
7
33
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
34
|
const headers = {
|
|
@@ -46,6 +72,8 @@ const serializeAws_restJson1CreateOutpostCommand = async (input, context) => {
|
|
|
46
72
|
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
47
73
|
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
48
74
|
...(input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId }),
|
|
75
|
+
...(input.SupportedHardwareType !== undefined &&
|
|
76
|
+
input.SupportedHardwareType !== null && { SupportedHardwareType: input.SupportedHardwareType }),
|
|
49
77
|
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
50
78
|
});
|
|
51
79
|
return new protocol_http_1.HttpRequest({
|
|
@@ -59,6 +87,42 @@ const serializeAws_restJson1CreateOutpostCommand = async (input, context) => {
|
|
|
59
87
|
});
|
|
60
88
|
};
|
|
61
89
|
exports.serializeAws_restJson1CreateOutpostCommand = serializeAws_restJson1CreateOutpostCommand;
|
|
90
|
+
const serializeAws_restJson1CreateSiteCommand = async (input, context) => {
|
|
91
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
92
|
+
const headers = {
|
|
93
|
+
"content-type": "application/json",
|
|
94
|
+
};
|
|
95
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites";
|
|
96
|
+
let body;
|
|
97
|
+
body = JSON.stringify({
|
|
98
|
+
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
99
|
+
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
100
|
+
...(input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes }),
|
|
101
|
+
...(input.OperatingAddress !== undefined &&
|
|
102
|
+
input.OperatingAddress !== null && {
|
|
103
|
+
OperatingAddress: serializeAws_restJson1Address(input.OperatingAddress, context),
|
|
104
|
+
}),
|
|
105
|
+
...(input.RackPhysicalProperties !== undefined &&
|
|
106
|
+
input.RackPhysicalProperties !== null && {
|
|
107
|
+
RackPhysicalProperties: serializeAws_restJson1RackPhysicalProperties(input.RackPhysicalProperties, context),
|
|
108
|
+
}),
|
|
109
|
+
...(input.ShippingAddress !== undefined &&
|
|
110
|
+
input.ShippingAddress !== null && {
|
|
111
|
+
ShippingAddress: serializeAws_restJson1Address(input.ShippingAddress, context),
|
|
112
|
+
}),
|
|
113
|
+
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
114
|
+
});
|
|
115
|
+
return new protocol_http_1.HttpRequest({
|
|
116
|
+
protocol,
|
|
117
|
+
hostname,
|
|
118
|
+
port,
|
|
119
|
+
method: "POST",
|
|
120
|
+
headers,
|
|
121
|
+
path: resolvedPath,
|
|
122
|
+
body,
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
exports.serializeAws_restJson1CreateSiteCommand = serializeAws_restJson1CreateSiteCommand;
|
|
62
126
|
const serializeAws_restJson1DeleteOutpostCommand = async (input, context) => {
|
|
63
127
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
64
128
|
const headers = {};
|
|
@@ -111,6 +175,58 @@ const serializeAws_restJson1DeleteSiteCommand = async (input, context) => {
|
|
|
111
175
|
});
|
|
112
176
|
};
|
|
113
177
|
exports.serializeAws_restJson1DeleteSiteCommand = serializeAws_restJson1DeleteSiteCommand;
|
|
178
|
+
const serializeAws_restJson1GetCatalogItemCommand = async (input, context) => {
|
|
179
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
180
|
+
const headers = {};
|
|
181
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/catalog/item/{CatalogItemId}";
|
|
182
|
+
if (input.CatalogItemId !== undefined) {
|
|
183
|
+
const labelValue = input.CatalogItemId;
|
|
184
|
+
if (labelValue.length <= 0) {
|
|
185
|
+
throw new Error("Empty value provided for input HTTP label: CatalogItemId.");
|
|
186
|
+
}
|
|
187
|
+
resolvedPath = resolvedPath.replace("{CatalogItemId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
throw new Error("No value provided for input HTTP label: CatalogItemId.");
|
|
191
|
+
}
|
|
192
|
+
let body;
|
|
193
|
+
return new protocol_http_1.HttpRequest({
|
|
194
|
+
protocol,
|
|
195
|
+
hostname,
|
|
196
|
+
port,
|
|
197
|
+
method: "GET",
|
|
198
|
+
headers,
|
|
199
|
+
path: resolvedPath,
|
|
200
|
+
body,
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
exports.serializeAws_restJson1GetCatalogItemCommand = serializeAws_restJson1GetCatalogItemCommand;
|
|
204
|
+
const serializeAws_restJson1GetOrderCommand = async (input, context) => {
|
|
205
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
206
|
+
const headers = {};
|
|
207
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orders/{OrderId}";
|
|
208
|
+
if (input.OrderId !== undefined) {
|
|
209
|
+
const labelValue = input.OrderId;
|
|
210
|
+
if (labelValue.length <= 0) {
|
|
211
|
+
throw new Error("Empty value provided for input HTTP label: OrderId.");
|
|
212
|
+
}
|
|
213
|
+
resolvedPath = resolvedPath.replace("{OrderId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
throw new Error("No value provided for input HTTP label: OrderId.");
|
|
217
|
+
}
|
|
218
|
+
let body;
|
|
219
|
+
return new protocol_http_1.HttpRequest({
|
|
220
|
+
protocol,
|
|
221
|
+
hostname,
|
|
222
|
+
port,
|
|
223
|
+
method: "GET",
|
|
224
|
+
headers,
|
|
225
|
+
path: resolvedPath,
|
|
226
|
+
body,
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
exports.serializeAws_restJson1GetOrderCommand = serializeAws_restJson1GetOrderCommand;
|
|
114
230
|
const serializeAws_restJson1GetOutpostCommand = async (input, context) => {
|
|
115
231
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
116
232
|
const headers = {};
|
|
@@ -168,6 +284,114 @@ const serializeAws_restJson1GetOutpostInstanceTypesCommand = async (input, conte
|
|
|
168
284
|
});
|
|
169
285
|
};
|
|
170
286
|
exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = serializeAws_restJson1GetOutpostInstanceTypesCommand;
|
|
287
|
+
const serializeAws_restJson1GetSiteCommand = async (input, context) => {
|
|
288
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
289
|
+
const headers = {};
|
|
290
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}";
|
|
291
|
+
if (input.SiteId !== undefined) {
|
|
292
|
+
const labelValue = input.SiteId;
|
|
293
|
+
if (labelValue.length <= 0) {
|
|
294
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
295
|
+
}
|
|
296
|
+
resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
300
|
+
}
|
|
301
|
+
let body;
|
|
302
|
+
return new protocol_http_1.HttpRequest({
|
|
303
|
+
protocol,
|
|
304
|
+
hostname,
|
|
305
|
+
port,
|
|
306
|
+
method: "GET",
|
|
307
|
+
headers,
|
|
308
|
+
path: resolvedPath,
|
|
309
|
+
body,
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
exports.serializeAws_restJson1GetSiteCommand = serializeAws_restJson1GetSiteCommand;
|
|
313
|
+
const serializeAws_restJson1GetSiteAddressCommand = async (input, context) => {
|
|
314
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
315
|
+
const headers = {};
|
|
316
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/address";
|
|
317
|
+
if (input.SiteId !== undefined) {
|
|
318
|
+
const labelValue = input.SiteId;
|
|
319
|
+
if (labelValue.length <= 0) {
|
|
320
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
321
|
+
}
|
|
322
|
+
resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
326
|
+
}
|
|
327
|
+
const query = {
|
|
328
|
+
...(input.AddressType !== undefined && { AddressType: input.AddressType }),
|
|
329
|
+
};
|
|
330
|
+
let body;
|
|
331
|
+
return new protocol_http_1.HttpRequest({
|
|
332
|
+
protocol,
|
|
333
|
+
hostname,
|
|
334
|
+
port,
|
|
335
|
+
method: "GET",
|
|
336
|
+
headers,
|
|
337
|
+
path: resolvedPath,
|
|
338
|
+
query,
|
|
339
|
+
body,
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
exports.serializeAws_restJson1GetSiteAddressCommand = serializeAws_restJson1GetSiteAddressCommand;
|
|
343
|
+
const serializeAws_restJson1ListCatalogItemsCommand = async (input, context) => {
|
|
344
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
345
|
+
const headers = {};
|
|
346
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/catalog/items";
|
|
347
|
+
const query = {
|
|
348
|
+
...(input.NextToken !== undefined && { NextToken: input.NextToken }),
|
|
349
|
+
...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
|
|
350
|
+
...(input.ItemClassFilter !== undefined && {
|
|
351
|
+
ItemClassFilter: (input.ItemClassFilter || []).map((_entry) => _entry),
|
|
352
|
+
}),
|
|
353
|
+
...(input.SupportedStorageFilter !== undefined && {
|
|
354
|
+
SupportedStorageFilter: (input.SupportedStorageFilter || []).map((_entry) => _entry),
|
|
355
|
+
}),
|
|
356
|
+
...(input.EC2FamilyFilter !== undefined && {
|
|
357
|
+
EC2FamilyFilter: (input.EC2FamilyFilter || []).map((_entry) => _entry),
|
|
358
|
+
}),
|
|
359
|
+
};
|
|
360
|
+
let body;
|
|
361
|
+
return new protocol_http_1.HttpRequest({
|
|
362
|
+
protocol,
|
|
363
|
+
hostname,
|
|
364
|
+
port,
|
|
365
|
+
method: "GET",
|
|
366
|
+
headers,
|
|
367
|
+
path: resolvedPath,
|
|
368
|
+
query,
|
|
369
|
+
body,
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
exports.serializeAws_restJson1ListCatalogItemsCommand = serializeAws_restJson1ListCatalogItemsCommand;
|
|
373
|
+
const serializeAws_restJson1ListOrdersCommand = async (input, context) => {
|
|
374
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
375
|
+
const headers = {};
|
|
376
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-orders";
|
|
377
|
+
const query = {
|
|
378
|
+
...(input.OutpostIdentifierFilter !== undefined && { OutpostIdentifierFilter: input.OutpostIdentifierFilter }),
|
|
379
|
+
...(input.NextToken !== undefined && { NextToken: input.NextToken }),
|
|
380
|
+
...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
|
|
381
|
+
};
|
|
382
|
+
let body;
|
|
383
|
+
return new protocol_http_1.HttpRequest({
|
|
384
|
+
protocol,
|
|
385
|
+
hostname,
|
|
386
|
+
port,
|
|
387
|
+
method: "GET",
|
|
388
|
+
headers,
|
|
389
|
+
path: resolvedPath,
|
|
390
|
+
query,
|
|
391
|
+
body,
|
|
392
|
+
});
|
|
393
|
+
};
|
|
394
|
+
exports.serializeAws_restJson1ListOrdersCommand = serializeAws_restJson1ListOrdersCommand;
|
|
171
395
|
const serializeAws_restJson1ListOutpostsCommand = async (input, context) => {
|
|
172
396
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
173
397
|
const headers = {};
|
|
@@ -306,43 +530,262 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
306
530
|
});
|
|
307
531
|
};
|
|
308
532
|
exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
|
|
533
|
+
const serializeAws_restJson1UpdateOutpostCommand = async (input, context) => {
|
|
534
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
535
|
+
const headers = {
|
|
536
|
+
"content-type": "application/json",
|
|
537
|
+
};
|
|
538
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostId}";
|
|
539
|
+
if (input.OutpostId !== undefined) {
|
|
540
|
+
const labelValue = input.OutpostId;
|
|
541
|
+
if (labelValue.length <= 0) {
|
|
542
|
+
throw new Error("Empty value provided for input HTTP label: OutpostId.");
|
|
543
|
+
}
|
|
544
|
+
resolvedPath = resolvedPath.replace("{OutpostId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
312
545
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
546
|
+
else {
|
|
547
|
+
throw new Error("No value provided for input HTTP label: OutpostId.");
|
|
548
|
+
}
|
|
549
|
+
let body;
|
|
550
|
+
body = JSON.stringify({
|
|
551
|
+
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
552
|
+
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
553
|
+
...(input.SupportedHardwareType !== undefined &&
|
|
554
|
+
input.SupportedHardwareType !== null && { SupportedHardwareType: input.SupportedHardwareType }),
|
|
555
|
+
});
|
|
556
|
+
return new protocol_http_1.HttpRequest({
|
|
557
|
+
protocol,
|
|
558
|
+
hostname,
|
|
559
|
+
port,
|
|
560
|
+
method: "PATCH",
|
|
561
|
+
headers,
|
|
562
|
+
path: resolvedPath,
|
|
563
|
+
body,
|
|
564
|
+
});
|
|
565
|
+
};
|
|
566
|
+
exports.serializeAws_restJson1UpdateOutpostCommand = serializeAws_restJson1UpdateOutpostCommand;
|
|
567
|
+
const serializeAws_restJson1UpdateSiteCommand = async (input, context) => {
|
|
568
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
569
|
+
const headers = {
|
|
570
|
+
"content-type": "application/json",
|
|
316
571
|
};
|
|
317
|
-
|
|
318
|
-
if (
|
|
319
|
-
|
|
572
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}";
|
|
573
|
+
if (input.SiteId !== undefined) {
|
|
574
|
+
const labelValue = input.SiteId;
|
|
575
|
+
if (labelValue.length <= 0) {
|
|
576
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
577
|
+
}
|
|
578
|
+
resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
320
579
|
}
|
|
321
|
-
|
|
580
|
+
else {
|
|
581
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
582
|
+
}
|
|
583
|
+
let body;
|
|
584
|
+
body = JSON.stringify({
|
|
585
|
+
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
586
|
+
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
587
|
+
...(input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes }),
|
|
588
|
+
});
|
|
589
|
+
return new protocol_http_1.HttpRequest({
|
|
590
|
+
protocol,
|
|
591
|
+
hostname,
|
|
592
|
+
port,
|
|
593
|
+
method: "PATCH",
|
|
594
|
+
headers,
|
|
595
|
+
path: resolvedPath,
|
|
596
|
+
body,
|
|
597
|
+
});
|
|
322
598
|
};
|
|
323
|
-
exports.
|
|
324
|
-
const
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
599
|
+
exports.serializeAws_restJson1UpdateSiteCommand = serializeAws_restJson1UpdateSiteCommand;
|
|
600
|
+
const serializeAws_restJson1UpdateSiteAddressCommand = async (input, context) => {
|
|
601
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
602
|
+
const headers = {
|
|
603
|
+
"content-type": "application/json",
|
|
328
604
|
};
|
|
329
|
-
let
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
605
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/address";
|
|
606
|
+
if (input.SiteId !== undefined) {
|
|
607
|
+
const labelValue = input.SiteId;
|
|
608
|
+
if (labelValue.length <= 0) {
|
|
609
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
610
|
+
}
|
|
611
|
+
resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
612
|
+
}
|
|
613
|
+
else {
|
|
614
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
615
|
+
}
|
|
616
|
+
let body;
|
|
617
|
+
body = JSON.stringify({
|
|
618
|
+
...(input.Address !== undefined &&
|
|
619
|
+
input.Address !== null && { Address: serializeAws_restJson1Address(input.Address, context) }),
|
|
620
|
+
...(input.AddressType !== undefined && input.AddressType !== null && { AddressType: input.AddressType }),
|
|
621
|
+
});
|
|
622
|
+
return new protocol_http_1.HttpRequest({
|
|
623
|
+
protocol,
|
|
624
|
+
hostname,
|
|
625
|
+
port,
|
|
626
|
+
method: "PUT",
|
|
627
|
+
headers,
|
|
628
|
+
path: resolvedPath,
|
|
629
|
+
body,
|
|
630
|
+
});
|
|
631
|
+
};
|
|
632
|
+
exports.serializeAws_restJson1UpdateSiteAddressCommand = serializeAws_restJson1UpdateSiteAddressCommand;
|
|
633
|
+
const serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = async (input, context) => {
|
|
634
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
635
|
+
const headers = {
|
|
636
|
+
"content-type": "application/json",
|
|
637
|
+
};
|
|
638
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/rackPhysicalProperties";
|
|
639
|
+
if (input.SiteId !== undefined) {
|
|
640
|
+
const labelValue = input.SiteId;
|
|
641
|
+
if (labelValue.length <= 0) {
|
|
642
|
+
throw new Error("Empty value provided for input HTTP label: SiteId.");
|
|
643
|
+
}
|
|
644
|
+
resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
645
|
+
}
|
|
646
|
+
else {
|
|
647
|
+
throw new Error("No value provided for input HTTP label: SiteId.");
|
|
648
|
+
}
|
|
649
|
+
let body;
|
|
650
|
+
body = JSON.stringify({
|
|
651
|
+
...(input.FiberOpticCableType !== undefined &&
|
|
652
|
+
input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType }),
|
|
653
|
+
...(input.MaximumSupportedWeightLbs !== undefined &&
|
|
654
|
+
input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }),
|
|
655
|
+
...(input.OpticalStandard !== undefined &&
|
|
656
|
+
input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard }),
|
|
657
|
+
...(input.PowerConnector !== undefined &&
|
|
658
|
+
input.PowerConnector !== null && { PowerConnector: input.PowerConnector }),
|
|
659
|
+
...(input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva }),
|
|
660
|
+
...(input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop }),
|
|
661
|
+
...(input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase }),
|
|
662
|
+
...(input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount }),
|
|
663
|
+
...(input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps }),
|
|
664
|
+
});
|
|
665
|
+
return new protocol_http_1.HttpRequest({
|
|
666
|
+
protocol,
|
|
667
|
+
hostname,
|
|
668
|
+
port,
|
|
669
|
+
method: "PATCH",
|
|
670
|
+
headers,
|
|
671
|
+
path: resolvedPath,
|
|
672
|
+
body,
|
|
673
|
+
});
|
|
674
|
+
};
|
|
675
|
+
exports.serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand;
|
|
676
|
+
const deserializeAws_restJson1CancelOrderCommand = async (output, context) => {
|
|
677
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
678
|
+
return deserializeAws_restJson1CancelOrderCommandError(output, context);
|
|
679
|
+
}
|
|
680
|
+
const contents = {
|
|
681
|
+
$metadata: deserializeMetadata(output),
|
|
682
|
+
};
|
|
683
|
+
await collectBody(output.body, context);
|
|
684
|
+
return Promise.resolve(contents);
|
|
685
|
+
};
|
|
686
|
+
exports.deserializeAws_restJson1CancelOrderCommand = deserializeAws_restJson1CancelOrderCommand;
|
|
687
|
+
const deserializeAws_restJson1CancelOrderCommandError = async (output, context) => {
|
|
688
|
+
const parsedOutput = {
|
|
689
|
+
...output,
|
|
690
|
+
body: await parseBody(output.body, context),
|
|
691
|
+
};
|
|
692
|
+
let response;
|
|
693
|
+
let errorCode = "UnknownError";
|
|
694
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
695
|
+
switch (errorCode) {
|
|
696
|
+
case "AccessDeniedException":
|
|
697
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
698
|
+
response = {
|
|
699
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
700
|
+
name: errorCode,
|
|
701
|
+
$metadata: deserializeMetadata(output),
|
|
702
|
+
};
|
|
703
|
+
break;
|
|
704
|
+
case "ConflictException":
|
|
705
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
706
|
+
response = {
|
|
707
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
708
|
+
name: errorCode,
|
|
709
|
+
$metadata: deserializeMetadata(output),
|
|
710
|
+
};
|
|
711
|
+
break;
|
|
712
|
+
case "InternalServerException":
|
|
713
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
714
|
+
response = {
|
|
715
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
716
|
+
name: errorCode,
|
|
717
|
+
$metadata: deserializeMetadata(output),
|
|
718
|
+
};
|
|
719
|
+
break;
|
|
720
|
+
case "NotFoundException":
|
|
721
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
722
|
+
response = {
|
|
723
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
724
|
+
name: errorCode,
|
|
725
|
+
$metadata: deserializeMetadata(output),
|
|
726
|
+
};
|
|
727
|
+
break;
|
|
728
|
+
case "ValidationException":
|
|
729
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
730
|
+
response = {
|
|
731
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
732
|
+
name: errorCode,
|
|
733
|
+
$metadata: deserializeMetadata(output),
|
|
734
|
+
};
|
|
735
|
+
break;
|
|
736
|
+
default:
|
|
737
|
+
const parsedBody = parsedOutput.body;
|
|
738
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
739
|
+
response = {
|
|
740
|
+
...parsedBody,
|
|
741
|
+
name: `${errorCode}`,
|
|
742
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
743
|
+
$fault: "client",
|
|
744
|
+
$metadata: deserializeMetadata(output),
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
const message = response.message || response.Message || errorCode;
|
|
748
|
+
response.message = message;
|
|
749
|
+
delete response.Message;
|
|
750
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
751
|
+
};
|
|
752
|
+
const deserializeAws_restJson1CreateOrderCommand = async (output, context) => {
|
|
753
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
754
|
+
return deserializeAws_restJson1CreateOrderCommandError(output, context);
|
|
755
|
+
}
|
|
756
|
+
const contents = {
|
|
757
|
+
$metadata: deserializeMetadata(output),
|
|
758
|
+
Order: undefined,
|
|
759
|
+
};
|
|
760
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
761
|
+
if (data.Order !== undefined && data.Order !== null) {
|
|
762
|
+
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
763
|
+
}
|
|
764
|
+
return Promise.resolve(contents);
|
|
765
|
+
};
|
|
766
|
+
exports.deserializeAws_restJson1CreateOrderCommand = deserializeAws_restJson1CreateOrderCommand;
|
|
767
|
+
const deserializeAws_restJson1CreateOrderCommandError = async (output, context) => {
|
|
768
|
+
const parsedOutput = {
|
|
769
|
+
...output,
|
|
770
|
+
body: await parseBody(output.body, context),
|
|
771
|
+
};
|
|
772
|
+
let response;
|
|
773
|
+
let errorCode = "UnknownError";
|
|
774
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
775
|
+
switch (errorCode) {
|
|
776
|
+
case "AccessDeniedException":
|
|
777
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
778
|
+
response = {
|
|
779
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
780
|
+
name: errorCode,
|
|
781
|
+
$metadata: deserializeMetadata(output),
|
|
782
|
+
};
|
|
783
|
+
break;
|
|
784
|
+
case "ConflictException":
|
|
785
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
786
|
+
response = {
|
|
787
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
788
|
+
name: errorCode,
|
|
346
789
|
$metadata: deserializeMetadata(output),
|
|
347
790
|
};
|
|
348
791
|
break;
|
|
@@ -482,6 +925,86 @@ const deserializeAws_restJson1CreateOutpostCommandError = async (output, context
|
|
|
482
925
|
delete response.Message;
|
|
483
926
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
484
927
|
};
|
|
928
|
+
const deserializeAws_restJson1CreateSiteCommand = async (output, context) => {
|
|
929
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
930
|
+
return deserializeAws_restJson1CreateSiteCommandError(output, context);
|
|
931
|
+
}
|
|
932
|
+
const contents = {
|
|
933
|
+
$metadata: deserializeMetadata(output),
|
|
934
|
+
Site: undefined,
|
|
935
|
+
};
|
|
936
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
937
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
938
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
939
|
+
}
|
|
940
|
+
return Promise.resolve(contents);
|
|
941
|
+
};
|
|
942
|
+
exports.deserializeAws_restJson1CreateSiteCommand = deserializeAws_restJson1CreateSiteCommand;
|
|
943
|
+
const deserializeAws_restJson1CreateSiteCommandError = async (output, context) => {
|
|
944
|
+
const parsedOutput = {
|
|
945
|
+
...output,
|
|
946
|
+
body: await parseBody(output.body, context),
|
|
947
|
+
};
|
|
948
|
+
let response;
|
|
949
|
+
let errorCode = "UnknownError";
|
|
950
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
951
|
+
switch (errorCode) {
|
|
952
|
+
case "AccessDeniedException":
|
|
953
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
954
|
+
response = {
|
|
955
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
956
|
+
name: errorCode,
|
|
957
|
+
$metadata: deserializeMetadata(output),
|
|
958
|
+
};
|
|
959
|
+
break;
|
|
960
|
+
case "ConflictException":
|
|
961
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
962
|
+
response = {
|
|
963
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
964
|
+
name: errorCode,
|
|
965
|
+
$metadata: deserializeMetadata(output),
|
|
966
|
+
};
|
|
967
|
+
break;
|
|
968
|
+
case "InternalServerException":
|
|
969
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
970
|
+
response = {
|
|
971
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
972
|
+
name: errorCode,
|
|
973
|
+
$metadata: deserializeMetadata(output),
|
|
974
|
+
};
|
|
975
|
+
break;
|
|
976
|
+
case "ServiceQuotaExceededException":
|
|
977
|
+
case "com.amazonaws.outposts#ServiceQuotaExceededException":
|
|
978
|
+
response = {
|
|
979
|
+
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
980
|
+
name: errorCode,
|
|
981
|
+
$metadata: deserializeMetadata(output),
|
|
982
|
+
};
|
|
983
|
+
break;
|
|
984
|
+
case "ValidationException":
|
|
985
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
986
|
+
response = {
|
|
987
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
988
|
+
name: errorCode,
|
|
989
|
+
$metadata: deserializeMetadata(output),
|
|
990
|
+
};
|
|
991
|
+
break;
|
|
992
|
+
default:
|
|
993
|
+
const parsedBody = parsedOutput.body;
|
|
994
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
995
|
+
response = {
|
|
996
|
+
...parsedBody,
|
|
997
|
+
name: `${errorCode}`,
|
|
998
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
999
|
+
$fault: "client",
|
|
1000
|
+
$metadata: deserializeMetadata(output),
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
const message = response.message || response.Message || errorCode;
|
|
1004
|
+
response.message = message;
|
|
1005
|
+
delete response.Message;
|
|
1006
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1007
|
+
};
|
|
485
1008
|
const deserializeAws_restJson1DeleteOutpostCommand = async (output, context) => {
|
|
486
1009
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
487
1010
|
return deserializeAws_restJson1DeleteOutpostCommandError(output, context);
|
|
@@ -634,22 +1157,22 @@ const deserializeAws_restJson1DeleteSiteCommandError = async (output, context) =
|
|
|
634
1157
|
delete response.Message;
|
|
635
1158
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
636
1159
|
};
|
|
637
|
-
const
|
|
1160
|
+
const deserializeAws_restJson1GetCatalogItemCommand = async (output, context) => {
|
|
638
1161
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
639
|
-
return
|
|
1162
|
+
return deserializeAws_restJson1GetCatalogItemCommandError(output, context);
|
|
640
1163
|
}
|
|
641
1164
|
const contents = {
|
|
642
1165
|
$metadata: deserializeMetadata(output),
|
|
643
|
-
|
|
1166
|
+
CatalogItem: undefined,
|
|
644
1167
|
};
|
|
645
1168
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
646
|
-
if (data.
|
|
647
|
-
contents.
|
|
1169
|
+
if (data.CatalogItem !== undefined && data.CatalogItem !== null) {
|
|
1170
|
+
contents.CatalogItem = deserializeAws_restJson1CatalogItem(data.CatalogItem, context);
|
|
648
1171
|
}
|
|
649
1172
|
return Promise.resolve(contents);
|
|
650
1173
|
};
|
|
651
|
-
exports.
|
|
652
|
-
const
|
|
1174
|
+
exports.deserializeAws_restJson1GetCatalogItemCommand = deserializeAws_restJson1GetCatalogItemCommand;
|
|
1175
|
+
const deserializeAws_restJson1GetCatalogItemCommandError = async (output, context) => {
|
|
653
1176
|
const parsedOutput = {
|
|
654
1177
|
...output,
|
|
655
1178
|
body: await parseBody(output.body, context),
|
|
@@ -658,14 +1181,722 @@ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) =
|
|
|
658
1181
|
let errorCode = "UnknownError";
|
|
659
1182
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
660
1183
|
switch (errorCode) {
|
|
661
|
-
case "
|
|
662
|
-
case "com.amazonaws.outposts#
|
|
1184
|
+
case "InternalServerException":
|
|
1185
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
663
1186
|
response = {
|
|
664
|
-
...(await
|
|
1187
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1188
|
+
name: errorCode,
|
|
1189
|
+
$metadata: deserializeMetadata(output),
|
|
1190
|
+
};
|
|
1191
|
+
break;
|
|
1192
|
+
case "NotFoundException":
|
|
1193
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1194
|
+
response = {
|
|
1195
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
665
1196
|
name: errorCode,
|
|
666
1197
|
$metadata: deserializeMetadata(output),
|
|
667
1198
|
};
|
|
668
1199
|
break;
|
|
1200
|
+
case "ValidationException":
|
|
1201
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1202
|
+
response = {
|
|
1203
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1204
|
+
name: errorCode,
|
|
1205
|
+
$metadata: deserializeMetadata(output),
|
|
1206
|
+
};
|
|
1207
|
+
break;
|
|
1208
|
+
default:
|
|
1209
|
+
const parsedBody = parsedOutput.body;
|
|
1210
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1211
|
+
response = {
|
|
1212
|
+
...parsedBody,
|
|
1213
|
+
name: `${errorCode}`,
|
|
1214
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1215
|
+
$fault: "client",
|
|
1216
|
+
$metadata: deserializeMetadata(output),
|
|
1217
|
+
};
|
|
1218
|
+
}
|
|
1219
|
+
const message = response.message || response.Message || errorCode;
|
|
1220
|
+
response.message = message;
|
|
1221
|
+
delete response.Message;
|
|
1222
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1223
|
+
};
|
|
1224
|
+
const deserializeAws_restJson1GetOrderCommand = async (output, context) => {
|
|
1225
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1226
|
+
return deserializeAws_restJson1GetOrderCommandError(output, context);
|
|
1227
|
+
}
|
|
1228
|
+
const contents = {
|
|
1229
|
+
$metadata: deserializeMetadata(output),
|
|
1230
|
+
Order: undefined,
|
|
1231
|
+
};
|
|
1232
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1233
|
+
if (data.Order !== undefined && data.Order !== null) {
|
|
1234
|
+
contents.Order = deserializeAws_restJson1Order(data.Order, context);
|
|
1235
|
+
}
|
|
1236
|
+
return Promise.resolve(contents);
|
|
1237
|
+
};
|
|
1238
|
+
exports.deserializeAws_restJson1GetOrderCommand = deserializeAws_restJson1GetOrderCommand;
|
|
1239
|
+
const deserializeAws_restJson1GetOrderCommandError = async (output, context) => {
|
|
1240
|
+
const parsedOutput = {
|
|
1241
|
+
...output,
|
|
1242
|
+
body: await parseBody(output.body, context),
|
|
1243
|
+
};
|
|
1244
|
+
let response;
|
|
1245
|
+
let errorCode = "UnknownError";
|
|
1246
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1247
|
+
switch (errorCode) {
|
|
1248
|
+
case "InternalServerException":
|
|
1249
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1250
|
+
response = {
|
|
1251
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1252
|
+
name: errorCode,
|
|
1253
|
+
$metadata: deserializeMetadata(output),
|
|
1254
|
+
};
|
|
1255
|
+
break;
|
|
1256
|
+
case "NotFoundException":
|
|
1257
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1258
|
+
response = {
|
|
1259
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1260
|
+
name: errorCode,
|
|
1261
|
+
$metadata: deserializeMetadata(output),
|
|
1262
|
+
};
|
|
1263
|
+
break;
|
|
1264
|
+
case "ValidationException":
|
|
1265
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1266
|
+
response = {
|
|
1267
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1268
|
+
name: errorCode,
|
|
1269
|
+
$metadata: deserializeMetadata(output),
|
|
1270
|
+
};
|
|
1271
|
+
break;
|
|
1272
|
+
default:
|
|
1273
|
+
const parsedBody = parsedOutput.body;
|
|
1274
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1275
|
+
response = {
|
|
1276
|
+
...parsedBody,
|
|
1277
|
+
name: `${errorCode}`,
|
|
1278
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1279
|
+
$fault: "client",
|
|
1280
|
+
$metadata: deserializeMetadata(output),
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
const message = response.message || response.Message || errorCode;
|
|
1284
|
+
response.message = message;
|
|
1285
|
+
delete response.Message;
|
|
1286
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1287
|
+
};
|
|
1288
|
+
const deserializeAws_restJson1GetOutpostCommand = async (output, context) => {
|
|
1289
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1290
|
+
return deserializeAws_restJson1GetOutpostCommandError(output, context);
|
|
1291
|
+
}
|
|
1292
|
+
const contents = {
|
|
1293
|
+
$metadata: deserializeMetadata(output),
|
|
1294
|
+
Outpost: undefined,
|
|
1295
|
+
};
|
|
1296
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1297
|
+
if (data.Outpost !== undefined && data.Outpost !== null) {
|
|
1298
|
+
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
1299
|
+
}
|
|
1300
|
+
return Promise.resolve(contents);
|
|
1301
|
+
};
|
|
1302
|
+
exports.deserializeAws_restJson1GetOutpostCommand = deserializeAws_restJson1GetOutpostCommand;
|
|
1303
|
+
const deserializeAws_restJson1GetOutpostCommandError = async (output, context) => {
|
|
1304
|
+
const parsedOutput = {
|
|
1305
|
+
...output,
|
|
1306
|
+
body: await parseBody(output.body, context),
|
|
1307
|
+
};
|
|
1308
|
+
let response;
|
|
1309
|
+
let errorCode = "UnknownError";
|
|
1310
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1311
|
+
switch (errorCode) {
|
|
1312
|
+
case "AccessDeniedException":
|
|
1313
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1314
|
+
response = {
|
|
1315
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1316
|
+
name: errorCode,
|
|
1317
|
+
$metadata: deserializeMetadata(output),
|
|
1318
|
+
};
|
|
1319
|
+
break;
|
|
1320
|
+
case "InternalServerException":
|
|
1321
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1322
|
+
response = {
|
|
1323
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1324
|
+
name: errorCode,
|
|
1325
|
+
$metadata: deserializeMetadata(output),
|
|
1326
|
+
};
|
|
1327
|
+
break;
|
|
1328
|
+
case "NotFoundException":
|
|
1329
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1330
|
+
response = {
|
|
1331
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1332
|
+
name: errorCode,
|
|
1333
|
+
$metadata: deserializeMetadata(output),
|
|
1334
|
+
};
|
|
1335
|
+
break;
|
|
1336
|
+
case "ValidationException":
|
|
1337
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1338
|
+
response = {
|
|
1339
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1340
|
+
name: errorCode,
|
|
1341
|
+
$metadata: deserializeMetadata(output),
|
|
1342
|
+
};
|
|
1343
|
+
break;
|
|
1344
|
+
default:
|
|
1345
|
+
const parsedBody = parsedOutput.body;
|
|
1346
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1347
|
+
response = {
|
|
1348
|
+
...parsedBody,
|
|
1349
|
+
name: `${errorCode}`,
|
|
1350
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1351
|
+
$fault: "client",
|
|
1352
|
+
$metadata: deserializeMetadata(output),
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
const message = response.message || response.Message || errorCode;
|
|
1356
|
+
response.message = message;
|
|
1357
|
+
delete response.Message;
|
|
1358
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1359
|
+
};
|
|
1360
|
+
const deserializeAws_restJson1GetOutpostInstanceTypesCommand = async (output, context) => {
|
|
1361
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1362
|
+
return deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context);
|
|
1363
|
+
}
|
|
1364
|
+
const contents = {
|
|
1365
|
+
$metadata: deserializeMetadata(output),
|
|
1366
|
+
InstanceTypes: undefined,
|
|
1367
|
+
NextToken: undefined,
|
|
1368
|
+
OutpostArn: undefined,
|
|
1369
|
+
OutpostId: undefined,
|
|
1370
|
+
};
|
|
1371
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1372
|
+
if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
|
|
1373
|
+
contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
|
|
1374
|
+
}
|
|
1375
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1376
|
+
contents.NextToken = smithy_client_1.expectString(data.NextToken);
|
|
1377
|
+
}
|
|
1378
|
+
if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
|
|
1379
|
+
contents.OutpostArn = smithy_client_1.expectString(data.OutpostArn);
|
|
1380
|
+
}
|
|
1381
|
+
if (data.OutpostId !== undefined && data.OutpostId !== null) {
|
|
1382
|
+
contents.OutpostId = smithy_client_1.expectString(data.OutpostId);
|
|
1383
|
+
}
|
|
1384
|
+
return Promise.resolve(contents);
|
|
1385
|
+
};
|
|
1386
|
+
exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = deserializeAws_restJson1GetOutpostInstanceTypesCommand;
|
|
1387
|
+
const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (output, context) => {
|
|
1388
|
+
const parsedOutput = {
|
|
1389
|
+
...output,
|
|
1390
|
+
body: await parseBody(output.body, context),
|
|
1391
|
+
};
|
|
1392
|
+
let response;
|
|
1393
|
+
let errorCode = "UnknownError";
|
|
1394
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1395
|
+
switch (errorCode) {
|
|
1396
|
+
case "AccessDeniedException":
|
|
1397
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1398
|
+
response = {
|
|
1399
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1400
|
+
name: errorCode,
|
|
1401
|
+
$metadata: deserializeMetadata(output),
|
|
1402
|
+
};
|
|
1403
|
+
break;
|
|
1404
|
+
case "InternalServerException":
|
|
1405
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1406
|
+
response = {
|
|
1407
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1408
|
+
name: errorCode,
|
|
1409
|
+
$metadata: deserializeMetadata(output),
|
|
1410
|
+
};
|
|
1411
|
+
break;
|
|
1412
|
+
case "NotFoundException":
|
|
1413
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1414
|
+
response = {
|
|
1415
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1416
|
+
name: errorCode,
|
|
1417
|
+
$metadata: deserializeMetadata(output),
|
|
1418
|
+
};
|
|
1419
|
+
break;
|
|
1420
|
+
case "ValidationException":
|
|
1421
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1422
|
+
response = {
|
|
1423
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1424
|
+
name: errorCode,
|
|
1425
|
+
$metadata: deserializeMetadata(output),
|
|
1426
|
+
};
|
|
1427
|
+
break;
|
|
1428
|
+
default:
|
|
1429
|
+
const parsedBody = parsedOutput.body;
|
|
1430
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1431
|
+
response = {
|
|
1432
|
+
...parsedBody,
|
|
1433
|
+
name: `${errorCode}`,
|
|
1434
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1435
|
+
$fault: "client",
|
|
1436
|
+
$metadata: deserializeMetadata(output),
|
|
1437
|
+
};
|
|
1438
|
+
}
|
|
1439
|
+
const message = response.message || response.Message || errorCode;
|
|
1440
|
+
response.message = message;
|
|
1441
|
+
delete response.Message;
|
|
1442
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1443
|
+
};
|
|
1444
|
+
const deserializeAws_restJson1GetSiteCommand = async (output, context) => {
|
|
1445
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1446
|
+
return deserializeAws_restJson1GetSiteCommandError(output, context);
|
|
1447
|
+
}
|
|
1448
|
+
const contents = {
|
|
1449
|
+
$metadata: deserializeMetadata(output),
|
|
1450
|
+
Site: undefined,
|
|
1451
|
+
};
|
|
1452
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1453
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
1454
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
1455
|
+
}
|
|
1456
|
+
return Promise.resolve(contents);
|
|
1457
|
+
};
|
|
1458
|
+
exports.deserializeAws_restJson1GetSiteCommand = deserializeAws_restJson1GetSiteCommand;
|
|
1459
|
+
const deserializeAws_restJson1GetSiteCommandError = async (output, context) => {
|
|
1460
|
+
const parsedOutput = {
|
|
1461
|
+
...output,
|
|
1462
|
+
body: await parseBody(output.body, context),
|
|
1463
|
+
};
|
|
1464
|
+
let response;
|
|
1465
|
+
let errorCode = "UnknownError";
|
|
1466
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1467
|
+
switch (errorCode) {
|
|
1468
|
+
case "AccessDeniedException":
|
|
1469
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1470
|
+
response = {
|
|
1471
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1472
|
+
name: errorCode,
|
|
1473
|
+
$metadata: deserializeMetadata(output),
|
|
1474
|
+
};
|
|
1475
|
+
break;
|
|
1476
|
+
case "InternalServerException":
|
|
1477
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1478
|
+
response = {
|
|
1479
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1480
|
+
name: errorCode,
|
|
1481
|
+
$metadata: deserializeMetadata(output),
|
|
1482
|
+
};
|
|
1483
|
+
break;
|
|
1484
|
+
case "NotFoundException":
|
|
1485
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1486
|
+
response = {
|
|
1487
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1488
|
+
name: errorCode,
|
|
1489
|
+
$metadata: deserializeMetadata(output),
|
|
1490
|
+
};
|
|
1491
|
+
break;
|
|
1492
|
+
case "ValidationException":
|
|
1493
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1494
|
+
response = {
|
|
1495
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1496
|
+
name: errorCode,
|
|
1497
|
+
$metadata: deserializeMetadata(output),
|
|
1498
|
+
};
|
|
1499
|
+
break;
|
|
1500
|
+
default:
|
|
1501
|
+
const parsedBody = parsedOutput.body;
|
|
1502
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1503
|
+
response = {
|
|
1504
|
+
...parsedBody,
|
|
1505
|
+
name: `${errorCode}`,
|
|
1506
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1507
|
+
$fault: "client",
|
|
1508
|
+
$metadata: deserializeMetadata(output),
|
|
1509
|
+
};
|
|
1510
|
+
}
|
|
1511
|
+
const message = response.message || response.Message || errorCode;
|
|
1512
|
+
response.message = message;
|
|
1513
|
+
delete response.Message;
|
|
1514
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1515
|
+
};
|
|
1516
|
+
const deserializeAws_restJson1GetSiteAddressCommand = async (output, context) => {
|
|
1517
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1518
|
+
return deserializeAws_restJson1GetSiteAddressCommandError(output, context);
|
|
1519
|
+
}
|
|
1520
|
+
const contents = {
|
|
1521
|
+
$metadata: deserializeMetadata(output),
|
|
1522
|
+
Address: undefined,
|
|
1523
|
+
AddressType: undefined,
|
|
1524
|
+
SiteId: undefined,
|
|
1525
|
+
};
|
|
1526
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1527
|
+
if (data.Address !== undefined && data.Address !== null) {
|
|
1528
|
+
contents.Address = deserializeAws_restJson1Address(data.Address, context);
|
|
1529
|
+
}
|
|
1530
|
+
if (data.AddressType !== undefined && data.AddressType !== null) {
|
|
1531
|
+
contents.AddressType = smithy_client_1.expectString(data.AddressType);
|
|
1532
|
+
}
|
|
1533
|
+
if (data.SiteId !== undefined && data.SiteId !== null) {
|
|
1534
|
+
contents.SiteId = smithy_client_1.expectString(data.SiteId);
|
|
1535
|
+
}
|
|
1536
|
+
return Promise.resolve(contents);
|
|
1537
|
+
};
|
|
1538
|
+
exports.deserializeAws_restJson1GetSiteAddressCommand = deserializeAws_restJson1GetSiteAddressCommand;
|
|
1539
|
+
const deserializeAws_restJson1GetSiteAddressCommandError = async (output, context) => {
|
|
1540
|
+
const parsedOutput = {
|
|
1541
|
+
...output,
|
|
1542
|
+
body: await parseBody(output.body, context),
|
|
1543
|
+
};
|
|
1544
|
+
let response;
|
|
1545
|
+
let errorCode = "UnknownError";
|
|
1546
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1547
|
+
switch (errorCode) {
|
|
1548
|
+
case "AccessDeniedException":
|
|
1549
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1550
|
+
response = {
|
|
1551
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1552
|
+
name: errorCode,
|
|
1553
|
+
$metadata: deserializeMetadata(output),
|
|
1554
|
+
};
|
|
1555
|
+
break;
|
|
1556
|
+
case "InternalServerException":
|
|
1557
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1558
|
+
response = {
|
|
1559
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1560
|
+
name: errorCode,
|
|
1561
|
+
$metadata: deserializeMetadata(output),
|
|
1562
|
+
};
|
|
1563
|
+
break;
|
|
1564
|
+
case "NotFoundException":
|
|
1565
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1566
|
+
response = {
|
|
1567
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1568
|
+
name: errorCode,
|
|
1569
|
+
$metadata: deserializeMetadata(output),
|
|
1570
|
+
};
|
|
1571
|
+
break;
|
|
1572
|
+
case "ValidationException":
|
|
1573
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1574
|
+
response = {
|
|
1575
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1576
|
+
name: errorCode,
|
|
1577
|
+
$metadata: deserializeMetadata(output),
|
|
1578
|
+
};
|
|
1579
|
+
break;
|
|
1580
|
+
default:
|
|
1581
|
+
const parsedBody = parsedOutput.body;
|
|
1582
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1583
|
+
response = {
|
|
1584
|
+
...parsedBody,
|
|
1585
|
+
name: `${errorCode}`,
|
|
1586
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1587
|
+
$fault: "client",
|
|
1588
|
+
$metadata: deserializeMetadata(output),
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
const message = response.message || response.Message || errorCode;
|
|
1592
|
+
response.message = message;
|
|
1593
|
+
delete response.Message;
|
|
1594
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1595
|
+
};
|
|
1596
|
+
const deserializeAws_restJson1ListCatalogItemsCommand = async (output, context) => {
|
|
1597
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1598
|
+
return deserializeAws_restJson1ListCatalogItemsCommandError(output, context);
|
|
1599
|
+
}
|
|
1600
|
+
const contents = {
|
|
1601
|
+
$metadata: deserializeMetadata(output),
|
|
1602
|
+
CatalogItems: undefined,
|
|
1603
|
+
NextToken: undefined,
|
|
1604
|
+
};
|
|
1605
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1606
|
+
if (data.CatalogItems !== undefined && data.CatalogItems !== null) {
|
|
1607
|
+
contents.CatalogItems = deserializeAws_restJson1CatalogItemListDefinition(data.CatalogItems, context);
|
|
1608
|
+
}
|
|
1609
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1610
|
+
contents.NextToken = smithy_client_1.expectString(data.NextToken);
|
|
1611
|
+
}
|
|
1612
|
+
return Promise.resolve(contents);
|
|
1613
|
+
};
|
|
1614
|
+
exports.deserializeAws_restJson1ListCatalogItemsCommand = deserializeAws_restJson1ListCatalogItemsCommand;
|
|
1615
|
+
const deserializeAws_restJson1ListCatalogItemsCommandError = async (output, context) => {
|
|
1616
|
+
const parsedOutput = {
|
|
1617
|
+
...output,
|
|
1618
|
+
body: await parseBody(output.body, context),
|
|
1619
|
+
};
|
|
1620
|
+
let response;
|
|
1621
|
+
let errorCode = "UnknownError";
|
|
1622
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1623
|
+
switch (errorCode) {
|
|
1624
|
+
case "InternalServerException":
|
|
1625
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1626
|
+
response = {
|
|
1627
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1628
|
+
name: errorCode,
|
|
1629
|
+
$metadata: deserializeMetadata(output),
|
|
1630
|
+
};
|
|
1631
|
+
break;
|
|
1632
|
+
case "NotFoundException":
|
|
1633
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1634
|
+
response = {
|
|
1635
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1636
|
+
name: errorCode,
|
|
1637
|
+
$metadata: deserializeMetadata(output),
|
|
1638
|
+
};
|
|
1639
|
+
break;
|
|
1640
|
+
case "ValidationException":
|
|
1641
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1642
|
+
response = {
|
|
1643
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1644
|
+
name: errorCode,
|
|
1645
|
+
$metadata: deserializeMetadata(output),
|
|
1646
|
+
};
|
|
1647
|
+
break;
|
|
1648
|
+
default:
|
|
1649
|
+
const parsedBody = parsedOutput.body;
|
|
1650
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1651
|
+
response = {
|
|
1652
|
+
...parsedBody,
|
|
1653
|
+
name: `${errorCode}`,
|
|
1654
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1655
|
+
$fault: "client",
|
|
1656
|
+
$metadata: deserializeMetadata(output),
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
const message = response.message || response.Message || errorCode;
|
|
1660
|
+
response.message = message;
|
|
1661
|
+
delete response.Message;
|
|
1662
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1663
|
+
};
|
|
1664
|
+
const deserializeAws_restJson1ListOrdersCommand = async (output, context) => {
|
|
1665
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1666
|
+
return deserializeAws_restJson1ListOrdersCommandError(output, context);
|
|
1667
|
+
}
|
|
1668
|
+
const contents = {
|
|
1669
|
+
$metadata: deserializeMetadata(output),
|
|
1670
|
+
NextToken: undefined,
|
|
1671
|
+
Orders: undefined,
|
|
1672
|
+
};
|
|
1673
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1674
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1675
|
+
contents.NextToken = smithy_client_1.expectString(data.NextToken);
|
|
1676
|
+
}
|
|
1677
|
+
if (data.Orders !== undefined && data.Orders !== null) {
|
|
1678
|
+
contents.Orders = deserializeAws_restJson1OrderSummaryListDefinition(data.Orders, context);
|
|
1679
|
+
}
|
|
1680
|
+
return Promise.resolve(contents);
|
|
1681
|
+
};
|
|
1682
|
+
exports.deserializeAws_restJson1ListOrdersCommand = deserializeAws_restJson1ListOrdersCommand;
|
|
1683
|
+
const deserializeAws_restJson1ListOrdersCommandError = async (output, context) => {
|
|
1684
|
+
const parsedOutput = {
|
|
1685
|
+
...output,
|
|
1686
|
+
body: await parseBody(output.body, context),
|
|
1687
|
+
};
|
|
1688
|
+
let response;
|
|
1689
|
+
let errorCode = "UnknownError";
|
|
1690
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1691
|
+
switch (errorCode) {
|
|
1692
|
+
case "AccessDeniedException":
|
|
1693
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1694
|
+
response = {
|
|
1695
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1696
|
+
name: errorCode,
|
|
1697
|
+
$metadata: deserializeMetadata(output),
|
|
1698
|
+
};
|
|
1699
|
+
break;
|
|
1700
|
+
case "InternalServerException":
|
|
1701
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1702
|
+
response = {
|
|
1703
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1704
|
+
name: errorCode,
|
|
1705
|
+
$metadata: deserializeMetadata(output),
|
|
1706
|
+
};
|
|
1707
|
+
break;
|
|
1708
|
+
case "NotFoundException":
|
|
1709
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
1710
|
+
response = {
|
|
1711
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1712
|
+
name: errorCode,
|
|
1713
|
+
$metadata: deserializeMetadata(output),
|
|
1714
|
+
};
|
|
1715
|
+
break;
|
|
1716
|
+
case "ValidationException":
|
|
1717
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1718
|
+
response = {
|
|
1719
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1720
|
+
name: errorCode,
|
|
1721
|
+
$metadata: deserializeMetadata(output),
|
|
1722
|
+
};
|
|
1723
|
+
break;
|
|
1724
|
+
default:
|
|
1725
|
+
const parsedBody = parsedOutput.body;
|
|
1726
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1727
|
+
response = {
|
|
1728
|
+
...parsedBody,
|
|
1729
|
+
name: `${errorCode}`,
|
|
1730
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1731
|
+
$fault: "client",
|
|
1732
|
+
$metadata: deserializeMetadata(output),
|
|
1733
|
+
};
|
|
1734
|
+
}
|
|
1735
|
+
const message = response.message || response.Message || errorCode;
|
|
1736
|
+
response.message = message;
|
|
1737
|
+
delete response.Message;
|
|
1738
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1739
|
+
};
|
|
1740
|
+
const deserializeAws_restJson1ListOutpostsCommand = async (output, context) => {
|
|
1741
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1742
|
+
return deserializeAws_restJson1ListOutpostsCommandError(output, context);
|
|
1743
|
+
}
|
|
1744
|
+
const contents = {
|
|
1745
|
+
$metadata: deserializeMetadata(output),
|
|
1746
|
+
NextToken: undefined,
|
|
1747
|
+
Outposts: undefined,
|
|
1748
|
+
};
|
|
1749
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1750
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1751
|
+
contents.NextToken = smithy_client_1.expectString(data.NextToken);
|
|
1752
|
+
}
|
|
1753
|
+
if (data.Outposts !== undefined && data.Outposts !== null) {
|
|
1754
|
+
contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
|
|
1755
|
+
}
|
|
1756
|
+
return Promise.resolve(contents);
|
|
1757
|
+
};
|
|
1758
|
+
exports.deserializeAws_restJson1ListOutpostsCommand = deserializeAws_restJson1ListOutpostsCommand;
|
|
1759
|
+
const deserializeAws_restJson1ListOutpostsCommandError = async (output, context) => {
|
|
1760
|
+
const parsedOutput = {
|
|
1761
|
+
...output,
|
|
1762
|
+
body: await parseBody(output.body, context),
|
|
1763
|
+
};
|
|
1764
|
+
let response;
|
|
1765
|
+
let errorCode = "UnknownError";
|
|
1766
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1767
|
+
switch (errorCode) {
|
|
1768
|
+
case "AccessDeniedException":
|
|
1769
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1770
|
+
response = {
|
|
1771
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1772
|
+
name: errorCode,
|
|
1773
|
+
$metadata: deserializeMetadata(output),
|
|
1774
|
+
};
|
|
1775
|
+
break;
|
|
1776
|
+
case "InternalServerException":
|
|
1777
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1778
|
+
response = {
|
|
1779
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1780
|
+
name: errorCode,
|
|
1781
|
+
$metadata: deserializeMetadata(output),
|
|
1782
|
+
};
|
|
1783
|
+
break;
|
|
1784
|
+
case "ValidationException":
|
|
1785
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1786
|
+
response = {
|
|
1787
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1788
|
+
name: errorCode,
|
|
1789
|
+
$metadata: deserializeMetadata(output),
|
|
1790
|
+
};
|
|
1791
|
+
break;
|
|
1792
|
+
default:
|
|
1793
|
+
const parsedBody = parsedOutput.body;
|
|
1794
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1795
|
+
response = {
|
|
1796
|
+
...parsedBody,
|
|
1797
|
+
name: `${errorCode}`,
|
|
1798
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1799
|
+
$fault: "client",
|
|
1800
|
+
$metadata: deserializeMetadata(output),
|
|
1801
|
+
};
|
|
1802
|
+
}
|
|
1803
|
+
const message = response.message || response.Message || errorCode;
|
|
1804
|
+
response.message = message;
|
|
1805
|
+
delete response.Message;
|
|
1806
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1807
|
+
};
|
|
1808
|
+
const deserializeAws_restJson1ListSitesCommand = async (output, context) => {
|
|
1809
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1810
|
+
return deserializeAws_restJson1ListSitesCommandError(output, context);
|
|
1811
|
+
}
|
|
1812
|
+
const contents = {
|
|
1813
|
+
$metadata: deserializeMetadata(output),
|
|
1814
|
+
NextToken: undefined,
|
|
1815
|
+
Sites: undefined,
|
|
1816
|
+
};
|
|
1817
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1818
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1819
|
+
contents.NextToken = smithy_client_1.expectString(data.NextToken);
|
|
1820
|
+
}
|
|
1821
|
+
if (data.Sites !== undefined && data.Sites !== null) {
|
|
1822
|
+
contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
|
|
1823
|
+
}
|
|
1824
|
+
return Promise.resolve(contents);
|
|
1825
|
+
};
|
|
1826
|
+
exports.deserializeAws_restJson1ListSitesCommand = deserializeAws_restJson1ListSitesCommand;
|
|
1827
|
+
const deserializeAws_restJson1ListSitesCommandError = async (output, context) => {
|
|
1828
|
+
const parsedOutput = {
|
|
1829
|
+
...output,
|
|
1830
|
+
body: await parseBody(output.body, context),
|
|
1831
|
+
};
|
|
1832
|
+
let response;
|
|
1833
|
+
let errorCode = "UnknownError";
|
|
1834
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1835
|
+
switch (errorCode) {
|
|
1836
|
+
case "AccessDeniedException":
|
|
1837
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
1838
|
+
response = {
|
|
1839
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1840
|
+
name: errorCode,
|
|
1841
|
+
$metadata: deserializeMetadata(output),
|
|
1842
|
+
};
|
|
1843
|
+
break;
|
|
1844
|
+
case "InternalServerException":
|
|
1845
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
1846
|
+
response = {
|
|
1847
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1848
|
+
name: errorCode,
|
|
1849
|
+
$metadata: deserializeMetadata(output),
|
|
1850
|
+
};
|
|
1851
|
+
break;
|
|
1852
|
+
case "ValidationException":
|
|
1853
|
+
case "com.amazonaws.outposts#ValidationException":
|
|
1854
|
+
response = {
|
|
1855
|
+
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1856
|
+
name: errorCode,
|
|
1857
|
+
$metadata: deserializeMetadata(output),
|
|
1858
|
+
};
|
|
1859
|
+
break;
|
|
1860
|
+
default:
|
|
1861
|
+
const parsedBody = parsedOutput.body;
|
|
1862
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1863
|
+
response = {
|
|
1864
|
+
...parsedBody,
|
|
1865
|
+
name: `${errorCode}`,
|
|
1866
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1867
|
+
$fault: "client",
|
|
1868
|
+
$metadata: deserializeMetadata(output),
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
const message = response.message || response.Message || errorCode;
|
|
1872
|
+
response.message = message;
|
|
1873
|
+
delete response.Message;
|
|
1874
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1875
|
+
};
|
|
1876
|
+
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1877
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1878
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
1879
|
+
}
|
|
1880
|
+
const contents = {
|
|
1881
|
+
$metadata: deserializeMetadata(output),
|
|
1882
|
+
Tags: undefined,
|
|
1883
|
+
};
|
|
1884
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1885
|
+
if (data.Tags !== undefined && data.Tags !== null) {
|
|
1886
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
1887
|
+
}
|
|
1888
|
+
return Promise.resolve(contents);
|
|
1889
|
+
};
|
|
1890
|
+
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
1891
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
1892
|
+
const parsedOutput = {
|
|
1893
|
+
...output,
|
|
1894
|
+
body: await parseBody(output.body, context),
|
|
1895
|
+
};
|
|
1896
|
+
let response;
|
|
1897
|
+
let errorCode = "UnknownError";
|
|
1898
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1899
|
+
switch (errorCode) {
|
|
669
1900
|
case "InternalServerException":
|
|
670
1901
|
case "com.amazonaws.outposts#InternalServerException":
|
|
671
1902
|
response = {
|
|
@@ -706,34 +1937,18 @@ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) =
|
|
|
706
1937
|
delete response.Message;
|
|
707
1938
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
708
1939
|
};
|
|
709
|
-
const
|
|
1940
|
+
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
710
1941
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
711
|
-
return
|
|
1942
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
712
1943
|
}
|
|
713
1944
|
const contents = {
|
|
714
1945
|
$metadata: deserializeMetadata(output),
|
|
715
|
-
InstanceTypes: undefined,
|
|
716
|
-
NextToken: undefined,
|
|
717
|
-
OutpostArn: undefined,
|
|
718
|
-
OutpostId: undefined,
|
|
719
1946
|
};
|
|
720
|
-
|
|
721
|
-
if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
|
|
722
|
-
contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
|
|
723
|
-
}
|
|
724
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
725
|
-
contents.NextToken = smithy_client_1.expectString(data.NextToken);
|
|
726
|
-
}
|
|
727
|
-
if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
|
|
728
|
-
contents.OutpostArn = smithy_client_1.expectString(data.OutpostArn);
|
|
729
|
-
}
|
|
730
|
-
if (data.OutpostId !== undefined && data.OutpostId !== null) {
|
|
731
|
-
contents.OutpostId = smithy_client_1.expectString(data.OutpostId);
|
|
732
|
-
}
|
|
1947
|
+
await collectBody(output.body, context);
|
|
733
1948
|
return Promise.resolve(contents);
|
|
734
1949
|
};
|
|
735
|
-
exports.
|
|
736
|
-
const
|
|
1950
|
+
exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
|
|
1951
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
737
1952
|
const parsedOutput = {
|
|
738
1953
|
...output,
|
|
739
1954
|
body: await parseBody(output.body, context),
|
|
@@ -742,14 +1957,6 @@ const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (outpu
|
|
|
742
1957
|
let errorCode = "UnknownError";
|
|
743
1958
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
744
1959
|
switch (errorCode) {
|
|
745
|
-
case "AccessDeniedException":
|
|
746
|
-
case "com.amazonaws.outposts#AccessDeniedException":
|
|
747
|
-
response = {
|
|
748
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
749
|
-
name: errorCode,
|
|
750
|
-
$metadata: deserializeMetadata(output),
|
|
751
|
-
};
|
|
752
|
-
break;
|
|
753
1960
|
case "InternalServerException":
|
|
754
1961
|
case "com.amazonaws.outposts#InternalServerException":
|
|
755
1962
|
response = {
|
|
@@ -790,26 +1997,18 @@ const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (outpu
|
|
|
790
1997
|
delete response.Message;
|
|
791
1998
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
792
1999
|
};
|
|
793
|
-
const
|
|
2000
|
+
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
794
2001
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
795
|
-
return
|
|
2002
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
796
2003
|
}
|
|
797
2004
|
const contents = {
|
|
798
2005
|
$metadata: deserializeMetadata(output),
|
|
799
|
-
NextToken: undefined,
|
|
800
|
-
Outposts: undefined,
|
|
801
2006
|
};
|
|
802
|
-
|
|
803
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
804
|
-
contents.NextToken = smithy_client_1.expectString(data.NextToken);
|
|
805
|
-
}
|
|
806
|
-
if (data.Outposts !== undefined && data.Outposts !== null) {
|
|
807
|
-
contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
|
|
808
|
-
}
|
|
2007
|
+
await collectBody(output.body, context);
|
|
809
2008
|
return Promise.resolve(contents);
|
|
810
2009
|
};
|
|
811
|
-
exports.
|
|
812
|
-
const
|
|
2010
|
+
exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
|
|
2011
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
813
2012
|
const parsedOutput = {
|
|
814
2013
|
...output,
|
|
815
2014
|
body: await parseBody(output.body, context),
|
|
@@ -818,18 +2017,18 @@ const deserializeAws_restJson1ListOutpostsCommandError = async (output, context)
|
|
|
818
2017
|
let errorCode = "UnknownError";
|
|
819
2018
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
820
2019
|
switch (errorCode) {
|
|
821
|
-
case "
|
|
822
|
-
case "com.amazonaws.outposts#
|
|
2020
|
+
case "InternalServerException":
|
|
2021
|
+
case "com.amazonaws.outposts#InternalServerException":
|
|
823
2022
|
response = {
|
|
824
|
-
...(await
|
|
2023
|
+
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
825
2024
|
name: errorCode,
|
|
826
2025
|
$metadata: deserializeMetadata(output),
|
|
827
2026
|
};
|
|
828
2027
|
break;
|
|
829
|
-
case "
|
|
830
|
-
case "com.amazonaws.outposts#
|
|
2028
|
+
case "NotFoundException":
|
|
2029
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
831
2030
|
response = {
|
|
832
|
-
...(await
|
|
2031
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
833
2032
|
name: errorCode,
|
|
834
2033
|
$metadata: deserializeMetadata(output),
|
|
835
2034
|
};
|
|
@@ -858,26 +2057,22 @@ const deserializeAws_restJson1ListOutpostsCommandError = async (output, context)
|
|
|
858
2057
|
delete response.Message;
|
|
859
2058
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
860
2059
|
};
|
|
861
|
-
const
|
|
2060
|
+
const deserializeAws_restJson1UpdateOutpostCommand = async (output, context) => {
|
|
862
2061
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
863
|
-
return
|
|
2062
|
+
return deserializeAws_restJson1UpdateOutpostCommandError(output, context);
|
|
864
2063
|
}
|
|
865
2064
|
const contents = {
|
|
866
2065
|
$metadata: deserializeMetadata(output),
|
|
867
|
-
|
|
868
|
-
Sites: undefined,
|
|
2066
|
+
Outpost: undefined,
|
|
869
2067
|
};
|
|
870
2068
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
871
|
-
if (data.
|
|
872
|
-
contents.
|
|
873
|
-
}
|
|
874
|
-
if (data.Sites !== undefined && data.Sites !== null) {
|
|
875
|
-
contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
|
|
2069
|
+
if (data.Outpost !== undefined && data.Outpost !== null) {
|
|
2070
|
+
contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
|
|
876
2071
|
}
|
|
877
2072
|
return Promise.resolve(contents);
|
|
878
2073
|
};
|
|
879
|
-
exports.
|
|
880
|
-
const
|
|
2074
|
+
exports.deserializeAws_restJson1UpdateOutpostCommand = deserializeAws_restJson1UpdateOutpostCommand;
|
|
2075
|
+
const deserializeAws_restJson1UpdateOutpostCommandError = async (output, context) => {
|
|
881
2076
|
const parsedOutput = {
|
|
882
2077
|
...output,
|
|
883
2078
|
body: await parseBody(output.body, context),
|
|
@@ -894,6 +2089,14 @@ const deserializeAws_restJson1ListSitesCommandError = async (output, context) =>
|
|
|
894
2089
|
$metadata: deserializeMetadata(output),
|
|
895
2090
|
};
|
|
896
2091
|
break;
|
|
2092
|
+
case "ConflictException":
|
|
2093
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
2094
|
+
response = {
|
|
2095
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2096
|
+
name: errorCode,
|
|
2097
|
+
$metadata: deserializeMetadata(output),
|
|
2098
|
+
};
|
|
2099
|
+
break;
|
|
897
2100
|
case "InternalServerException":
|
|
898
2101
|
case "com.amazonaws.outposts#InternalServerException":
|
|
899
2102
|
response = {
|
|
@@ -902,6 +2105,14 @@ const deserializeAws_restJson1ListSitesCommandError = async (output, context) =>
|
|
|
902
2105
|
$metadata: deserializeMetadata(output),
|
|
903
2106
|
};
|
|
904
2107
|
break;
|
|
2108
|
+
case "NotFoundException":
|
|
2109
|
+
case "com.amazonaws.outposts#NotFoundException":
|
|
2110
|
+
response = {
|
|
2111
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2112
|
+
name: errorCode,
|
|
2113
|
+
$metadata: deserializeMetadata(output),
|
|
2114
|
+
};
|
|
2115
|
+
break;
|
|
905
2116
|
case "ValidationException":
|
|
906
2117
|
case "com.amazonaws.outposts#ValidationException":
|
|
907
2118
|
response = {
|
|
@@ -926,22 +2137,22 @@ const deserializeAws_restJson1ListSitesCommandError = async (output, context) =>
|
|
|
926
2137
|
delete response.Message;
|
|
927
2138
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
928
2139
|
};
|
|
929
|
-
const
|
|
2140
|
+
const deserializeAws_restJson1UpdateSiteCommand = async (output, context) => {
|
|
930
2141
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
931
|
-
return
|
|
2142
|
+
return deserializeAws_restJson1UpdateSiteCommandError(output, context);
|
|
932
2143
|
}
|
|
933
2144
|
const contents = {
|
|
934
2145
|
$metadata: deserializeMetadata(output),
|
|
935
|
-
|
|
2146
|
+
Site: undefined,
|
|
936
2147
|
};
|
|
937
2148
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
938
|
-
if (data.
|
|
939
|
-
contents.
|
|
2149
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
2150
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
940
2151
|
}
|
|
941
2152
|
return Promise.resolve(contents);
|
|
942
2153
|
};
|
|
943
|
-
exports.
|
|
944
|
-
const
|
|
2154
|
+
exports.deserializeAws_restJson1UpdateSiteCommand = deserializeAws_restJson1UpdateSiteCommand;
|
|
2155
|
+
const deserializeAws_restJson1UpdateSiteCommandError = async (output, context) => {
|
|
945
2156
|
const parsedOutput = {
|
|
946
2157
|
...output,
|
|
947
2158
|
body: await parseBody(output.body, context),
|
|
@@ -950,6 +2161,22 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
950
2161
|
let errorCode = "UnknownError";
|
|
951
2162
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
952
2163
|
switch (errorCode) {
|
|
2164
|
+
case "AccessDeniedException":
|
|
2165
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
2166
|
+
response = {
|
|
2167
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2168
|
+
name: errorCode,
|
|
2169
|
+
$metadata: deserializeMetadata(output),
|
|
2170
|
+
};
|
|
2171
|
+
break;
|
|
2172
|
+
case "ConflictException":
|
|
2173
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
2174
|
+
response = {
|
|
2175
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2176
|
+
name: errorCode,
|
|
2177
|
+
$metadata: deserializeMetadata(output),
|
|
2178
|
+
};
|
|
2179
|
+
break;
|
|
953
2180
|
case "InternalServerException":
|
|
954
2181
|
case "com.amazonaws.outposts#InternalServerException":
|
|
955
2182
|
response = {
|
|
@@ -990,18 +2217,26 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
990
2217
|
delete response.Message;
|
|
991
2218
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
992
2219
|
};
|
|
993
|
-
const
|
|
2220
|
+
const deserializeAws_restJson1UpdateSiteAddressCommand = async (output, context) => {
|
|
994
2221
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
995
|
-
return
|
|
2222
|
+
return deserializeAws_restJson1UpdateSiteAddressCommandError(output, context);
|
|
996
2223
|
}
|
|
997
2224
|
const contents = {
|
|
998
2225
|
$metadata: deserializeMetadata(output),
|
|
2226
|
+
Address: undefined,
|
|
2227
|
+
AddressType: undefined,
|
|
999
2228
|
};
|
|
1000
|
-
await
|
|
2229
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
2230
|
+
if (data.Address !== undefined && data.Address !== null) {
|
|
2231
|
+
contents.Address = deserializeAws_restJson1Address(data.Address, context);
|
|
2232
|
+
}
|
|
2233
|
+
if (data.AddressType !== undefined && data.AddressType !== null) {
|
|
2234
|
+
contents.AddressType = smithy_client_1.expectString(data.AddressType);
|
|
2235
|
+
}
|
|
1001
2236
|
return Promise.resolve(contents);
|
|
1002
2237
|
};
|
|
1003
|
-
exports.
|
|
1004
|
-
const
|
|
2238
|
+
exports.deserializeAws_restJson1UpdateSiteAddressCommand = deserializeAws_restJson1UpdateSiteAddressCommand;
|
|
2239
|
+
const deserializeAws_restJson1UpdateSiteAddressCommandError = async (output, context) => {
|
|
1005
2240
|
const parsedOutput = {
|
|
1006
2241
|
...output,
|
|
1007
2242
|
body: await parseBody(output.body, context),
|
|
@@ -1010,6 +2245,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1010
2245
|
let errorCode = "UnknownError";
|
|
1011
2246
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1012
2247
|
switch (errorCode) {
|
|
2248
|
+
case "AccessDeniedException":
|
|
2249
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
2250
|
+
response = {
|
|
2251
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2252
|
+
name: errorCode,
|
|
2253
|
+
$metadata: deserializeMetadata(output),
|
|
2254
|
+
};
|
|
2255
|
+
break;
|
|
2256
|
+
case "ConflictException":
|
|
2257
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
2258
|
+
response = {
|
|
2259
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2260
|
+
name: errorCode,
|
|
2261
|
+
$metadata: deserializeMetadata(output),
|
|
2262
|
+
};
|
|
2263
|
+
break;
|
|
1013
2264
|
case "InternalServerException":
|
|
1014
2265
|
case "com.amazonaws.outposts#InternalServerException":
|
|
1015
2266
|
response = {
|
|
@@ -1050,18 +2301,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1050
2301
|
delete response.Message;
|
|
1051
2302
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1052
2303
|
};
|
|
1053
|
-
const
|
|
2304
|
+
const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = async (output, context) => {
|
|
1054
2305
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1055
|
-
return
|
|
2306
|
+
return deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError(output, context);
|
|
1056
2307
|
}
|
|
1057
2308
|
const contents = {
|
|
1058
2309
|
$metadata: deserializeMetadata(output),
|
|
2310
|
+
Site: undefined,
|
|
1059
2311
|
};
|
|
1060
|
-
await
|
|
2312
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
2313
|
+
if (data.Site !== undefined && data.Site !== null) {
|
|
2314
|
+
contents.Site = deserializeAws_restJson1Site(data.Site, context);
|
|
2315
|
+
}
|
|
1061
2316
|
return Promise.resolve(contents);
|
|
1062
2317
|
};
|
|
1063
|
-
exports.
|
|
1064
|
-
const
|
|
2318
|
+
exports.deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand;
|
|
2319
|
+
const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError = async (output, context) => {
|
|
1065
2320
|
const parsedOutput = {
|
|
1066
2321
|
...output,
|
|
1067
2322
|
body: await parseBody(output.body, context),
|
|
@@ -1070,6 +2325,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1070
2325
|
let errorCode = "UnknownError";
|
|
1071
2326
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1072
2327
|
switch (errorCode) {
|
|
2328
|
+
case "AccessDeniedException":
|
|
2329
|
+
case "com.amazonaws.outposts#AccessDeniedException":
|
|
2330
|
+
response = {
|
|
2331
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2332
|
+
name: errorCode,
|
|
2333
|
+
$metadata: deserializeMetadata(output),
|
|
2334
|
+
};
|
|
2335
|
+
break;
|
|
2336
|
+
case "ConflictException":
|
|
2337
|
+
case "com.amazonaws.outposts#ConflictException":
|
|
2338
|
+
response = {
|
|
2339
|
+
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2340
|
+
name: errorCode,
|
|
2341
|
+
$metadata: deserializeMetadata(output),
|
|
2342
|
+
};
|
|
2343
|
+
break;
|
|
1073
2344
|
case "InternalServerException":
|
|
1074
2345
|
case "com.amazonaws.outposts#InternalServerException":
|
|
1075
2346
|
response = {
|
|
@@ -1196,6 +2467,23 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
1196
2467
|
}
|
|
1197
2468
|
return contents;
|
|
1198
2469
|
};
|
|
2470
|
+
const serializeAws_restJson1Address = (input, context) => {
|
|
2471
|
+
return {
|
|
2472
|
+
...(input.AddressLine1 !== undefined && input.AddressLine1 !== null && { AddressLine1: input.AddressLine1 }),
|
|
2473
|
+
...(input.AddressLine2 !== undefined && input.AddressLine2 !== null && { AddressLine2: input.AddressLine2 }),
|
|
2474
|
+
...(input.AddressLine3 !== undefined && input.AddressLine3 !== null && { AddressLine3: input.AddressLine3 }),
|
|
2475
|
+
...(input.City !== undefined && input.City !== null && { City: input.City }),
|
|
2476
|
+
...(input.ContactName !== undefined && input.ContactName !== null && { ContactName: input.ContactName }),
|
|
2477
|
+
...(input.ContactPhoneNumber !== undefined &&
|
|
2478
|
+
input.ContactPhoneNumber !== null && { ContactPhoneNumber: input.ContactPhoneNumber }),
|
|
2479
|
+
...(input.CountryCode !== undefined && input.CountryCode !== null && { CountryCode: input.CountryCode }),
|
|
2480
|
+
...(input.DistrictOrCounty !== undefined &&
|
|
2481
|
+
input.DistrictOrCounty !== null && { DistrictOrCounty: input.DistrictOrCounty }),
|
|
2482
|
+
...(input.Municipality !== undefined && input.Municipality !== null && { Municipality: input.Municipality }),
|
|
2483
|
+
...(input.PostalCode !== undefined && input.PostalCode !== null && { PostalCode: input.PostalCode }),
|
|
2484
|
+
...(input.StateOrRegion !== undefined && input.StateOrRegion !== null && { StateOrRegion: input.StateOrRegion }),
|
|
2485
|
+
};
|
|
2486
|
+
};
|
|
1199
2487
|
const serializeAws_restJson1LineItemRequest = (input, context) => {
|
|
1200
2488
|
return {
|
|
1201
2489
|
...(input.CatalogItemId !== undefined && input.CatalogItemId !== null && { CatalogItemId: input.CatalogItemId }),
|
|
@@ -1212,6 +2500,23 @@ const serializeAws_restJson1LineItemRequestListDefinition = (input, context) =>
|
|
|
1212
2500
|
return serializeAws_restJson1LineItemRequest(entry, context);
|
|
1213
2501
|
});
|
|
1214
2502
|
};
|
|
2503
|
+
const serializeAws_restJson1RackPhysicalProperties = (input, context) => {
|
|
2504
|
+
return {
|
|
2505
|
+
...(input.FiberOpticCableType !== undefined &&
|
|
2506
|
+
input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType }),
|
|
2507
|
+
...(input.MaximumSupportedWeightLbs !== undefined &&
|
|
2508
|
+
input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }),
|
|
2509
|
+
...(input.OpticalStandard !== undefined &&
|
|
2510
|
+
input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard }),
|
|
2511
|
+
...(input.PowerConnector !== undefined &&
|
|
2512
|
+
input.PowerConnector !== null && { PowerConnector: input.PowerConnector }),
|
|
2513
|
+
...(input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva }),
|
|
2514
|
+
...(input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop }),
|
|
2515
|
+
...(input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase }),
|
|
2516
|
+
...(input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount }),
|
|
2517
|
+
...(input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps }),
|
|
2518
|
+
};
|
|
2519
|
+
};
|
|
1215
2520
|
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1216
2521
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1217
2522
|
if (value === null) {
|
|
@@ -1223,6 +2528,65 @@ const serializeAws_restJson1TagMap = (input, context) => {
|
|
|
1223
2528
|
};
|
|
1224
2529
|
}, {});
|
|
1225
2530
|
};
|
|
2531
|
+
const deserializeAws_restJson1Address = (output, context) => {
|
|
2532
|
+
return {
|
|
2533
|
+
AddressLine1: smithy_client_1.expectString(output.AddressLine1),
|
|
2534
|
+
AddressLine2: smithy_client_1.expectString(output.AddressLine2),
|
|
2535
|
+
AddressLine3: smithy_client_1.expectString(output.AddressLine3),
|
|
2536
|
+
City: smithy_client_1.expectString(output.City),
|
|
2537
|
+
ContactName: smithy_client_1.expectString(output.ContactName),
|
|
2538
|
+
ContactPhoneNumber: smithy_client_1.expectString(output.ContactPhoneNumber),
|
|
2539
|
+
CountryCode: smithy_client_1.expectString(output.CountryCode),
|
|
2540
|
+
DistrictOrCounty: smithy_client_1.expectString(output.DistrictOrCounty),
|
|
2541
|
+
Municipality: smithy_client_1.expectString(output.Municipality),
|
|
2542
|
+
PostalCode: smithy_client_1.expectString(output.PostalCode),
|
|
2543
|
+
StateOrRegion: smithy_client_1.expectString(output.StateOrRegion),
|
|
2544
|
+
};
|
|
2545
|
+
};
|
|
2546
|
+
const deserializeAws_restJson1CatalogItem = (output, context) => {
|
|
2547
|
+
return {
|
|
2548
|
+
CatalogItemId: smithy_client_1.expectString(output.CatalogItemId),
|
|
2549
|
+
EC2Capacities: output.EC2Capacities !== undefined && output.EC2Capacities !== null
|
|
2550
|
+
? deserializeAws_restJson1EC2CapacityListDefinition(output.EC2Capacities, context)
|
|
2551
|
+
: undefined,
|
|
2552
|
+
ItemStatus: smithy_client_1.expectString(output.ItemStatus),
|
|
2553
|
+
PowerKva: smithy_client_1.limitedParseFloat32(output.PowerKva),
|
|
2554
|
+
SupportedStorage: output.SupportedStorage !== undefined && output.SupportedStorage !== null
|
|
2555
|
+
? deserializeAws_restJson1SupportedStorageList(output.SupportedStorage, context)
|
|
2556
|
+
: undefined,
|
|
2557
|
+
SupportedUplinkGbps: output.SupportedUplinkGbps !== undefined && output.SupportedUplinkGbps !== null
|
|
2558
|
+
? deserializeAws_restJson1SupportedUplinkGbpsListDefinition(output.SupportedUplinkGbps, context)
|
|
2559
|
+
: undefined,
|
|
2560
|
+
WeightLbs: smithy_client_1.expectInt32(output.WeightLbs),
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
const deserializeAws_restJson1CatalogItemListDefinition = (output, context) => {
|
|
2564
|
+
return (output || [])
|
|
2565
|
+
.filter((e) => e != null)
|
|
2566
|
+
.map((entry) => {
|
|
2567
|
+
if (entry === null) {
|
|
2568
|
+
return null;
|
|
2569
|
+
}
|
|
2570
|
+
return deserializeAws_restJson1CatalogItem(entry, context);
|
|
2571
|
+
});
|
|
2572
|
+
};
|
|
2573
|
+
const deserializeAws_restJson1EC2Capacity = (output, context) => {
|
|
2574
|
+
return {
|
|
2575
|
+
Family: smithy_client_1.expectString(output.Family),
|
|
2576
|
+
MaxSize: smithy_client_1.expectString(output.MaxSize),
|
|
2577
|
+
Quantity: smithy_client_1.expectString(output.Quantity),
|
|
2578
|
+
};
|
|
2579
|
+
};
|
|
2580
|
+
const deserializeAws_restJson1EC2CapacityListDefinition = (output, context) => {
|
|
2581
|
+
return (output || [])
|
|
2582
|
+
.filter((e) => e != null)
|
|
2583
|
+
.map((entry) => {
|
|
2584
|
+
if (entry === null) {
|
|
2585
|
+
return null;
|
|
2586
|
+
}
|
|
2587
|
+
return deserializeAws_restJson1EC2Capacity(entry, context);
|
|
2588
|
+
});
|
|
2589
|
+
};
|
|
1226
2590
|
const deserializeAws_restJson1InstanceTypeItem = (output, context) => {
|
|
1227
2591
|
return {
|
|
1228
2592
|
InstanceType: smithy_client_1.expectString(output.InstanceType),
|
|
@@ -1256,6 +2620,17 @@ const deserializeAws_restJson1LineItemListDefinition = (output, context) => {
|
|
|
1256
2620
|
return deserializeAws_restJson1LineItem(entry, context);
|
|
1257
2621
|
});
|
|
1258
2622
|
};
|
|
2623
|
+
const deserializeAws_restJson1LineItemStatusCounts = (output, context) => {
|
|
2624
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2625
|
+
if (value === null) {
|
|
2626
|
+
return acc;
|
|
2627
|
+
}
|
|
2628
|
+
return {
|
|
2629
|
+
...acc,
|
|
2630
|
+
[key]: smithy_client_1.expectInt32(value),
|
|
2631
|
+
};
|
|
2632
|
+
}, {});
|
|
2633
|
+
};
|
|
1259
2634
|
const deserializeAws_restJson1Order = (output, context) => {
|
|
1260
2635
|
return {
|
|
1261
2636
|
LineItems: output.LineItems !== undefined && output.LineItems !== null
|
|
@@ -1273,6 +2648,33 @@ const deserializeAws_restJson1Order = (output, context) => {
|
|
|
1273
2648
|
Status: smithy_client_1.expectString(output.Status),
|
|
1274
2649
|
};
|
|
1275
2650
|
};
|
|
2651
|
+
const deserializeAws_restJson1OrderSummary = (output, context) => {
|
|
2652
|
+
return {
|
|
2653
|
+
LineItemCountsByStatus: output.LineItemCountsByStatus !== undefined && output.LineItemCountsByStatus !== null
|
|
2654
|
+
? deserializeAws_restJson1LineItemStatusCounts(output.LineItemCountsByStatus, context)
|
|
2655
|
+
: undefined,
|
|
2656
|
+
OrderFulfilledDate: output.OrderFulfilledDate !== undefined && output.OrderFulfilledDate !== null
|
|
2657
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.OrderFulfilledDate)))
|
|
2658
|
+
: undefined,
|
|
2659
|
+
OrderId: smithy_client_1.expectString(output.OrderId),
|
|
2660
|
+
OrderSubmissionDate: output.OrderSubmissionDate !== undefined && output.OrderSubmissionDate !== null
|
|
2661
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.OrderSubmissionDate)))
|
|
2662
|
+
: undefined,
|
|
2663
|
+
OrderType: smithy_client_1.expectString(output.OrderType),
|
|
2664
|
+
OutpostId: smithy_client_1.expectString(output.OutpostId),
|
|
2665
|
+
Status: smithy_client_1.expectString(output.Status),
|
|
2666
|
+
};
|
|
2667
|
+
};
|
|
2668
|
+
const deserializeAws_restJson1OrderSummaryListDefinition = (output, context) => {
|
|
2669
|
+
return (output || [])
|
|
2670
|
+
.filter((e) => e != null)
|
|
2671
|
+
.map((entry) => {
|
|
2672
|
+
if (entry === null) {
|
|
2673
|
+
return null;
|
|
2674
|
+
}
|
|
2675
|
+
return deserializeAws_restJson1OrderSummary(entry, context);
|
|
2676
|
+
});
|
|
2677
|
+
};
|
|
1276
2678
|
const deserializeAws_restJson1Outpost = (output, context) => {
|
|
1277
2679
|
return {
|
|
1278
2680
|
AvailabilityZone: smithy_client_1.expectString(output.AvailabilityZone),
|
|
@@ -1285,6 +2687,7 @@ const deserializeAws_restJson1Outpost = (output, context) => {
|
|
|
1285
2687
|
OwnerId: smithy_client_1.expectString(output.OwnerId),
|
|
1286
2688
|
SiteArn: smithy_client_1.expectString(output.SiteArn),
|
|
1287
2689
|
SiteId: smithy_client_1.expectString(output.SiteId),
|
|
2690
|
+
SupportedHardwareType: smithy_client_1.expectString(output.SupportedHardwareType),
|
|
1288
2691
|
Tags: output.Tags !== undefined && output.Tags !== null
|
|
1289
2692
|
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
1290
2693
|
: undefined,
|
|
@@ -1300,11 +2703,31 @@ const deserializeAws_restJson1outpostListDefinition = (output, context) => {
|
|
|
1300
2703
|
return deserializeAws_restJson1Outpost(entry, context);
|
|
1301
2704
|
});
|
|
1302
2705
|
};
|
|
2706
|
+
const deserializeAws_restJson1RackPhysicalProperties = (output, context) => {
|
|
2707
|
+
return {
|
|
2708
|
+
FiberOpticCableType: smithy_client_1.expectString(output.FiberOpticCableType),
|
|
2709
|
+
MaximumSupportedWeightLbs: smithy_client_1.expectString(output.MaximumSupportedWeightLbs),
|
|
2710
|
+
OpticalStandard: smithy_client_1.expectString(output.OpticalStandard),
|
|
2711
|
+
PowerConnector: smithy_client_1.expectString(output.PowerConnector),
|
|
2712
|
+
PowerDrawKva: smithy_client_1.expectString(output.PowerDrawKva),
|
|
2713
|
+
PowerFeedDrop: smithy_client_1.expectString(output.PowerFeedDrop),
|
|
2714
|
+
PowerPhase: smithy_client_1.expectString(output.PowerPhase),
|
|
2715
|
+
UplinkCount: smithy_client_1.expectString(output.UplinkCount),
|
|
2716
|
+
UplinkGbps: smithy_client_1.expectString(output.UplinkGbps),
|
|
2717
|
+
};
|
|
2718
|
+
};
|
|
1303
2719
|
const deserializeAws_restJson1Site = (output, context) => {
|
|
1304
2720
|
return {
|
|
1305
2721
|
AccountId: smithy_client_1.expectString(output.AccountId),
|
|
1306
2722
|
Description: smithy_client_1.expectString(output.Description),
|
|
1307
2723
|
Name: smithy_client_1.expectString(output.Name),
|
|
2724
|
+
Notes: smithy_client_1.expectString(output.Notes),
|
|
2725
|
+
OperatingAddressCity: smithy_client_1.expectString(output.OperatingAddressCity),
|
|
2726
|
+
OperatingAddressCountryCode: smithy_client_1.expectString(output.OperatingAddressCountryCode),
|
|
2727
|
+
OperatingAddressStateOrRegion: smithy_client_1.expectString(output.OperatingAddressStateOrRegion),
|
|
2728
|
+
RackPhysicalProperties: output.RackPhysicalProperties !== undefined && output.RackPhysicalProperties !== null
|
|
2729
|
+
? deserializeAws_restJson1RackPhysicalProperties(output.RackPhysicalProperties, context)
|
|
2730
|
+
: undefined,
|
|
1308
2731
|
SiteArn: smithy_client_1.expectString(output.SiteArn),
|
|
1309
2732
|
SiteId: smithy_client_1.expectString(output.SiteId),
|
|
1310
2733
|
Tags: output.Tags !== undefined && output.Tags !== null
|
|
@@ -1322,6 +2745,26 @@ const deserializeAws_restJson1siteListDefinition = (output, context) => {
|
|
|
1322
2745
|
return deserializeAws_restJson1Site(entry, context);
|
|
1323
2746
|
});
|
|
1324
2747
|
};
|
|
2748
|
+
const deserializeAws_restJson1SupportedStorageList = (output, context) => {
|
|
2749
|
+
return (output || [])
|
|
2750
|
+
.filter((e) => e != null)
|
|
2751
|
+
.map((entry) => {
|
|
2752
|
+
if (entry === null) {
|
|
2753
|
+
return null;
|
|
2754
|
+
}
|
|
2755
|
+
return smithy_client_1.expectString(entry);
|
|
2756
|
+
});
|
|
2757
|
+
};
|
|
2758
|
+
const deserializeAws_restJson1SupportedUplinkGbpsListDefinition = (output, context) => {
|
|
2759
|
+
return (output || [])
|
|
2760
|
+
.filter((e) => e != null)
|
|
2761
|
+
.map((entry) => {
|
|
2762
|
+
if (entry === null) {
|
|
2763
|
+
return null;
|
|
2764
|
+
}
|
|
2765
|
+
return smithy_client_1.expectInt32(entry);
|
|
2766
|
+
});
|
|
2767
|
+
};
|
|
1325
2768
|
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1326
2769
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1327
2770
|
if (value === null) {
|