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