@aws-sdk/client-outposts 3.40.0 → 3.44.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.
Files changed (90) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +10 -10
  3. package/dist-cjs/Outposts.js +165 -0
  4. package/dist-cjs/commands/CancelOrderCommand.js +36 -0
  5. package/dist-cjs/commands/CreateSiteCommand.js +36 -0
  6. package/dist-cjs/commands/GetCatalogItemCommand.js +36 -0
  7. package/dist-cjs/commands/GetOrderCommand.js +36 -0
  8. package/dist-cjs/commands/GetSiteAddressCommand.js +36 -0
  9. package/dist-cjs/commands/GetSiteCommand.js +36 -0
  10. package/dist-cjs/commands/ListCatalogItemsCommand.js +36 -0
  11. package/dist-cjs/commands/ListOrdersCommand.js +36 -0
  12. package/dist-cjs/commands/UpdateSiteAddressCommand.js +36 -0
  13. package/dist-cjs/commands/UpdateSiteCommand.js +36 -0
  14. package/dist-cjs/commands/UpdateSiteRackPhysicalPropertiesCommand.js +36 -0
  15. package/dist-cjs/commands/index.js +11 -0
  16. package/dist-cjs/endpoints.js +8 -0
  17. package/dist-cjs/models/models_0.js +306 -25
  18. package/dist-cjs/pagination/ListCatalogItemsPaginator.js +35 -0
  19. package/dist-cjs/pagination/ListOrdersPaginator.js +35 -0
  20. package/dist-cjs/pagination/index.js +2 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +1432 -103
  22. package/dist-es/Outposts.js +165 -0
  23. package/dist-es/commands/CancelOrderCommand.js +39 -0
  24. package/dist-es/commands/CreateSiteCommand.js +39 -0
  25. package/dist-es/commands/GetCatalogItemCommand.js +39 -0
  26. package/dist-es/commands/GetOrderCommand.js +39 -0
  27. package/dist-es/commands/GetSiteAddressCommand.js +39 -0
  28. package/dist-es/commands/GetSiteCommand.js +39 -0
  29. package/dist-es/commands/ListCatalogItemsCommand.js +39 -0
  30. package/dist-es/commands/ListOrdersCommand.js +39 -0
  31. package/dist-es/commands/UpdateSiteAddressCommand.js +39 -0
  32. package/dist-es/commands/UpdateSiteCommand.js +39 -0
  33. package/dist-es/commands/UpdateSiteRackPhysicalPropertiesCommand.js +39 -0
  34. package/dist-es/commands/index.js +11 -0
  35. package/dist-es/endpoints.js +8 -0
  36. package/dist-es/models/models_0.js +242 -16
  37. package/dist-es/pagination/ListCatalogItemsPaginator.js +74 -0
  38. package/dist-es/pagination/ListOrdersPaginator.js +74 -0
  39. package/dist-es/pagination/index.js +2 -0
  40. package/dist-es/protocols/Aws_restJson1.js +1642 -167
  41. package/dist-types/Outposts.d.ts +114 -6
  42. package/dist-types/OutpostsClient.d.ts +16 -5
  43. package/dist-types/commands/CancelOrderCommand.d.ts +37 -0
  44. package/dist-types/commands/CreateOrderCommand.d.ts +1 -1
  45. package/dist-types/commands/CreateOutpostCommand.d.ts +1 -1
  46. package/dist-types/commands/CreateSiteCommand.d.ts +37 -0
  47. package/dist-types/commands/DeleteOutpostCommand.d.ts +1 -1
  48. package/dist-types/commands/DeleteSiteCommand.d.ts +1 -1
  49. package/dist-types/commands/GetCatalogItemCommand.d.ts +35 -0
  50. package/dist-types/commands/GetOrderCommand.d.ts +35 -0
  51. package/dist-types/commands/GetOutpostCommand.d.ts +1 -1
  52. package/dist-types/commands/GetOutpostInstanceTypesCommand.d.ts +1 -1
  53. package/dist-types/commands/GetSiteAddressCommand.d.ts +37 -0
  54. package/dist-types/commands/GetSiteCommand.d.ts +37 -0
  55. package/dist-types/commands/ListCatalogItemsCommand.d.ts +39 -0
  56. package/dist-types/commands/ListOrdersCommand.d.ts +36 -0
  57. package/dist-types/commands/ListOutpostsCommand.d.ts +3 -3
  58. package/dist-types/commands/ListSitesCommand.d.ts +2 -2
  59. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  60. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  61. package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
  62. package/dist-types/commands/UpdateSiteAddressCommand.d.ts +46 -0
  63. package/dist-types/commands/UpdateSiteCommand.d.ts +37 -0
  64. package/dist-types/commands/UpdateSiteRackPhysicalPropertiesCommand.d.ts +40 -0
  65. package/dist-types/commands/index.d.ts +11 -0
  66. package/dist-types/models/models_0.d.ts +1144 -146
  67. package/dist-types/pagination/ListCatalogItemsPaginator.d.ts +4 -0
  68. package/dist-types/pagination/ListOrdersPaginator.d.ts +4 -0
  69. package/dist-types/pagination/index.d.ts +2 -0
  70. package/dist-types/protocols/Aws_restJson1.d.ts +33 -0
  71. package/dist-types/ts3.4/Outposts.d.ts +55 -0
  72. package/dist-types/ts3.4/OutpostsClient.d.ts +13 -2
  73. package/dist-types/ts3.4/commands/CancelOrderCommand.d.ts +17 -0
  74. package/dist-types/ts3.4/commands/CreateSiteCommand.d.ts +17 -0
  75. package/dist-types/ts3.4/commands/GetCatalogItemCommand.d.ts +17 -0
  76. package/dist-types/ts3.4/commands/GetOrderCommand.d.ts +17 -0
  77. package/dist-types/ts3.4/commands/GetSiteAddressCommand.d.ts +17 -0
  78. package/dist-types/ts3.4/commands/GetSiteCommand.d.ts +17 -0
  79. package/dist-types/ts3.4/commands/ListCatalogItemsCommand.d.ts +17 -0
  80. package/dist-types/ts3.4/commands/ListOrdersCommand.d.ts +17 -0
  81. package/dist-types/ts3.4/commands/UpdateSiteAddressCommand.d.ts +17 -0
  82. package/dist-types/ts3.4/commands/UpdateSiteCommand.d.ts +17 -0
  83. package/dist-types/ts3.4/commands/UpdateSiteRackPhysicalPropertiesCommand.d.ts +17 -0
  84. package/dist-types/ts3.4/commands/index.d.ts +11 -0
  85. package/dist-types/ts3.4/models/models_0.d.ts +518 -51
  86. package/dist-types/ts3.4/pagination/ListCatalogItemsPaginator.d.ts +4 -0
  87. package/dist-types/ts3.4/pagination/ListOrdersPaginator.d.ts +4 -0
  88. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  89. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +33 -0
  90. package/package.json +4 -4
@@ -1,6 +1,37 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
3
+ import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
4
+ export var serializeAws_restJson1CancelOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
5
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
6
+ return __generator(this, function (_c) {
7
+ switch (_c.label) {
8
+ case 0: return [4, context.endpoint()];
9
+ case 1:
10
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
11
+ headers = {};
12
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/orders/{OrderId}/cancel";
13
+ if (input.OrderId !== undefined) {
14
+ labelValue = input.OrderId;
15
+ if (labelValue.length <= 0) {
16
+ throw new Error("Empty value provided for input HTTP label: OrderId.");
17
+ }
18
+ resolvedPath = resolvedPath.replace("{OrderId}", __extendedEncodeURIComponent(labelValue));
19
+ }
20
+ else {
21
+ throw new Error("No value provided for input HTTP label: OrderId.");
22
+ }
23
+ return [2, new __HttpRequest({
24
+ protocol: protocol,
25
+ hostname: hostname,
26
+ port: port,
27
+ method: "POST",
28
+ headers: headers,
29
+ path: resolvedPath,
30
+ body: body,
31
+ })];
32
+ }
33
+ });
34
+ }); };
4
35
  export var serializeAws_restJson1CreateOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
5
36
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
6
37
  return __generator(this, function (_c) {
@@ -40,9 +71,43 @@ export var serializeAws_restJson1CreateOutpostCommand = function (input, context
40
71
  "content-type": "application/json",
41
72
  };
42
73
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/outposts";
43
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AvailabilityZone !== undefined &&
74
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AvailabilityZone !== undefined &&
44
75
  input.AvailabilityZone !== null && { AvailabilityZone: input.AvailabilityZone })), (input.AvailabilityZoneId !== undefined &&
45
- input.AvailabilityZoneId !== null && { AvailabilityZoneId: input.AvailabilityZoneId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
76
+ input.AvailabilityZoneId !== null && { AvailabilityZoneId: input.AvailabilityZoneId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.SupportedHardwareType !== undefined &&
77
+ input.SupportedHardwareType !== null && { SupportedHardwareType: input.SupportedHardwareType })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
78
+ return [2, new __HttpRequest({
79
+ protocol: protocol,
80
+ hostname: hostname,
81
+ port: port,
82
+ method: "POST",
83
+ headers: headers,
84
+ path: resolvedPath,
85
+ body: body,
86
+ })];
87
+ }
88
+ });
89
+ }); };
90
+ export var serializeAws_restJson1CreateSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
91
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
92
+ return __generator(this, function (_c) {
93
+ switch (_c.label) {
94
+ case 0: return [4, context.endpoint()];
95
+ case 1:
96
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
97
+ headers = {
98
+ "content-type": "application/json",
99
+ };
100
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites";
101
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes })), (input.OperatingAddress !== undefined &&
102
+ input.OperatingAddress !== null && {
103
+ OperatingAddress: serializeAws_restJson1Address(input.OperatingAddress, context),
104
+ })), (input.RackPhysicalProperties !== undefined &&
105
+ input.RackPhysicalProperties !== null && {
106
+ RackPhysicalProperties: serializeAws_restJson1RackPhysicalProperties(input.RackPhysicalProperties, context),
107
+ })), (input.ShippingAddress !== undefined &&
108
+ input.ShippingAddress !== null && {
109
+ ShippingAddress: serializeAws_restJson1Address(input.ShippingAddress, context),
110
+ })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
46
111
  return [2, new __HttpRequest({
47
112
  protocol: protocol,
48
113
  hostname: hostname,
@@ -117,6 +182,68 @@ export var serializeAws_restJson1DeleteSiteCommand = function (input, context) {
117
182
  }
118
183
  });
119
184
  }); };
185
+ export var serializeAws_restJson1GetCatalogItemCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
186
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
187
+ return __generator(this, function (_c) {
188
+ switch (_c.label) {
189
+ case 0: return [4, context.endpoint()];
190
+ case 1:
191
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
192
+ headers = {};
193
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/catalog/item/{CatalogItemId}";
194
+ if (input.CatalogItemId !== undefined) {
195
+ labelValue = input.CatalogItemId;
196
+ if (labelValue.length <= 0) {
197
+ throw new Error("Empty value provided for input HTTP label: CatalogItemId.");
198
+ }
199
+ resolvedPath = resolvedPath.replace("{CatalogItemId}", __extendedEncodeURIComponent(labelValue));
200
+ }
201
+ else {
202
+ throw new Error("No value provided for input HTTP label: CatalogItemId.");
203
+ }
204
+ return [2, new __HttpRequest({
205
+ protocol: protocol,
206
+ hostname: hostname,
207
+ port: port,
208
+ method: "GET",
209
+ headers: headers,
210
+ path: resolvedPath,
211
+ body: body,
212
+ })];
213
+ }
214
+ });
215
+ }); };
216
+ export var serializeAws_restJson1GetOrderCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
217
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
218
+ return __generator(this, function (_c) {
219
+ switch (_c.label) {
220
+ case 0: return [4, context.endpoint()];
221
+ case 1:
222
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
223
+ headers = {};
224
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/orders/{OrderId}";
225
+ if (input.OrderId !== undefined) {
226
+ labelValue = input.OrderId;
227
+ if (labelValue.length <= 0) {
228
+ throw new Error("Empty value provided for input HTTP label: OrderId.");
229
+ }
230
+ resolvedPath = resolvedPath.replace("{OrderId}", __extendedEncodeURIComponent(labelValue));
231
+ }
232
+ else {
233
+ throw new Error("No value provided for input HTTP label: OrderId.");
234
+ }
235
+ return [2, new __HttpRequest({
236
+ protocol: protocol,
237
+ hostname: hostname,
238
+ port: port,
239
+ method: "GET",
240
+ headers: headers,
241
+ path: resolvedPath,
242
+ body: body,
243
+ })];
244
+ }
245
+ });
246
+ }); };
120
247
  export var serializeAws_restJson1GetOutpostCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
121
248
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
122
249
  return __generator(this, function (_c) {
@@ -181,6 +308,122 @@ export var serializeAws_restJson1GetOutpostInstanceTypesCommand = function (inpu
181
308
  }
182
309
  });
183
310
  }); };
311
+ export var serializeAws_restJson1GetSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
312
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
313
+ return __generator(this, function (_c) {
314
+ switch (_c.label) {
315
+ case 0: return [4, context.endpoint()];
316
+ case 1:
317
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
318
+ headers = {};
319
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}";
320
+ if (input.SiteId !== undefined) {
321
+ labelValue = input.SiteId;
322
+ if (labelValue.length <= 0) {
323
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
324
+ }
325
+ resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
326
+ }
327
+ else {
328
+ throw new Error("No value provided for input HTTP label: SiteId.");
329
+ }
330
+ return [2, new __HttpRequest({
331
+ protocol: protocol,
332
+ hostname: hostname,
333
+ port: port,
334
+ method: "GET",
335
+ headers: headers,
336
+ path: resolvedPath,
337
+ body: body,
338
+ })];
339
+ }
340
+ });
341
+ }); };
342
+ export var serializeAws_restJson1GetSiteAddressCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
343
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
344
+ return __generator(this, function (_c) {
345
+ switch (_c.label) {
346
+ case 0: return [4, context.endpoint()];
347
+ case 1:
348
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
349
+ headers = {};
350
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}/address";
351
+ if (input.SiteId !== undefined) {
352
+ labelValue = input.SiteId;
353
+ if (labelValue.length <= 0) {
354
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
355
+ }
356
+ resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
357
+ }
358
+ else {
359
+ throw new Error("No value provided for input HTTP label: SiteId.");
360
+ }
361
+ query = __assign({}, (input.AddressType !== undefined && { AddressType: input.AddressType }));
362
+ return [2, new __HttpRequest({
363
+ protocol: protocol,
364
+ hostname: hostname,
365
+ port: port,
366
+ method: "GET",
367
+ headers: headers,
368
+ path: resolvedPath,
369
+ query: query,
370
+ body: body,
371
+ })];
372
+ }
373
+ });
374
+ }); };
375
+ export var serializeAws_restJson1ListCatalogItemsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
376
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
377
+ return __generator(this, function (_c) {
378
+ switch (_c.label) {
379
+ case 0: return [4, context.endpoint()];
380
+ case 1:
381
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
382
+ headers = {};
383
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/catalog/items";
384
+ query = __assign(__assign(__assign(__assign(__assign({}, (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() })), (input.ItemClassFilter !== undefined && {
385
+ ItemClassFilter: (input.ItemClassFilter || []).map(function (_entry) { return _entry; }),
386
+ })), (input.SupportedStorageFilter !== undefined && {
387
+ SupportedStorageFilter: (input.SupportedStorageFilter || []).map(function (_entry) { return _entry; }),
388
+ })), (input.EC2FamilyFilter !== undefined && {
389
+ EC2FamilyFilter: (input.EC2FamilyFilter || []).map(function (_entry) { return _entry; }),
390
+ }));
391
+ return [2, new __HttpRequest({
392
+ protocol: protocol,
393
+ hostname: hostname,
394
+ port: port,
395
+ method: "GET",
396
+ headers: headers,
397
+ path: resolvedPath,
398
+ query: query,
399
+ body: body,
400
+ })];
401
+ }
402
+ });
403
+ }); };
404
+ export var serializeAws_restJson1ListOrdersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
405
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
406
+ return __generator(this, function (_c) {
407
+ switch (_c.label) {
408
+ case 0: return [4, context.endpoint()];
409
+ case 1:
410
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
411
+ headers = {};
412
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/list-orders";
413
+ query = __assign(__assign(__assign({}, (input.OutpostIdentifierFilter !== undefined && { OutpostIdentifierFilter: input.OutpostIdentifierFilter })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
414
+ return [2, new __HttpRequest({
415
+ protocol: protocol,
416
+ hostname: hostname,
417
+ port: port,
418
+ method: "GET",
419
+ headers: headers,
420
+ path: resolvedPath,
421
+ query: query,
422
+ body: body,
423
+ })];
424
+ }
425
+ });
426
+ }); };
184
427
  export var serializeAws_restJson1ListOutpostsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
185
428
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
186
429
  return __generator(this, function (_c) {
@@ -331,47 +574,242 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
331
574
  }
332
575
  });
333
576
  }); };
334
- export var deserializeAws_restJson1CreateOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
335
- var contents, data, _a, _b;
577
+ export var serializeAws_restJson1UpdateSiteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
578
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
336
579
  return __generator(this, function (_c) {
337
580
  switch (_c.label) {
338
- case 0:
339
- if (output.statusCode !== 200 && output.statusCode >= 300) {
340
- return [2, deserializeAws_restJson1CreateOrderCommandError(output, context)];
341
- }
342
- contents = {
343
- $metadata: deserializeMetadata(output),
344
- Order: undefined,
345
- };
346
- _a = __expectNonNull;
347
- _b = __expectObject;
348
- return [4, parseBody(output.body, context)];
581
+ case 0: return [4, context.endpoint()];
349
582
  case 1:
350
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
351
- if (data.Order !== undefined && data.Order !== null) {
352
- contents.Order = deserializeAws_restJson1Order(data.Order, context);
583
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
584
+ headers = {
585
+ "content-type": "application/json",
586
+ };
587
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}";
588
+ if (input.SiteId !== undefined) {
589
+ labelValue = input.SiteId;
590
+ if (labelValue.length <= 0) {
591
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
592
+ }
593
+ resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
353
594
  }
354
- return [2, Promise.resolve(contents)];
595
+ else {
596
+ throw new Error("No value provided for input HTTP label: SiteId.");
597
+ }
598
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes })));
599
+ return [2, new __HttpRequest({
600
+ protocol: protocol,
601
+ hostname: hostname,
602
+ port: port,
603
+ method: "PATCH",
604
+ headers: headers,
605
+ path: resolvedPath,
606
+ body: body,
607
+ })];
355
608
  }
356
609
  });
357
610
  }); };
358
- var deserializeAws_restJson1CreateOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
359
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
360
- var _j;
361
- return __generator(this, function (_k) {
362
- switch (_k.label) {
363
- case 0:
364
- _a = [__assign({}, output)];
365
- _j = {};
366
- return [4, parseBody(output.body, context)];
611
+ export var serializeAws_restJson1UpdateSiteAddressCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
612
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
613
+ return __generator(this, function (_c) {
614
+ switch (_c.label) {
615
+ case 0: return [4, context.endpoint()];
367
616
  case 1:
368
- parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
369
- errorCode = "UnknownError";
370
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
371
- _b = errorCode;
372
- switch (_b) {
373
- case "AccessDeniedException": return [3, 2];
374
- case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
617
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
618
+ headers = {
619
+ "content-type": "application/json",
620
+ };
621
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}/address";
622
+ if (input.SiteId !== undefined) {
623
+ labelValue = input.SiteId;
624
+ if (labelValue.length <= 0) {
625
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
626
+ }
627
+ resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
628
+ }
629
+ else {
630
+ throw new Error("No value provided for input HTTP label: SiteId.");
631
+ }
632
+ body = JSON.stringify(__assign(__assign({}, (input.Address !== undefined &&
633
+ input.Address !== null && { Address: serializeAws_restJson1Address(input.Address, context) })), (input.AddressType !== undefined && input.AddressType !== null && { AddressType: input.AddressType })));
634
+ return [2, new __HttpRequest({
635
+ protocol: protocol,
636
+ hostname: hostname,
637
+ port: port,
638
+ method: "PUT",
639
+ headers: headers,
640
+ path: resolvedPath,
641
+ body: body,
642
+ })];
643
+ }
644
+ });
645
+ }); };
646
+ export var serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
647
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
648
+ return __generator(this, function (_c) {
649
+ switch (_c.label) {
650
+ case 0: return [4, context.endpoint()];
651
+ case 1:
652
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
653
+ headers = {
654
+ "content-type": "application/json",
655
+ };
656
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/sites/{SiteId}/rackPhysicalProperties";
657
+ if (input.SiteId !== undefined) {
658
+ labelValue = input.SiteId;
659
+ if (labelValue.length <= 0) {
660
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
661
+ }
662
+ resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue));
663
+ }
664
+ else {
665
+ throw new Error("No value provided for input HTTP label: SiteId.");
666
+ }
667
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.FiberOpticCableType !== undefined &&
668
+ input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType })), (input.MaximumSupportedWeightLbs !== undefined &&
669
+ input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs })), (input.OpticalStandard !== undefined &&
670
+ input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard })), (input.PowerConnector !== undefined &&
671
+ input.PowerConnector !== null && { PowerConnector: input.PowerConnector })), (input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva })), (input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop })), (input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase })), (input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount })), (input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps })));
672
+ return [2, new __HttpRequest({
673
+ protocol: protocol,
674
+ hostname: hostname,
675
+ port: port,
676
+ method: "PATCH",
677
+ headers: headers,
678
+ path: resolvedPath,
679
+ body: body,
680
+ })];
681
+ }
682
+ });
683
+ }); };
684
+ export var deserializeAws_restJson1CancelOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
685
+ var contents;
686
+ return __generator(this, function (_a) {
687
+ switch (_a.label) {
688
+ case 0:
689
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
690
+ return [2, deserializeAws_restJson1CancelOrderCommandError(output, context)];
691
+ }
692
+ contents = {
693
+ $metadata: deserializeMetadata(output),
694
+ };
695
+ return [4, collectBody(output.body, context)];
696
+ case 1:
697
+ _a.sent();
698
+ return [2, Promise.resolve(contents)];
699
+ }
700
+ });
701
+ }); };
702
+ var deserializeAws_restJson1CancelOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
703
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
704
+ var _h;
705
+ return __generator(this, function (_j) {
706
+ switch (_j.label) {
707
+ case 0:
708
+ _a = [__assign({}, output)];
709
+ _h = {};
710
+ return [4, parseBody(output.body, context)];
711
+ case 1:
712
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
713
+ errorCode = "UnknownError";
714
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
715
+ _b = errorCode;
716
+ switch (_b) {
717
+ case "AccessDeniedException": return [3, 2];
718
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
719
+ case "ConflictException": return [3, 4];
720
+ case "com.amazonaws.outposts#ConflictException": return [3, 4];
721
+ case "InternalServerException": return [3, 6];
722
+ case "com.amazonaws.outposts#InternalServerException": return [3, 6];
723
+ case "NotFoundException": return [3, 8];
724
+ case "com.amazonaws.outposts#NotFoundException": return [3, 8];
725
+ case "ValidationException": return [3, 10];
726
+ case "com.amazonaws.outposts#ValidationException": return [3, 10];
727
+ }
728
+ return [3, 12];
729
+ case 2:
730
+ _c = [{}];
731
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
732
+ case 3:
733
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
734
+ return [3, 13];
735
+ case 4:
736
+ _d = [{}];
737
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
738
+ case 5:
739
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
740
+ return [3, 13];
741
+ case 6:
742
+ _e = [{}];
743
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
744
+ case 7:
745
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
746
+ return [3, 13];
747
+ case 8:
748
+ _f = [{}];
749
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
750
+ case 9:
751
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
752
+ return [3, 13];
753
+ case 10:
754
+ _g = [{}];
755
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
756
+ case 11:
757
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
758
+ return [3, 13];
759
+ case 12:
760
+ parsedBody = parsedOutput.body;
761
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
762
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
763
+ _j.label = 13;
764
+ case 13:
765
+ message = response.message || response.Message || errorCode;
766
+ response.message = message;
767
+ delete response.Message;
768
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
769
+ }
770
+ });
771
+ }); };
772
+ export var deserializeAws_restJson1CreateOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
773
+ var contents, data, _a, _b;
774
+ return __generator(this, function (_c) {
775
+ switch (_c.label) {
776
+ case 0:
777
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
778
+ return [2, deserializeAws_restJson1CreateOrderCommandError(output, context)];
779
+ }
780
+ contents = {
781
+ $metadata: deserializeMetadata(output),
782
+ Order: undefined,
783
+ };
784
+ _a = __expectNonNull;
785
+ _b = __expectObject;
786
+ return [4, parseBody(output.body, context)];
787
+ case 1:
788
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
789
+ if (data.Order !== undefined && data.Order !== null) {
790
+ contents.Order = deserializeAws_restJson1Order(data.Order, context);
791
+ }
792
+ return [2, Promise.resolve(contents)];
793
+ }
794
+ });
795
+ }); };
796
+ var deserializeAws_restJson1CreateOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
797
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
798
+ var _j;
799
+ return __generator(this, function (_k) {
800
+ switch (_k.label) {
801
+ case 0:
802
+ _a = [__assign({}, output)];
803
+ _j = {};
804
+ return [4, parseBody(output.body, context)];
805
+ case 1:
806
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
807
+ errorCode = "UnknownError";
808
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
809
+ _b = errorCode;
810
+ switch (_b) {
811
+ case "AccessDeniedException": return [3, 2];
812
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
375
813
  case "ConflictException": return [3, 4];
376
814
  case "com.amazonaws.outposts#ConflictException": return [3, 4];
377
815
  case "InternalServerException": return [3, 6];
@@ -535,25 +973,31 @@ var deserializeAws_restJson1CreateOutpostCommandError = function (output, contex
535
973
  }
536
974
  });
537
975
  }); };
538
- export var deserializeAws_restJson1DeleteOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
539
- var contents;
540
- return __generator(this, function (_a) {
541
- switch (_a.label) {
976
+ export var deserializeAws_restJson1CreateSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
977
+ var contents, data, _a, _b;
978
+ return __generator(this, function (_c) {
979
+ switch (_c.label) {
542
980
  case 0:
543
981
  if (output.statusCode !== 200 && output.statusCode >= 300) {
544
- return [2, deserializeAws_restJson1DeleteOutpostCommandError(output, context)];
982
+ return [2, deserializeAws_restJson1CreateSiteCommandError(output, context)];
545
983
  }
546
984
  contents = {
547
985
  $metadata: deserializeMetadata(output),
986
+ Site: undefined,
548
987
  };
549
- return [4, collectBody(output.body, context)];
988
+ _a = __expectNonNull;
989
+ _b = __expectObject;
990
+ return [4, parseBody(output.body, context)];
550
991
  case 1:
551
- _a.sent();
992
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
993
+ if (data.Site !== undefined && data.Site !== null) {
994
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
995
+ }
552
996
  return [2, Promise.resolve(contents)];
553
997
  }
554
998
  });
555
999
  }); };
556
- var deserializeAws_restJson1DeleteOutpostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1000
+ var deserializeAws_restJson1CreateSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
557
1001
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
558
1002
  var _h;
559
1003
  return __generator(this, function (_j) {
@@ -574,8 +1018,8 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
574
1018
  case "com.amazonaws.outposts#ConflictException": return [3, 4];
575
1019
  case "InternalServerException": return [3, 6];
576
1020
  case "com.amazonaws.outposts#InternalServerException": return [3, 6];
577
- case "NotFoundException": return [3, 8];
578
- case "com.amazonaws.outposts#NotFoundException": return [3, 8];
1021
+ case "ServiceQuotaExceededException": return [3, 8];
1022
+ case "com.amazonaws.outposts#ServiceQuotaExceededException": return [3, 8];
579
1023
  case "ValidationException": return [3, 10];
580
1024
  case "com.amazonaws.outposts#ValidationException": return [3, 10];
581
1025
  }
@@ -600,7 +1044,7 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
600
1044
  return [3, 13];
601
1045
  case 8:
602
1046
  _f = [{}];
603
- return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1047
+ return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
604
1048
  case 9:
605
1049
  response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
606
1050
  return [3, 13];
@@ -623,13 +1067,13 @@ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, contex
623
1067
  }
624
1068
  });
625
1069
  }); };
626
- export var deserializeAws_restJson1DeleteSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1070
+ export var deserializeAws_restJson1DeleteOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
627
1071
  var contents;
628
1072
  return __generator(this, function (_a) {
629
1073
  switch (_a.label) {
630
1074
  case 0:
631
1075
  if (output.statusCode !== 200 && output.statusCode >= 300) {
632
- return [2, deserializeAws_restJson1DeleteSiteCommandError(output, context)];
1076
+ return [2, deserializeAws_restJson1DeleteOutpostCommandError(output, context)];
633
1077
  }
634
1078
  contents = {
635
1079
  $metadata: deserializeMetadata(output),
@@ -641,7 +1085,7 @@ export var deserializeAws_restJson1DeleteSiteCommand = function (output, context
641
1085
  }
642
1086
  });
643
1087
  }); };
644
- var deserializeAws_restJson1DeleteSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1088
+ var deserializeAws_restJson1DeleteOutpostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
645
1089
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
646
1090
  var _h;
647
1091
  return __generator(this, function (_j) {
@@ -711,55 +1155,577 @@ var deserializeAws_restJson1DeleteSiteCommandError = function (output, context)
711
1155
  }
712
1156
  });
713
1157
  }); };
714
- export var deserializeAws_restJson1GetOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
715
- var contents, data, _a, _b;
716
- return __generator(this, function (_c) {
717
- switch (_c.label) {
1158
+ export var deserializeAws_restJson1DeleteSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1159
+ var contents;
1160
+ return __generator(this, function (_a) {
1161
+ switch (_a.label) {
718
1162
  case 0:
719
1163
  if (output.statusCode !== 200 && output.statusCode >= 300) {
720
- return [2, deserializeAws_restJson1GetOutpostCommandError(output, context)];
1164
+ return [2, deserializeAws_restJson1DeleteSiteCommandError(output, context)];
721
1165
  }
722
1166
  contents = {
723
1167
  $metadata: deserializeMetadata(output),
724
- Outpost: undefined,
725
1168
  };
726
- _a = __expectNonNull;
727
- _b = __expectObject;
728
- return [4, parseBody(output.body, context)];
1169
+ return [4, collectBody(output.body, context)];
729
1170
  case 1:
730
- data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
731
- if (data.Outpost !== undefined && data.Outpost !== null) {
732
- contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
733
- }
1171
+ _a.sent();
734
1172
  return [2, Promise.resolve(contents)];
735
1173
  }
736
1174
  });
737
1175
  }); };
738
- var deserializeAws_restJson1GetOutpostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
739
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
740
- var _g;
741
- return __generator(this, function (_h) {
742
- switch (_h.label) {
1176
+ var deserializeAws_restJson1DeleteSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1177
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
1178
+ var _h;
1179
+ return __generator(this, function (_j) {
1180
+ switch (_j.label) {
743
1181
  case 0:
744
1182
  _a = [__assign({}, output)];
745
- _g = {};
1183
+ _h = {};
746
1184
  return [4, parseBody(output.body, context)];
747
1185
  case 1:
748
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
1186
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
749
1187
  errorCode = "UnknownError";
750
1188
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
751
1189
  _b = errorCode;
752
1190
  switch (_b) {
753
1191
  case "AccessDeniedException": return [3, 2];
754
1192
  case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
755
- case "InternalServerException": return [3, 4];
756
- case "com.amazonaws.outposts#InternalServerException": return [3, 4];
757
- case "NotFoundException": return [3, 6];
758
- case "com.amazonaws.outposts#NotFoundException": return [3, 6];
759
- case "ValidationException": return [3, 8];
760
- case "com.amazonaws.outposts#ValidationException": return [3, 8];
1193
+ case "ConflictException": return [3, 4];
1194
+ case "com.amazonaws.outposts#ConflictException": return [3, 4];
1195
+ case "InternalServerException": return [3, 6];
1196
+ case "com.amazonaws.outposts#InternalServerException": return [3, 6];
1197
+ case "NotFoundException": return [3, 8];
1198
+ case "com.amazonaws.outposts#NotFoundException": return [3, 8];
1199
+ case "ValidationException": return [3, 10];
1200
+ case "com.amazonaws.outposts#ValidationException": return [3, 10];
761
1201
  }
762
- return [3, 10];
1202
+ return [3, 12];
1203
+ case 2:
1204
+ _c = [{}];
1205
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1206
+ case 3:
1207
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1208
+ return [3, 13];
1209
+ case 4:
1210
+ _d = [{}];
1211
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
1212
+ case 5:
1213
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1214
+ return [3, 13];
1215
+ case 6:
1216
+ _e = [{}];
1217
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1218
+ case 7:
1219
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1220
+ return [3, 13];
1221
+ case 8:
1222
+ _f = [{}];
1223
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1224
+ case 9:
1225
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1226
+ return [3, 13];
1227
+ case 10:
1228
+ _g = [{}];
1229
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1230
+ case 11:
1231
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1232
+ return [3, 13];
1233
+ case 12:
1234
+ parsedBody = parsedOutput.body;
1235
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1236
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1237
+ _j.label = 13;
1238
+ case 13:
1239
+ message = response.message || response.Message || errorCode;
1240
+ response.message = message;
1241
+ delete response.Message;
1242
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1243
+ }
1244
+ });
1245
+ }); };
1246
+ export var deserializeAws_restJson1GetCatalogItemCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1247
+ var contents, data, _a, _b;
1248
+ return __generator(this, function (_c) {
1249
+ switch (_c.label) {
1250
+ case 0:
1251
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1252
+ return [2, deserializeAws_restJson1GetCatalogItemCommandError(output, context)];
1253
+ }
1254
+ contents = {
1255
+ $metadata: deserializeMetadata(output),
1256
+ CatalogItem: undefined,
1257
+ };
1258
+ _a = __expectNonNull;
1259
+ _b = __expectObject;
1260
+ return [4, parseBody(output.body, context)];
1261
+ case 1:
1262
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1263
+ if (data.CatalogItem !== undefined && data.CatalogItem !== null) {
1264
+ contents.CatalogItem = deserializeAws_restJson1CatalogItem(data.CatalogItem, context);
1265
+ }
1266
+ return [2, Promise.resolve(contents)];
1267
+ }
1268
+ });
1269
+ }); };
1270
+ var deserializeAws_restJson1GetCatalogItemCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1271
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
1272
+ var _f;
1273
+ return __generator(this, function (_g) {
1274
+ switch (_g.label) {
1275
+ case 0:
1276
+ _a = [__assign({}, output)];
1277
+ _f = {};
1278
+ return [4, parseBody(output.body, context)];
1279
+ case 1:
1280
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
1281
+ errorCode = "UnknownError";
1282
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1283
+ _b = errorCode;
1284
+ switch (_b) {
1285
+ case "InternalServerException": return [3, 2];
1286
+ case "com.amazonaws.outposts#InternalServerException": return [3, 2];
1287
+ case "NotFoundException": return [3, 4];
1288
+ case "com.amazonaws.outposts#NotFoundException": return [3, 4];
1289
+ case "ValidationException": return [3, 6];
1290
+ case "com.amazonaws.outposts#ValidationException": return [3, 6];
1291
+ }
1292
+ return [3, 8];
1293
+ case 2:
1294
+ _c = [{}];
1295
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1296
+ case 3:
1297
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1298
+ return [3, 9];
1299
+ case 4:
1300
+ _d = [{}];
1301
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1302
+ case 5:
1303
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1304
+ return [3, 9];
1305
+ case 6:
1306
+ _e = [{}];
1307
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1308
+ case 7:
1309
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1310
+ return [3, 9];
1311
+ case 8:
1312
+ parsedBody = parsedOutput.body;
1313
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1314
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1315
+ _g.label = 9;
1316
+ case 9:
1317
+ message = response.message || response.Message || errorCode;
1318
+ response.message = message;
1319
+ delete response.Message;
1320
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1321
+ }
1322
+ });
1323
+ }); };
1324
+ export var deserializeAws_restJson1GetOrderCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1325
+ var contents, data, _a, _b;
1326
+ return __generator(this, function (_c) {
1327
+ switch (_c.label) {
1328
+ case 0:
1329
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1330
+ return [2, deserializeAws_restJson1GetOrderCommandError(output, context)];
1331
+ }
1332
+ contents = {
1333
+ $metadata: deserializeMetadata(output),
1334
+ Order: undefined,
1335
+ };
1336
+ _a = __expectNonNull;
1337
+ _b = __expectObject;
1338
+ return [4, parseBody(output.body, context)];
1339
+ case 1:
1340
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1341
+ if (data.Order !== undefined && data.Order !== null) {
1342
+ contents.Order = deserializeAws_restJson1Order(data.Order, context);
1343
+ }
1344
+ return [2, Promise.resolve(contents)];
1345
+ }
1346
+ });
1347
+ }); };
1348
+ var deserializeAws_restJson1GetOrderCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1349
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
1350
+ var _f;
1351
+ return __generator(this, function (_g) {
1352
+ switch (_g.label) {
1353
+ case 0:
1354
+ _a = [__assign({}, output)];
1355
+ _f = {};
1356
+ return [4, parseBody(output.body, context)];
1357
+ case 1:
1358
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
1359
+ errorCode = "UnknownError";
1360
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1361
+ _b = errorCode;
1362
+ switch (_b) {
1363
+ case "InternalServerException": return [3, 2];
1364
+ case "com.amazonaws.outposts#InternalServerException": return [3, 2];
1365
+ case "NotFoundException": return [3, 4];
1366
+ case "com.amazonaws.outposts#NotFoundException": return [3, 4];
1367
+ case "ValidationException": return [3, 6];
1368
+ case "com.amazonaws.outposts#ValidationException": return [3, 6];
1369
+ }
1370
+ return [3, 8];
1371
+ case 2:
1372
+ _c = [{}];
1373
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1374
+ case 3:
1375
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1376
+ return [3, 9];
1377
+ case 4:
1378
+ _d = [{}];
1379
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1380
+ case 5:
1381
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1382
+ return [3, 9];
1383
+ case 6:
1384
+ _e = [{}];
1385
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1386
+ case 7:
1387
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1388
+ return [3, 9];
1389
+ case 8:
1390
+ parsedBody = parsedOutput.body;
1391
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1392
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1393
+ _g.label = 9;
1394
+ case 9:
1395
+ message = response.message || response.Message || errorCode;
1396
+ response.message = message;
1397
+ delete response.Message;
1398
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1399
+ }
1400
+ });
1401
+ }); };
1402
+ export var deserializeAws_restJson1GetOutpostCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1403
+ var contents, data, _a, _b;
1404
+ return __generator(this, function (_c) {
1405
+ switch (_c.label) {
1406
+ case 0:
1407
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1408
+ return [2, deserializeAws_restJson1GetOutpostCommandError(output, context)];
1409
+ }
1410
+ contents = {
1411
+ $metadata: deserializeMetadata(output),
1412
+ Outpost: undefined,
1413
+ };
1414
+ _a = __expectNonNull;
1415
+ _b = __expectObject;
1416
+ return [4, parseBody(output.body, context)];
1417
+ case 1:
1418
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1419
+ if (data.Outpost !== undefined && data.Outpost !== null) {
1420
+ contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
1421
+ }
1422
+ return [2, Promise.resolve(contents)];
1423
+ }
1424
+ });
1425
+ }); };
1426
+ var deserializeAws_restJson1GetOutpostCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1427
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
1428
+ var _g;
1429
+ return __generator(this, function (_h) {
1430
+ switch (_h.label) {
1431
+ case 0:
1432
+ _a = [__assign({}, output)];
1433
+ _g = {};
1434
+ return [4, parseBody(output.body, context)];
1435
+ case 1:
1436
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
1437
+ errorCode = "UnknownError";
1438
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1439
+ _b = errorCode;
1440
+ switch (_b) {
1441
+ case "AccessDeniedException": return [3, 2];
1442
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
1443
+ case "InternalServerException": return [3, 4];
1444
+ case "com.amazonaws.outposts#InternalServerException": return [3, 4];
1445
+ case "NotFoundException": return [3, 6];
1446
+ case "com.amazonaws.outposts#NotFoundException": return [3, 6];
1447
+ case "ValidationException": return [3, 8];
1448
+ case "com.amazonaws.outposts#ValidationException": return [3, 8];
1449
+ }
1450
+ return [3, 10];
1451
+ case 2:
1452
+ _c = [{}];
1453
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1454
+ case 3:
1455
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1456
+ return [3, 11];
1457
+ case 4:
1458
+ _d = [{}];
1459
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1460
+ case 5:
1461
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1462
+ return [3, 11];
1463
+ case 6:
1464
+ _e = [{}];
1465
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1466
+ case 7:
1467
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1468
+ return [3, 11];
1469
+ case 8:
1470
+ _f = [{}];
1471
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1472
+ case 9:
1473
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1474
+ return [3, 11];
1475
+ case 10:
1476
+ parsedBody = parsedOutput.body;
1477
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1478
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1479
+ _h.label = 11;
1480
+ case 11:
1481
+ message = response.message || response.Message || errorCode;
1482
+ response.message = message;
1483
+ delete response.Message;
1484
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1485
+ }
1486
+ });
1487
+ }); };
1488
+ export var deserializeAws_restJson1GetOutpostInstanceTypesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1489
+ var contents, data, _a, _b;
1490
+ return __generator(this, function (_c) {
1491
+ switch (_c.label) {
1492
+ case 0:
1493
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1494
+ return [2, deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context)];
1495
+ }
1496
+ contents = {
1497
+ $metadata: deserializeMetadata(output),
1498
+ InstanceTypes: undefined,
1499
+ NextToken: undefined,
1500
+ OutpostArn: undefined,
1501
+ OutpostId: undefined,
1502
+ };
1503
+ _a = __expectNonNull;
1504
+ _b = __expectObject;
1505
+ return [4, parseBody(output.body, context)];
1506
+ case 1:
1507
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1508
+ if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
1509
+ contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
1510
+ }
1511
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1512
+ contents.NextToken = __expectString(data.NextToken);
1513
+ }
1514
+ if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
1515
+ contents.OutpostArn = __expectString(data.OutpostArn);
1516
+ }
1517
+ if (data.OutpostId !== undefined && data.OutpostId !== null) {
1518
+ contents.OutpostId = __expectString(data.OutpostId);
1519
+ }
1520
+ return [2, Promise.resolve(contents)];
1521
+ }
1522
+ });
1523
+ }); };
1524
+ var deserializeAws_restJson1GetOutpostInstanceTypesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1525
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
1526
+ var _g;
1527
+ return __generator(this, function (_h) {
1528
+ switch (_h.label) {
1529
+ case 0:
1530
+ _a = [__assign({}, output)];
1531
+ _g = {};
1532
+ return [4, parseBody(output.body, context)];
1533
+ case 1:
1534
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
1535
+ errorCode = "UnknownError";
1536
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1537
+ _b = errorCode;
1538
+ switch (_b) {
1539
+ case "AccessDeniedException": return [3, 2];
1540
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
1541
+ case "InternalServerException": return [3, 4];
1542
+ case "com.amazonaws.outposts#InternalServerException": return [3, 4];
1543
+ case "NotFoundException": return [3, 6];
1544
+ case "com.amazonaws.outposts#NotFoundException": return [3, 6];
1545
+ case "ValidationException": return [3, 8];
1546
+ case "com.amazonaws.outposts#ValidationException": return [3, 8];
1547
+ }
1548
+ return [3, 10];
1549
+ case 2:
1550
+ _c = [{}];
1551
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1552
+ case 3:
1553
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1554
+ return [3, 11];
1555
+ case 4:
1556
+ _d = [{}];
1557
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1558
+ case 5:
1559
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1560
+ return [3, 11];
1561
+ case 6:
1562
+ _e = [{}];
1563
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1564
+ case 7:
1565
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1566
+ return [3, 11];
1567
+ case 8:
1568
+ _f = [{}];
1569
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1570
+ case 9:
1571
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1572
+ return [3, 11];
1573
+ case 10:
1574
+ parsedBody = parsedOutput.body;
1575
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1576
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1577
+ _h.label = 11;
1578
+ case 11:
1579
+ message = response.message || response.Message || errorCode;
1580
+ response.message = message;
1581
+ delete response.Message;
1582
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1583
+ }
1584
+ });
1585
+ }); };
1586
+ export var deserializeAws_restJson1GetSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1587
+ var contents, data, _a, _b;
1588
+ return __generator(this, function (_c) {
1589
+ switch (_c.label) {
1590
+ case 0:
1591
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1592
+ return [2, deserializeAws_restJson1GetSiteCommandError(output, context)];
1593
+ }
1594
+ contents = {
1595
+ $metadata: deserializeMetadata(output),
1596
+ Site: undefined,
1597
+ };
1598
+ _a = __expectNonNull;
1599
+ _b = __expectObject;
1600
+ return [4, parseBody(output.body, context)];
1601
+ case 1:
1602
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1603
+ if (data.Site !== undefined && data.Site !== null) {
1604
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
1605
+ }
1606
+ return [2, Promise.resolve(contents)];
1607
+ }
1608
+ });
1609
+ }); };
1610
+ var deserializeAws_restJson1GetSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1611
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
1612
+ var _g;
1613
+ return __generator(this, function (_h) {
1614
+ switch (_h.label) {
1615
+ case 0:
1616
+ _a = [__assign({}, output)];
1617
+ _g = {};
1618
+ return [4, parseBody(output.body, context)];
1619
+ case 1:
1620
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
1621
+ errorCode = "UnknownError";
1622
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1623
+ _b = errorCode;
1624
+ switch (_b) {
1625
+ case "AccessDeniedException": return [3, 2];
1626
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
1627
+ case "InternalServerException": return [3, 4];
1628
+ case "com.amazonaws.outposts#InternalServerException": return [3, 4];
1629
+ case "NotFoundException": return [3, 6];
1630
+ case "com.amazonaws.outposts#NotFoundException": return [3, 6];
1631
+ case "ValidationException": return [3, 8];
1632
+ case "com.amazonaws.outposts#ValidationException": return [3, 8];
1633
+ }
1634
+ return [3, 10];
1635
+ case 2:
1636
+ _c = [{}];
1637
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1638
+ case 3:
1639
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1640
+ return [3, 11];
1641
+ case 4:
1642
+ _d = [{}];
1643
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1644
+ case 5:
1645
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1646
+ return [3, 11];
1647
+ case 6:
1648
+ _e = [{}];
1649
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1650
+ case 7:
1651
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1652
+ return [3, 11];
1653
+ case 8:
1654
+ _f = [{}];
1655
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1656
+ case 9:
1657
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1658
+ return [3, 11];
1659
+ case 10:
1660
+ parsedBody = parsedOutput.body;
1661
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1662
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1663
+ _h.label = 11;
1664
+ case 11:
1665
+ message = response.message || response.Message || errorCode;
1666
+ response.message = message;
1667
+ delete response.Message;
1668
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1669
+ }
1670
+ });
1671
+ }); };
1672
+ export var deserializeAws_restJson1GetSiteAddressCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1673
+ var contents, data, _a, _b;
1674
+ return __generator(this, function (_c) {
1675
+ switch (_c.label) {
1676
+ case 0:
1677
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1678
+ return [2, deserializeAws_restJson1GetSiteAddressCommandError(output, context)];
1679
+ }
1680
+ contents = {
1681
+ $metadata: deserializeMetadata(output),
1682
+ Address: undefined,
1683
+ AddressType: undefined,
1684
+ SiteId: undefined,
1685
+ };
1686
+ _a = __expectNonNull;
1687
+ _b = __expectObject;
1688
+ return [4, parseBody(output.body, context)];
1689
+ case 1:
1690
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1691
+ if (data.Address !== undefined && data.Address !== null) {
1692
+ contents.Address = deserializeAws_restJson1Address(data.Address, context);
1693
+ }
1694
+ if (data.AddressType !== undefined && data.AddressType !== null) {
1695
+ contents.AddressType = __expectString(data.AddressType);
1696
+ }
1697
+ if (data.SiteId !== undefined && data.SiteId !== null) {
1698
+ contents.SiteId = __expectString(data.SiteId);
1699
+ }
1700
+ return [2, Promise.resolve(contents)];
1701
+ }
1702
+ });
1703
+ }); };
1704
+ var deserializeAws_restJson1GetSiteAddressCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1705
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
1706
+ var _g;
1707
+ return __generator(this, function (_h) {
1708
+ switch (_h.label) {
1709
+ case 0:
1710
+ _a = [__assign({}, output)];
1711
+ _g = {};
1712
+ return [4, parseBody(output.body, context)];
1713
+ case 1:
1714
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
1715
+ errorCode = "UnknownError";
1716
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1717
+ _b = errorCode;
1718
+ switch (_b) {
1719
+ case "AccessDeniedException": return [3, 2];
1720
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
1721
+ case "InternalServerException": return [3, 4];
1722
+ case "com.amazonaws.outposts#InternalServerException": return [3, 4];
1723
+ case "NotFoundException": return [3, 6];
1724
+ case "com.amazonaws.outposts#NotFoundException": return [3, 6];
1725
+ case "ValidationException": return [3, 8];
1726
+ case "com.amazonaws.outposts#ValidationException": return [3, 8];
1727
+ }
1728
+ return [3, 10];
763
1729
  case 2:
764
1730
  _c = [{}];
765
1731
  return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
@@ -781,15 +1747,97 @@ var deserializeAws_restJson1GetOutpostCommandError = function (output, context)
781
1747
  case 8:
782
1748
  _f = [{}];
783
1749
  return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
784
- case 9:
785
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
786
- return [3, 11];
787
- case 10:
1750
+ case 9:
1751
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1752
+ return [3, 11];
1753
+ case 10:
1754
+ parsedBody = parsedOutput.body;
1755
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1756
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1757
+ _h.label = 11;
1758
+ case 11:
1759
+ message = response.message || response.Message || errorCode;
1760
+ response.message = message;
1761
+ delete response.Message;
1762
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1763
+ }
1764
+ });
1765
+ }); };
1766
+ export var deserializeAws_restJson1ListCatalogItemsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1767
+ var contents, data, _a, _b;
1768
+ return __generator(this, function (_c) {
1769
+ switch (_c.label) {
1770
+ case 0:
1771
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1772
+ return [2, deserializeAws_restJson1ListCatalogItemsCommandError(output, context)];
1773
+ }
1774
+ contents = {
1775
+ $metadata: deserializeMetadata(output),
1776
+ CatalogItems: undefined,
1777
+ NextToken: undefined,
1778
+ };
1779
+ _a = __expectNonNull;
1780
+ _b = __expectObject;
1781
+ return [4, parseBody(output.body, context)];
1782
+ case 1:
1783
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1784
+ if (data.CatalogItems !== undefined && data.CatalogItems !== null) {
1785
+ contents.CatalogItems = deserializeAws_restJson1CatalogItemListDefinition(data.CatalogItems, context);
1786
+ }
1787
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1788
+ contents.NextToken = __expectString(data.NextToken);
1789
+ }
1790
+ return [2, Promise.resolve(contents)];
1791
+ }
1792
+ });
1793
+ }); };
1794
+ var deserializeAws_restJson1ListCatalogItemsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1795
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
1796
+ var _f;
1797
+ return __generator(this, function (_g) {
1798
+ switch (_g.label) {
1799
+ case 0:
1800
+ _a = [__assign({}, output)];
1801
+ _f = {};
1802
+ return [4, parseBody(output.body, context)];
1803
+ case 1:
1804
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
1805
+ errorCode = "UnknownError";
1806
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1807
+ _b = errorCode;
1808
+ switch (_b) {
1809
+ case "InternalServerException": return [3, 2];
1810
+ case "com.amazonaws.outposts#InternalServerException": return [3, 2];
1811
+ case "NotFoundException": return [3, 4];
1812
+ case "com.amazonaws.outposts#NotFoundException": return [3, 4];
1813
+ case "ValidationException": return [3, 6];
1814
+ case "com.amazonaws.outposts#ValidationException": return [3, 6];
1815
+ }
1816
+ return [3, 8];
1817
+ case 2:
1818
+ _c = [{}];
1819
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1820
+ case 3:
1821
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1822
+ return [3, 9];
1823
+ case 4:
1824
+ _d = [{}];
1825
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
1826
+ case 5:
1827
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1828
+ return [3, 9];
1829
+ case 6:
1830
+ _e = [{}];
1831
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1832
+ case 7:
1833
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1834
+ return [3, 9];
1835
+ case 8:
788
1836
  parsedBody = parsedOutput.body;
789
1837
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
790
1838
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
791
- _h.label = 11;
792
- case 11:
1839
+ _g.label = 9;
1840
+ case 9:
793
1841
  message = response.message || response.Message || errorCode;
794
1842
  response.message = message;
795
1843
  delete response.Message;
@@ -797,43 +1845,35 @@ var deserializeAws_restJson1GetOutpostCommandError = function (output, context)
797
1845
  }
798
1846
  });
799
1847
  }); };
800
- export var deserializeAws_restJson1GetOutpostInstanceTypesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1848
+ export var deserializeAws_restJson1ListOrdersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
801
1849
  var contents, data, _a, _b;
802
1850
  return __generator(this, function (_c) {
803
1851
  switch (_c.label) {
804
1852
  case 0:
805
1853
  if (output.statusCode !== 200 && output.statusCode >= 300) {
806
- return [2, deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context)];
1854
+ return [2, deserializeAws_restJson1ListOrdersCommandError(output, context)];
807
1855
  }
808
1856
  contents = {
809
1857
  $metadata: deserializeMetadata(output),
810
- InstanceTypes: undefined,
811
1858
  NextToken: undefined,
812
- OutpostArn: undefined,
813
- OutpostId: undefined,
1859
+ Orders: undefined,
814
1860
  };
815
1861
  _a = __expectNonNull;
816
1862
  _b = __expectObject;
817
1863
  return [4, parseBody(output.body, context)];
818
1864
  case 1:
819
1865
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
820
- if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
821
- contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
822
- }
823
1866
  if (data.NextToken !== undefined && data.NextToken !== null) {
824
1867
  contents.NextToken = __expectString(data.NextToken);
825
1868
  }
826
- if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
827
- contents.OutpostArn = __expectString(data.OutpostArn);
828
- }
829
- if (data.OutpostId !== undefined && data.OutpostId !== null) {
830
- contents.OutpostId = __expectString(data.OutpostId);
1869
+ if (data.Orders !== undefined && data.Orders !== null) {
1870
+ contents.Orders = deserializeAws_restJson1OrderSummaryListDefinition(data.Orders, context);
831
1871
  }
832
1872
  return [2, Promise.resolve(contents)];
833
1873
  }
834
1874
  });
835
1875
  }); };
836
- var deserializeAws_restJson1GetOutpostInstanceTypesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1876
+ var deserializeAws_restJson1ListOrdersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
837
1877
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
838
1878
  var _g;
839
1879
  return __generator(this, function (_h) {
@@ -1121,15 +2161,253 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1121
2161
  case 6:
1122
2162
  _e = [{}];
1123
2163
  return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
1124
- case 7:
1125
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1126
- return [3, 9];
1127
- case 8:
2164
+ case 7:
2165
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2166
+ return [3, 9];
2167
+ case 8:
2168
+ parsedBody = parsedOutput.body;
2169
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2170
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2171
+ _g.label = 9;
2172
+ case 9:
2173
+ message = response.message || response.Message || errorCode;
2174
+ response.message = message;
2175
+ delete response.Message;
2176
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
2177
+ }
2178
+ });
2179
+ }); };
2180
+ export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2181
+ var contents;
2182
+ return __generator(this, function (_a) {
2183
+ switch (_a.label) {
2184
+ case 0:
2185
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2186
+ return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
2187
+ }
2188
+ contents = {
2189
+ $metadata: deserializeMetadata(output),
2190
+ };
2191
+ return [4, collectBody(output.body, context)];
2192
+ case 1:
2193
+ _a.sent();
2194
+ return [2, Promise.resolve(contents)];
2195
+ }
2196
+ });
2197
+ }); };
2198
+ var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2199
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
2200
+ var _f;
2201
+ return __generator(this, function (_g) {
2202
+ switch (_g.label) {
2203
+ case 0:
2204
+ _a = [__assign({}, output)];
2205
+ _f = {};
2206
+ return [4, parseBody(output.body, context)];
2207
+ case 1:
2208
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
2209
+ errorCode = "UnknownError";
2210
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2211
+ _b = errorCode;
2212
+ switch (_b) {
2213
+ case "InternalServerException": return [3, 2];
2214
+ case "com.amazonaws.outposts#InternalServerException": return [3, 2];
2215
+ case "NotFoundException": return [3, 4];
2216
+ case "com.amazonaws.outposts#NotFoundException": return [3, 4];
2217
+ case "ValidationException": return [3, 6];
2218
+ case "com.amazonaws.outposts#ValidationException": return [3, 6];
2219
+ }
2220
+ return [3, 8];
2221
+ case 2:
2222
+ _c = [{}];
2223
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2224
+ case 3:
2225
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2226
+ return [3, 9];
2227
+ case 4:
2228
+ _d = [{}];
2229
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2230
+ case 5:
2231
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2232
+ return [3, 9];
2233
+ case 6:
2234
+ _e = [{}];
2235
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2236
+ case 7:
2237
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2238
+ return [3, 9];
2239
+ case 8:
2240
+ parsedBody = parsedOutput.body;
2241
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2242
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2243
+ _g.label = 9;
2244
+ case 9:
2245
+ message = response.message || response.Message || errorCode;
2246
+ response.message = message;
2247
+ delete response.Message;
2248
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
2249
+ }
2250
+ });
2251
+ }); };
2252
+ export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2253
+ var contents;
2254
+ return __generator(this, function (_a) {
2255
+ switch (_a.label) {
2256
+ case 0:
2257
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2258
+ return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
2259
+ }
2260
+ contents = {
2261
+ $metadata: deserializeMetadata(output),
2262
+ };
2263
+ return [4, collectBody(output.body, context)];
2264
+ case 1:
2265
+ _a.sent();
2266
+ return [2, Promise.resolve(contents)];
2267
+ }
2268
+ });
2269
+ }); };
2270
+ var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2271
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
2272
+ var _f;
2273
+ return __generator(this, function (_g) {
2274
+ switch (_g.label) {
2275
+ case 0:
2276
+ _a = [__assign({}, output)];
2277
+ _f = {};
2278
+ return [4, parseBody(output.body, context)];
2279
+ case 1:
2280
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
2281
+ errorCode = "UnknownError";
2282
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2283
+ _b = errorCode;
2284
+ switch (_b) {
2285
+ case "InternalServerException": return [3, 2];
2286
+ case "com.amazonaws.outposts#InternalServerException": return [3, 2];
2287
+ case "NotFoundException": return [3, 4];
2288
+ case "com.amazonaws.outposts#NotFoundException": return [3, 4];
2289
+ case "ValidationException": return [3, 6];
2290
+ case "com.amazonaws.outposts#ValidationException": return [3, 6];
2291
+ }
2292
+ return [3, 8];
2293
+ case 2:
2294
+ _c = [{}];
2295
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2296
+ case 3:
2297
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2298
+ return [3, 9];
2299
+ case 4:
2300
+ _d = [{}];
2301
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2302
+ case 5:
2303
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2304
+ return [3, 9];
2305
+ case 6:
2306
+ _e = [{}];
2307
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2308
+ case 7:
2309
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2310
+ return [3, 9];
2311
+ case 8:
2312
+ parsedBody = parsedOutput.body;
2313
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2314
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2315
+ _g.label = 9;
2316
+ case 9:
2317
+ message = response.message || response.Message || errorCode;
2318
+ response.message = message;
2319
+ delete response.Message;
2320
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
2321
+ }
2322
+ });
2323
+ }); };
2324
+ export var deserializeAws_restJson1UpdateSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2325
+ var contents, data, _a, _b;
2326
+ return __generator(this, function (_c) {
2327
+ switch (_c.label) {
2328
+ case 0:
2329
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2330
+ return [2, deserializeAws_restJson1UpdateSiteCommandError(output, context)];
2331
+ }
2332
+ contents = {
2333
+ $metadata: deserializeMetadata(output),
2334
+ Site: undefined,
2335
+ };
2336
+ _a = __expectNonNull;
2337
+ _b = __expectObject;
2338
+ return [4, parseBody(output.body, context)];
2339
+ case 1:
2340
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2341
+ if (data.Site !== undefined && data.Site !== null) {
2342
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
2343
+ }
2344
+ return [2, Promise.resolve(contents)];
2345
+ }
2346
+ });
2347
+ }); };
2348
+ var deserializeAws_restJson1UpdateSiteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2349
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
2350
+ var _h;
2351
+ return __generator(this, function (_j) {
2352
+ switch (_j.label) {
2353
+ case 0:
2354
+ _a = [__assign({}, output)];
2355
+ _h = {};
2356
+ return [4, parseBody(output.body, context)];
2357
+ case 1:
2358
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
2359
+ errorCode = "UnknownError";
2360
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2361
+ _b = errorCode;
2362
+ switch (_b) {
2363
+ case "AccessDeniedException": return [3, 2];
2364
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
2365
+ case "ConflictException": return [3, 4];
2366
+ case "com.amazonaws.outposts#ConflictException": return [3, 4];
2367
+ case "InternalServerException": return [3, 6];
2368
+ case "com.amazonaws.outposts#InternalServerException": return [3, 6];
2369
+ case "NotFoundException": return [3, 8];
2370
+ case "com.amazonaws.outposts#NotFoundException": return [3, 8];
2371
+ case "ValidationException": return [3, 10];
2372
+ case "com.amazonaws.outposts#ValidationException": return [3, 10];
2373
+ }
2374
+ return [3, 12];
2375
+ case 2:
2376
+ _c = [{}];
2377
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
2378
+ case 3:
2379
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2380
+ return [3, 13];
2381
+ case 4:
2382
+ _d = [{}];
2383
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
2384
+ case 5:
2385
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2386
+ return [3, 13];
2387
+ case 6:
2388
+ _e = [{}];
2389
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2390
+ case 7:
2391
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2392
+ return [3, 13];
2393
+ case 8:
2394
+ _f = [{}];
2395
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2396
+ case 9:
2397
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2398
+ return [3, 13];
2399
+ case 10:
2400
+ _g = [{}];
2401
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2402
+ case 11:
2403
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2404
+ return [3, 13];
2405
+ case 12:
1128
2406
  parsedBody = parsedOutput.body;
1129
2407
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
1130
2408
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1131
- _g.label = 9;
1132
- case 9:
2409
+ _j.label = 13;
2410
+ case 13:
1133
2411
  message = response.message || response.Message || errorCode;
1134
2412
  response.message = message;
1135
2413
  delete response.Message;
@@ -1137,71 +2415,97 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1137
2415
  }
1138
2416
  });
1139
2417
  }); };
1140
- export var deserializeAws_restJson1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1141
- var contents;
1142
- return __generator(this, function (_a) {
1143
- switch (_a.label) {
2418
+ export var deserializeAws_restJson1UpdateSiteAddressCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2419
+ var contents, data, _a, _b;
2420
+ return __generator(this, function (_c) {
2421
+ switch (_c.label) {
1144
2422
  case 0:
1145
2423
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1146
- return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
2424
+ return [2, deserializeAws_restJson1UpdateSiteAddressCommandError(output, context)];
1147
2425
  }
1148
2426
  contents = {
1149
2427
  $metadata: deserializeMetadata(output),
2428
+ Address: undefined,
2429
+ AddressType: undefined,
1150
2430
  };
1151
- return [4, collectBody(output.body, context)];
2431
+ _a = __expectNonNull;
2432
+ _b = __expectObject;
2433
+ return [4, parseBody(output.body, context)];
1152
2434
  case 1:
1153
- _a.sent();
2435
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2436
+ if (data.Address !== undefined && data.Address !== null) {
2437
+ contents.Address = deserializeAws_restJson1Address(data.Address, context);
2438
+ }
2439
+ if (data.AddressType !== undefined && data.AddressType !== null) {
2440
+ contents.AddressType = __expectString(data.AddressType);
2441
+ }
1154
2442
  return [2, Promise.resolve(contents)];
1155
2443
  }
1156
2444
  });
1157
2445
  }); };
1158
- var deserializeAws_restJson1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1159
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
1160
- var _f;
1161
- return __generator(this, function (_g) {
1162
- switch (_g.label) {
2446
+ var deserializeAws_restJson1UpdateSiteAddressCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2447
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
2448
+ var _h;
2449
+ return __generator(this, function (_j) {
2450
+ switch (_j.label) {
1163
2451
  case 0:
1164
2452
  _a = [__assign({}, output)];
1165
- _f = {};
2453
+ _h = {};
1166
2454
  return [4, parseBody(output.body, context)];
1167
2455
  case 1:
1168
- parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
2456
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
1169
2457
  errorCode = "UnknownError";
1170
2458
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1171
2459
  _b = errorCode;
1172
2460
  switch (_b) {
1173
- case "InternalServerException": return [3, 2];
1174
- case "com.amazonaws.outposts#InternalServerException": return [3, 2];
1175
- case "NotFoundException": return [3, 4];
1176
- case "com.amazonaws.outposts#NotFoundException": return [3, 4];
1177
- case "ValidationException": return [3, 6];
1178
- case "com.amazonaws.outposts#ValidationException": return [3, 6];
2461
+ case "AccessDeniedException": return [3, 2];
2462
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
2463
+ case "ConflictException": return [3, 4];
2464
+ case "com.amazonaws.outposts#ConflictException": return [3, 4];
2465
+ case "InternalServerException": return [3, 6];
2466
+ case "com.amazonaws.outposts#InternalServerException": return [3, 6];
2467
+ case "NotFoundException": return [3, 8];
2468
+ case "com.amazonaws.outposts#NotFoundException": return [3, 8];
2469
+ case "ValidationException": return [3, 10];
2470
+ case "com.amazonaws.outposts#ValidationException": return [3, 10];
1179
2471
  }
1180
- return [3, 8];
2472
+ return [3, 12];
1181
2473
  case 2:
1182
2474
  _c = [{}];
1183
- return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2475
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1184
2476
  case 3:
1185
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1186
- return [3, 9];
2477
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2478
+ return [3, 13];
1187
2479
  case 4:
1188
2480
  _d = [{}];
1189
- return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2481
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
1190
2482
  case 5:
1191
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1192
- return [3, 9];
2483
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2484
+ return [3, 13];
1193
2485
  case 6:
1194
2486
  _e = [{}];
1195
- return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2487
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1196
2488
  case 7:
1197
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1198
- return [3, 9];
2489
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2490
+ return [3, 13];
1199
2491
  case 8:
2492
+ _f = [{}];
2493
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2494
+ case 9:
2495
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2496
+ return [3, 13];
2497
+ case 10:
2498
+ _g = [{}];
2499
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2500
+ case 11:
2501
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2502
+ return [3, 13];
2503
+ case 12:
1200
2504
  parsedBody = parsedOutput.body;
1201
2505
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
1202
2506
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1203
- _g.label = 9;
1204
- case 9:
2507
+ _j.label = 13;
2508
+ case 13:
1205
2509
  message = response.message || response.Message || errorCode;
1206
2510
  response.message = message;
1207
2511
  delete response.Message;
@@ -1209,71 +2513,93 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
1209
2513
  }
1210
2514
  });
1211
2515
  }); };
1212
- export var deserializeAws_restJson1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1213
- var contents;
1214
- return __generator(this, function (_a) {
1215
- switch (_a.label) {
2516
+ export var deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2517
+ var contents, data, _a, _b;
2518
+ return __generator(this, function (_c) {
2519
+ switch (_c.label) {
1216
2520
  case 0:
1217
2521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1218
- return [2, deserializeAws_restJson1UntagResourceCommandError(output, context)];
2522
+ return [2, deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError(output, context)];
1219
2523
  }
1220
2524
  contents = {
1221
2525
  $metadata: deserializeMetadata(output),
2526
+ Site: undefined,
1222
2527
  };
1223
- return [4, collectBody(output.body, context)];
2528
+ _a = __expectNonNull;
2529
+ _b = __expectObject;
2530
+ return [4, parseBody(output.body, context)];
1224
2531
  case 1:
1225
- _a.sent();
2532
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2533
+ if (data.Site !== undefined && data.Site !== null) {
2534
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
2535
+ }
1226
2536
  return [2, Promise.resolve(contents)];
1227
2537
  }
1228
2538
  });
1229
2539
  }); };
1230
- var deserializeAws_restJson1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1231
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
1232
- var _f;
1233
- return __generator(this, function (_g) {
1234
- switch (_g.label) {
2540
+ var deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2541
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
2542
+ var _h;
2543
+ return __generator(this, function (_j) {
2544
+ switch (_j.label) {
1235
2545
  case 0:
1236
2546
  _a = [__assign({}, output)];
1237
- _f = {};
2547
+ _h = {};
1238
2548
  return [4, parseBody(output.body, context)];
1239
2549
  case 1:
1240
- parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
2550
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
1241
2551
  errorCode = "UnknownError";
1242
2552
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1243
2553
  _b = errorCode;
1244
2554
  switch (_b) {
1245
- case "InternalServerException": return [3, 2];
1246
- case "com.amazonaws.outposts#InternalServerException": return [3, 2];
1247
- case "NotFoundException": return [3, 4];
1248
- case "com.amazonaws.outposts#NotFoundException": return [3, 4];
1249
- case "ValidationException": return [3, 6];
1250
- case "com.amazonaws.outposts#ValidationException": return [3, 6];
2555
+ case "AccessDeniedException": return [3, 2];
2556
+ case "com.amazonaws.outposts#AccessDeniedException": return [3, 2];
2557
+ case "ConflictException": return [3, 4];
2558
+ case "com.amazonaws.outposts#ConflictException": return [3, 4];
2559
+ case "InternalServerException": return [3, 6];
2560
+ case "com.amazonaws.outposts#InternalServerException": return [3, 6];
2561
+ case "NotFoundException": return [3, 8];
2562
+ case "com.amazonaws.outposts#NotFoundException": return [3, 8];
2563
+ case "ValidationException": return [3, 10];
2564
+ case "com.amazonaws.outposts#ValidationException": return [3, 10];
1251
2565
  }
1252
- return [3, 8];
2566
+ return [3, 12];
1253
2567
  case 2:
1254
2568
  _c = [{}];
1255
- return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
2569
+ return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
1256
2570
  case 3:
1257
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1258
- return [3, 9];
2571
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2572
+ return [3, 13];
1259
2573
  case 4:
1260
2574
  _d = [{}];
1261
- return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2575
+ return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
1262
2576
  case 5:
1263
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1264
- return [3, 9];
2577
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2578
+ return [3, 13];
1265
2579
  case 6:
1266
2580
  _e = [{}];
1267
- return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2581
+ return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
1268
2582
  case 7:
1269
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1270
- return [3, 9];
2583
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2584
+ return [3, 13];
1271
2585
  case 8:
2586
+ _f = [{}];
2587
+ return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
2588
+ case 9:
2589
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2590
+ return [3, 13];
2591
+ case 10:
2592
+ _g = [{}];
2593
+ return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
2594
+ case 11:
2595
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2596
+ return [3, 13];
2597
+ case 12:
1272
2598
  parsedBody = parsedOutput.body;
1273
2599
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
1274
2600
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1275
- _g.label = 9;
1276
- case 9:
2601
+ _j.label = 13;
2602
+ case 13:
1277
2603
  message = response.message || response.Message || errorCode;
1278
2604
  response.message = message;
1279
2605
  delete response.Message;
@@ -1385,6 +2711,11 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
1385
2711
  return [2, contents];
1386
2712
  });
1387
2713
  }); };
2714
+ var serializeAws_restJson1Address = function (input, context) {
2715
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AddressLine1 !== undefined && input.AddressLine1 !== null && { AddressLine1: input.AddressLine1 })), (input.AddressLine2 !== undefined && input.AddressLine2 !== null && { AddressLine2: input.AddressLine2 })), (input.AddressLine3 !== undefined && input.AddressLine3 !== null && { AddressLine3: input.AddressLine3 })), (input.City !== undefined && input.City !== null && { City: input.City })), (input.ContactName !== undefined && input.ContactName !== null && { ContactName: input.ContactName })), (input.ContactPhoneNumber !== undefined &&
2716
+ input.ContactPhoneNumber !== null && { ContactPhoneNumber: input.ContactPhoneNumber })), (input.CountryCode !== undefined && input.CountryCode !== null && { CountryCode: input.CountryCode })), (input.DistrictOrCounty !== undefined &&
2717
+ input.DistrictOrCounty !== null && { DistrictOrCounty: input.DistrictOrCounty })), (input.Municipality !== undefined && input.Municipality !== null && { Municipality: input.Municipality })), (input.PostalCode !== undefined && input.PostalCode !== null && { PostalCode: input.PostalCode })), (input.StateOrRegion !== undefined && input.StateOrRegion !== null && { StateOrRegion: input.StateOrRegion }));
2718
+ };
1388
2719
  var serializeAws_restJson1LineItemRequest = function (input, context) {
1389
2720
  return __assign(__assign({}, (input.CatalogItemId !== undefined && input.CatalogItemId !== null && { CatalogItemId: input.CatalogItemId })), (input.Quantity !== undefined && input.Quantity !== null && { Quantity: input.Quantity }));
1390
2721
  };
@@ -1398,6 +2729,13 @@ var serializeAws_restJson1LineItemRequestListDefinition = function (input, conte
1398
2729
  return serializeAws_restJson1LineItemRequest(entry, context);
1399
2730
  });
1400
2731
  };
2732
+ var serializeAws_restJson1RackPhysicalProperties = function (input, context) {
2733
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.FiberOpticCableType !== undefined &&
2734
+ input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType })), (input.MaximumSupportedWeightLbs !== undefined &&
2735
+ input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs })), (input.OpticalStandard !== undefined &&
2736
+ input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard })), (input.PowerConnector !== undefined &&
2737
+ input.PowerConnector !== null && { PowerConnector: input.PowerConnector })), (input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva })), (input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop })), (input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase })), (input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount })), (input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps }));
2738
+ };
1401
2739
  var serializeAws_restJson1TagMap = function (input, context) {
1402
2740
  return Object.entries(input).reduce(function (acc, _a) {
1403
2741
  var _b;
@@ -1408,6 +2746,65 @@ var serializeAws_restJson1TagMap = function (input, context) {
1408
2746
  return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
1409
2747
  }, {});
1410
2748
  };
2749
+ var deserializeAws_restJson1Address = function (output, context) {
2750
+ return {
2751
+ AddressLine1: __expectString(output.AddressLine1),
2752
+ AddressLine2: __expectString(output.AddressLine2),
2753
+ AddressLine3: __expectString(output.AddressLine3),
2754
+ City: __expectString(output.City),
2755
+ ContactName: __expectString(output.ContactName),
2756
+ ContactPhoneNumber: __expectString(output.ContactPhoneNumber),
2757
+ CountryCode: __expectString(output.CountryCode),
2758
+ DistrictOrCounty: __expectString(output.DistrictOrCounty),
2759
+ Municipality: __expectString(output.Municipality),
2760
+ PostalCode: __expectString(output.PostalCode),
2761
+ StateOrRegion: __expectString(output.StateOrRegion),
2762
+ };
2763
+ };
2764
+ var deserializeAws_restJson1CatalogItem = function (output, context) {
2765
+ return {
2766
+ CatalogItemId: __expectString(output.CatalogItemId),
2767
+ EC2Capacities: output.EC2Capacities !== undefined && output.EC2Capacities !== null
2768
+ ? deserializeAws_restJson1EC2CapacityListDefinition(output.EC2Capacities, context)
2769
+ : undefined,
2770
+ ItemStatus: __expectString(output.ItemStatus),
2771
+ PowerKva: __limitedParseFloat32(output.PowerKva),
2772
+ SupportedStorage: output.SupportedStorage !== undefined && output.SupportedStorage !== null
2773
+ ? deserializeAws_restJson1SupportedStorageList(output.SupportedStorage, context)
2774
+ : undefined,
2775
+ SupportedUplinkGbps: output.SupportedUplinkGbps !== undefined && output.SupportedUplinkGbps !== null
2776
+ ? deserializeAws_restJson1SupportedUplinkGbpsListDefinition(output.SupportedUplinkGbps, context)
2777
+ : undefined,
2778
+ WeightLbs: __expectInt32(output.WeightLbs),
2779
+ };
2780
+ };
2781
+ var deserializeAws_restJson1CatalogItemListDefinition = function (output, context) {
2782
+ return (output || [])
2783
+ .filter(function (e) { return e != null; })
2784
+ .map(function (entry) {
2785
+ if (entry === null) {
2786
+ return null;
2787
+ }
2788
+ return deserializeAws_restJson1CatalogItem(entry, context);
2789
+ });
2790
+ };
2791
+ var deserializeAws_restJson1EC2Capacity = function (output, context) {
2792
+ return {
2793
+ Family: __expectString(output.Family),
2794
+ MaxSize: __expectString(output.MaxSize),
2795
+ Quantity: __expectString(output.Quantity),
2796
+ };
2797
+ };
2798
+ var deserializeAws_restJson1EC2CapacityListDefinition = function (output, context) {
2799
+ return (output || [])
2800
+ .filter(function (e) { return e != null; })
2801
+ .map(function (entry) {
2802
+ if (entry === null) {
2803
+ return null;
2804
+ }
2805
+ return deserializeAws_restJson1EC2Capacity(entry, context);
2806
+ });
2807
+ };
1411
2808
  var deserializeAws_restJson1InstanceTypeItem = function (output, context) {
1412
2809
  return {
1413
2810
  InstanceType: __expectString(output.InstanceType),
@@ -1441,6 +2838,16 @@ var deserializeAws_restJson1LineItemListDefinition = function (output, context)
1441
2838
  return deserializeAws_restJson1LineItem(entry, context);
1442
2839
  });
1443
2840
  };
2841
+ var deserializeAws_restJson1LineItemStatusCounts = function (output, context) {
2842
+ return Object.entries(output).reduce(function (acc, _a) {
2843
+ var _b;
2844
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
2845
+ if (value === null) {
2846
+ return acc;
2847
+ }
2848
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectInt32(value), _b));
2849
+ }, {});
2850
+ };
1444
2851
  var deserializeAws_restJson1Order = function (output, context) {
1445
2852
  return {
1446
2853
  LineItems: output.LineItems !== undefined && output.LineItems !== null
@@ -1458,6 +2865,33 @@ var deserializeAws_restJson1Order = function (output, context) {
1458
2865
  Status: __expectString(output.Status),
1459
2866
  };
1460
2867
  };
2868
+ var deserializeAws_restJson1OrderSummary = function (output, context) {
2869
+ return {
2870
+ LineItemCountsByStatus: output.LineItemCountsByStatus !== undefined && output.LineItemCountsByStatus !== null
2871
+ ? deserializeAws_restJson1LineItemStatusCounts(output.LineItemCountsByStatus, context)
2872
+ : undefined,
2873
+ OrderFulfilledDate: output.OrderFulfilledDate !== undefined && output.OrderFulfilledDate !== null
2874
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderFulfilledDate)))
2875
+ : undefined,
2876
+ OrderId: __expectString(output.OrderId),
2877
+ OrderSubmissionDate: output.OrderSubmissionDate !== undefined && output.OrderSubmissionDate !== null
2878
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderSubmissionDate)))
2879
+ : undefined,
2880
+ OrderType: __expectString(output.OrderType),
2881
+ OutpostId: __expectString(output.OutpostId),
2882
+ Status: __expectString(output.Status),
2883
+ };
2884
+ };
2885
+ var deserializeAws_restJson1OrderSummaryListDefinition = function (output, context) {
2886
+ return (output || [])
2887
+ .filter(function (e) { return e != null; })
2888
+ .map(function (entry) {
2889
+ if (entry === null) {
2890
+ return null;
2891
+ }
2892
+ return deserializeAws_restJson1OrderSummary(entry, context);
2893
+ });
2894
+ };
1461
2895
  var deserializeAws_restJson1Outpost = function (output, context) {
1462
2896
  return {
1463
2897
  AvailabilityZone: __expectString(output.AvailabilityZone),
@@ -1470,6 +2904,7 @@ var deserializeAws_restJson1Outpost = function (output, context) {
1470
2904
  OwnerId: __expectString(output.OwnerId),
1471
2905
  SiteArn: __expectString(output.SiteArn),
1472
2906
  SiteId: __expectString(output.SiteId),
2907
+ SupportedHardwareType: __expectString(output.SupportedHardwareType),
1473
2908
  Tags: output.Tags !== undefined && output.Tags !== null
1474
2909
  ? deserializeAws_restJson1TagMap(output.Tags, context)
1475
2910
  : undefined,
@@ -1485,11 +2920,31 @@ var deserializeAws_restJson1outpostListDefinition = function (output, context) {
1485
2920
  return deserializeAws_restJson1Outpost(entry, context);
1486
2921
  });
1487
2922
  };
2923
+ var deserializeAws_restJson1RackPhysicalProperties = function (output, context) {
2924
+ return {
2925
+ FiberOpticCableType: __expectString(output.FiberOpticCableType),
2926
+ MaximumSupportedWeightLbs: __expectString(output.MaximumSupportedWeightLbs),
2927
+ OpticalStandard: __expectString(output.OpticalStandard),
2928
+ PowerConnector: __expectString(output.PowerConnector),
2929
+ PowerDrawKva: __expectString(output.PowerDrawKva),
2930
+ PowerFeedDrop: __expectString(output.PowerFeedDrop),
2931
+ PowerPhase: __expectString(output.PowerPhase),
2932
+ UplinkCount: __expectString(output.UplinkCount),
2933
+ UplinkGbps: __expectString(output.UplinkGbps),
2934
+ };
2935
+ };
1488
2936
  var deserializeAws_restJson1Site = function (output, context) {
1489
2937
  return {
1490
2938
  AccountId: __expectString(output.AccountId),
1491
2939
  Description: __expectString(output.Description),
1492
2940
  Name: __expectString(output.Name),
2941
+ Notes: __expectString(output.Notes),
2942
+ OperatingAddressCity: __expectString(output.OperatingAddressCity),
2943
+ OperatingAddressCountryCode: __expectString(output.OperatingAddressCountryCode),
2944
+ OperatingAddressStateOrRegion: __expectString(output.OperatingAddressStateOrRegion),
2945
+ RackPhysicalProperties: output.RackPhysicalProperties !== undefined && output.RackPhysicalProperties !== null
2946
+ ? deserializeAws_restJson1RackPhysicalProperties(output.RackPhysicalProperties, context)
2947
+ : undefined,
1493
2948
  SiteArn: __expectString(output.SiteArn),
1494
2949
  SiteId: __expectString(output.SiteId),
1495
2950
  Tags: output.Tags !== undefined && output.Tags !== null
@@ -1507,6 +2962,26 @@ var deserializeAws_restJson1siteListDefinition = function (output, context) {
1507
2962
  return deserializeAws_restJson1Site(entry, context);
1508
2963
  });
1509
2964
  };
2965
+ var deserializeAws_restJson1SupportedStorageList = function (output, context) {
2966
+ return (output || [])
2967
+ .filter(function (e) { return e != null; })
2968
+ .map(function (entry) {
2969
+ if (entry === null) {
2970
+ return null;
2971
+ }
2972
+ return __expectString(entry);
2973
+ });
2974
+ };
2975
+ var deserializeAws_restJson1SupportedUplinkGbpsListDefinition = function (output, context) {
2976
+ return (output || [])
2977
+ .filter(function (e) { return e != null; })
2978
+ .map(function (entry) {
2979
+ if (entry === null) {
2980
+ return null;
2981
+ }
2982
+ return __expectInt32(entry);
2983
+ });
2984
+ };
1510
2985
  var deserializeAws_restJson1TagMap = function (output, context) {
1511
2986
  return Object.entries(output).reduce(function (acc, _a) {
1512
2987
  var _b;