@aws-sdk/client-outposts 3.40.0 → 3.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +10 -10
  3. package/dist-cjs/Outposts.js +165 -0
  4. package/dist-cjs/commands/CancelOrderCommand.js +36 -0
  5. package/dist-cjs/commands/CreateSiteCommand.js +36 -0
  6. package/dist-cjs/commands/GetCatalogItemCommand.js +36 -0
  7. package/dist-cjs/commands/GetOrderCommand.js +36 -0
  8. package/dist-cjs/commands/GetSiteAddressCommand.js +36 -0
  9. package/dist-cjs/commands/GetSiteCommand.js +36 -0
  10. package/dist-cjs/commands/ListCatalogItemsCommand.js +36 -0
  11. package/dist-cjs/commands/ListOrdersCommand.js +36 -0
  12. package/dist-cjs/commands/UpdateSiteAddressCommand.js +36 -0
  13. package/dist-cjs/commands/UpdateSiteCommand.js +36 -0
  14. package/dist-cjs/commands/UpdateSiteRackPhysicalPropertiesCommand.js +36 -0
  15. package/dist-cjs/commands/index.js +11 -0
  16. package/dist-cjs/endpoints.js +8 -0
  17. package/dist-cjs/models/models_0.js +306 -25
  18. package/dist-cjs/pagination/ListCatalogItemsPaginator.js +35 -0
  19. package/dist-cjs/pagination/ListOrdersPaginator.js +35 -0
  20. package/dist-cjs/pagination/index.js +2 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +1432 -103
  22. package/dist-es/Outposts.js +165 -0
  23. package/dist-es/commands/CancelOrderCommand.js +39 -0
  24. package/dist-es/commands/CreateSiteCommand.js +39 -0
  25. package/dist-es/commands/GetCatalogItemCommand.js +39 -0
  26. package/dist-es/commands/GetOrderCommand.js +39 -0
  27. package/dist-es/commands/GetSiteAddressCommand.js +39 -0
  28. package/dist-es/commands/GetSiteCommand.js +39 -0
  29. package/dist-es/commands/ListCatalogItemsCommand.js +39 -0
  30. package/dist-es/commands/ListOrdersCommand.js +39 -0
  31. package/dist-es/commands/UpdateSiteAddressCommand.js +39 -0
  32. package/dist-es/commands/UpdateSiteCommand.js +39 -0
  33. package/dist-es/commands/UpdateSiteRackPhysicalPropertiesCommand.js +39 -0
  34. package/dist-es/commands/index.js +11 -0
  35. package/dist-es/endpoints.js +8 -0
  36. package/dist-es/models/models_0.js +242 -16
  37. package/dist-es/pagination/ListCatalogItemsPaginator.js +74 -0
  38. package/dist-es/pagination/ListOrdersPaginator.js +74 -0
  39. package/dist-es/pagination/index.js +2 -0
  40. package/dist-es/protocols/Aws_restJson1.js +1642 -167
  41. package/dist-types/Outposts.d.ts +114 -6
  42. package/dist-types/OutpostsClient.d.ts +16 -5
  43. package/dist-types/commands/CancelOrderCommand.d.ts +37 -0
  44. package/dist-types/commands/CreateOrderCommand.d.ts +1 -1
  45. package/dist-types/commands/CreateOutpostCommand.d.ts +1 -1
  46. package/dist-types/commands/CreateSiteCommand.d.ts +37 -0
  47. package/dist-types/commands/DeleteOutpostCommand.d.ts +1 -1
  48. package/dist-types/commands/DeleteSiteCommand.d.ts +1 -1
  49. package/dist-types/commands/GetCatalogItemCommand.d.ts +35 -0
  50. package/dist-types/commands/GetOrderCommand.d.ts +35 -0
  51. package/dist-types/commands/GetOutpostCommand.d.ts +1 -1
  52. package/dist-types/commands/GetOutpostInstanceTypesCommand.d.ts +1 -1
  53. package/dist-types/commands/GetSiteAddressCommand.d.ts +37 -0
  54. package/dist-types/commands/GetSiteCommand.d.ts +37 -0
  55. package/dist-types/commands/ListCatalogItemsCommand.d.ts +39 -0
  56. package/dist-types/commands/ListOrdersCommand.d.ts +36 -0
  57. package/dist-types/commands/ListOutpostsCommand.d.ts +3 -3
  58. package/dist-types/commands/ListSitesCommand.d.ts +2 -2
  59. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  60. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  61. package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
  62. package/dist-types/commands/UpdateSiteAddressCommand.d.ts +46 -0
  63. package/dist-types/commands/UpdateSiteCommand.d.ts +37 -0
  64. package/dist-types/commands/UpdateSiteRackPhysicalPropertiesCommand.d.ts +40 -0
  65. package/dist-types/commands/index.d.ts +11 -0
  66. package/dist-types/models/models_0.d.ts +1144 -146
  67. package/dist-types/pagination/ListCatalogItemsPaginator.d.ts +4 -0
  68. package/dist-types/pagination/ListOrdersPaginator.d.ts +4 -0
  69. package/dist-types/pagination/index.d.ts +2 -0
  70. package/dist-types/protocols/Aws_restJson1.d.ts +33 -0
  71. package/dist-types/ts3.4/Outposts.d.ts +55 -0
  72. package/dist-types/ts3.4/OutpostsClient.d.ts +13 -2
  73. package/dist-types/ts3.4/commands/CancelOrderCommand.d.ts +17 -0
  74. package/dist-types/ts3.4/commands/CreateSiteCommand.d.ts +17 -0
  75. package/dist-types/ts3.4/commands/GetCatalogItemCommand.d.ts +17 -0
  76. package/dist-types/ts3.4/commands/GetOrderCommand.d.ts +17 -0
  77. package/dist-types/ts3.4/commands/GetSiteAddressCommand.d.ts +17 -0
  78. package/dist-types/ts3.4/commands/GetSiteCommand.d.ts +17 -0
  79. package/dist-types/ts3.4/commands/ListCatalogItemsCommand.d.ts +17 -0
  80. package/dist-types/ts3.4/commands/ListOrdersCommand.d.ts +17 -0
  81. package/dist-types/ts3.4/commands/UpdateSiteAddressCommand.d.ts +17 -0
  82. package/dist-types/ts3.4/commands/UpdateSiteCommand.d.ts +17 -0
  83. package/dist-types/ts3.4/commands/UpdateSiteRackPhysicalPropertiesCommand.d.ts +17 -0
  84. package/dist-types/ts3.4/commands/index.d.ts +11 -0
  85. package/dist-types/ts3.4/models/models_0.d.ts +518 -51
  86. package/dist-types/ts3.4/pagination/ListCatalogItemsPaginator.d.ts +4 -0
  87. package/dist-types/ts3.4/pagination/ListOrdersPaginator.d.ts +4 -0
  88. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  89. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +33 -0
  90. package/package.json +4 -4
@@ -1,8 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSitesCommand = exports.deserializeAws_restJson1ListOutpostsCommand = exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = exports.deserializeAws_restJson1GetOutpostCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteOutpostCommand = exports.deserializeAws_restJson1CreateOutpostCommand = exports.deserializeAws_restJson1CreateOrderCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSitesCommand = exports.serializeAws_restJson1ListOutpostsCommand = exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = exports.serializeAws_restJson1GetOutpostCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteOutpostCommand = exports.serializeAws_restJson1CreateOutpostCommand = exports.serializeAws_restJson1CreateOrderCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.deserializeAws_restJson1UpdateSiteAddressCommand = exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSitesCommand = exports.deserializeAws_restJson1ListOutpostsCommand = exports.deserializeAws_restJson1ListOrdersCommand = exports.deserializeAws_restJson1ListCatalogItemsCommand = exports.deserializeAws_restJson1GetSiteAddressCommand = exports.deserializeAws_restJson1GetSiteCommand = exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = exports.deserializeAws_restJson1GetOutpostCommand = exports.deserializeAws_restJson1GetOrderCommand = exports.deserializeAws_restJson1GetCatalogItemCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteOutpostCommand = exports.deserializeAws_restJson1CreateSiteCommand = exports.deserializeAws_restJson1CreateOutpostCommand = exports.deserializeAws_restJson1CreateOrderCommand = exports.deserializeAws_restJson1CancelOrderCommand = exports.serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.serializeAws_restJson1UpdateSiteAddressCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSitesCommand = exports.serializeAws_restJson1ListOutpostsCommand = exports.serializeAws_restJson1ListOrdersCommand = exports.serializeAws_restJson1ListCatalogItemsCommand = exports.serializeAws_restJson1GetSiteAddressCommand = exports.serializeAws_restJson1GetSiteCommand = exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = exports.serializeAws_restJson1GetOutpostCommand = exports.serializeAws_restJson1GetOrderCommand = exports.serializeAws_restJson1GetCatalogItemCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteOutpostCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateOutpostCommand = exports.serializeAws_restJson1CreateOrderCommand = exports.serializeAws_restJson1CancelOrderCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const serializeAws_restJson1CancelOrderCommand = async (input, context) => {
7
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const headers = {};
9
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orders/{OrderId}/cancel";
10
+ if (input.OrderId !== undefined) {
11
+ const labelValue = input.OrderId;
12
+ if (labelValue.length <= 0) {
13
+ throw new Error("Empty value provided for input HTTP label: OrderId.");
14
+ }
15
+ resolvedPath = resolvedPath.replace("{OrderId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
16
+ }
17
+ else {
18
+ throw new Error("No value provided for input HTTP label: OrderId.");
19
+ }
20
+ let body;
21
+ return new protocol_http_1.HttpRequest({
22
+ protocol,
23
+ hostname,
24
+ port,
25
+ method: "POST",
26
+ headers,
27
+ path: resolvedPath,
28
+ body,
29
+ });
30
+ };
31
+ exports.serializeAws_restJson1CancelOrderCommand = serializeAws_restJson1CancelOrderCommand;
6
32
  const serializeAws_restJson1CreateOrderCommand = async (input, context) => {
7
33
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
34
  const headers = {
@@ -46,6 +72,8 @@ const serializeAws_restJson1CreateOutpostCommand = async (input, context) => {
46
72
  ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
47
73
  ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
48
74
  ...(input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId }),
75
+ ...(input.SupportedHardwareType !== undefined &&
76
+ input.SupportedHardwareType !== null && { SupportedHardwareType: input.SupportedHardwareType }),
49
77
  ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
50
78
  });
51
79
  return new protocol_http_1.HttpRequest({
@@ -59,6 +87,42 @@ const serializeAws_restJson1CreateOutpostCommand = async (input, context) => {
59
87
  });
60
88
  };
61
89
  exports.serializeAws_restJson1CreateOutpostCommand = serializeAws_restJson1CreateOutpostCommand;
90
+ const serializeAws_restJson1CreateSiteCommand = async (input, context) => {
91
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const headers = {
93
+ "content-type": "application/json",
94
+ };
95
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites";
96
+ let body;
97
+ body = JSON.stringify({
98
+ ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
99
+ ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
100
+ ...(input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes }),
101
+ ...(input.OperatingAddress !== undefined &&
102
+ input.OperatingAddress !== null && {
103
+ OperatingAddress: serializeAws_restJson1Address(input.OperatingAddress, context),
104
+ }),
105
+ ...(input.RackPhysicalProperties !== undefined &&
106
+ input.RackPhysicalProperties !== null && {
107
+ RackPhysicalProperties: serializeAws_restJson1RackPhysicalProperties(input.RackPhysicalProperties, context),
108
+ }),
109
+ ...(input.ShippingAddress !== undefined &&
110
+ input.ShippingAddress !== null && {
111
+ ShippingAddress: serializeAws_restJson1Address(input.ShippingAddress, context),
112
+ }),
113
+ ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
114
+ });
115
+ return new protocol_http_1.HttpRequest({
116
+ protocol,
117
+ hostname,
118
+ port,
119
+ method: "POST",
120
+ headers,
121
+ path: resolvedPath,
122
+ body,
123
+ });
124
+ };
125
+ exports.serializeAws_restJson1CreateSiteCommand = serializeAws_restJson1CreateSiteCommand;
62
126
  const serializeAws_restJson1DeleteOutpostCommand = async (input, context) => {
63
127
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
128
  const headers = {};
@@ -111,6 +175,58 @@ const serializeAws_restJson1DeleteSiteCommand = async (input, context) => {
111
175
  });
112
176
  };
113
177
  exports.serializeAws_restJson1DeleteSiteCommand = serializeAws_restJson1DeleteSiteCommand;
178
+ const serializeAws_restJson1GetCatalogItemCommand = async (input, context) => {
179
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
180
+ const headers = {};
181
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/catalog/item/{CatalogItemId}";
182
+ if (input.CatalogItemId !== undefined) {
183
+ const labelValue = input.CatalogItemId;
184
+ if (labelValue.length <= 0) {
185
+ throw new Error("Empty value provided for input HTTP label: CatalogItemId.");
186
+ }
187
+ resolvedPath = resolvedPath.replace("{CatalogItemId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
188
+ }
189
+ else {
190
+ throw new Error("No value provided for input HTTP label: CatalogItemId.");
191
+ }
192
+ let body;
193
+ return new protocol_http_1.HttpRequest({
194
+ protocol,
195
+ hostname,
196
+ port,
197
+ method: "GET",
198
+ headers,
199
+ path: resolvedPath,
200
+ body,
201
+ });
202
+ };
203
+ exports.serializeAws_restJson1GetCatalogItemCommand = serializeAws_restJson1GetCatalogItemCommand;
204
+ const serializeAws_restJson1GetOrderCommand = async (input, context) => {
205
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
206
+ const headers = {};
207
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orders/{OrderId}";
208
+ if (input.OrderId !== undefined) {
209
+ const labelValue = input.OrderId;
210
+ if (labelValue.length <= 0) {
211
+ throw new Error("Empty value provided for input HTTP label: OrderId.");
212
+ }
213
+ resolvedPath = resolvedPath.replace("{OrderId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
214
+ }
215
+ else {
216
+ throw new Error("No value provided for input HTTP label: OrderId.");
217
+ }
218
+ let body;
219
+ return new protocol_http_1.HttpRequest({
220
+ protocol,
221
+ hostname,
222
+ port,
223
+ method: "GET",
224
+ headers,
225
+ path: resolvedPath,
226
+ body,
227
+ });
228
+ };
229
+ exports.serializeAws_restJson1GetOrderCommand = serializeAws_restJson1GetOrderCommand;
114
230
  const serializeAws_restJson1GetOutpostCommand = async (input, context) => {
115
231
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
232
  const headers = {};
@@ -168,6 +284,114 @@ const serializeAws_restJson1GetOutpostInstanceTypesCommand = async (input, conte
168
284
  });
169
285
  };
170
286
  exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = serializeAws_restJson1GetOutpostInstanceTypesCommand;
287
+ const serializeAws_restJson1GetSiteCommand = async (input, context) => {
288
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
289
+ const headers = {};
290
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}";
291
+ if (input.SiteId !== undefined) {
292
+ const labelValue = input.SiteId;
293
+ if (labelValue.length <= 0) {
294
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
295
+ }
296
+ resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
297
+ }
298
+ else {
299
+ throw new Error("No value provided for input HTTP label: SiteId.");
300
+ }
301
+ let body;
302
+ return new protocol_http_1.HttpRequest({
303
+ protocol,
304
+ hostname,
305
+ port,
306
+ method: "GET",
307
+ headers,
308
+ path: resolvedPath,
309
+ body,
310
+ });
311
+ };
312
+ exports.serializeAws_restJson1GetSiteCommand = serializeAws_restJson1GetSiteCommand;
313
+ const serializeAws_restJson1GetSiteAddressCommand = async (input, context) => {
314
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
+ const headers = {};
316
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/address";
317
+ if (input.SiteId !== undefined) {
318
+ const labelValue = input.SiteId;
319
+ if (labelValue.length <= 0) {
320
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
321
+ }
322
+ resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
323
+ }
324
+ else {
325
+ throw new Error("No value provided for input HTTP label: SiteId.");
326
+ }
327
+ const query = {
328
+ ...(input.AddressType !== undefined && { AddressType: input.AddressType }),
329
+ };
330
+ let body;
331
+ return new protocol_http_1.HttpRequest({
332
+ protocol,
333
+ hostname,
334
+ port,
335
+ method: "GET",
336
+ headers,
337
+ path: resolvedPath,
338
+ query,
339
+ body,
340
+ });
341
+ };
342
+ exports.serializeAws_restJson1GetSiteAddressCommand = serializeAws_restJson1GetSiteAddressCommand;
343
+ const serializeAws_restJson1ListCatalogItemsCommand = async (input, context) => {
344
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
345
+ const headers = {};
346
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/catalog/items";
347
+ const query = {
348
+ ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
349
+ ...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
350
+ ...(input.ItemClassFilter !== undefined && {
351
+ ItemClassFilter: (input.ItemClassFilter || []).map((_entry) => _entry),
352
+ }),
353
+ ...(input.SupportedStorageFilter !== undefined && {
354
+ SupportedStorageFilter: (input.SupportedStorageFilter || []).map((_entry) => _entry),
355
+ }),
356
+ ...(input.EC2FamilyFilter !== undefined && {
357
+ EC2FamilyFilter: (input.EC2FamilyFilter || []).map((_entry) => _entry),
358
+ }),
359
+ };
360
+ let body;
361
+ return new protocol_http_1.HttpRequest({
362
+ protocol,
363
+ hostname,
364
+ port,
365
+ method: "GET",
366
+ headers,
367
+ path: resolvedPath,
368
+ query,
369
+ body,
370
+ });
371
+ };
372
+ exports.serializeAws_restJson1ListCatalogItemsCommand = serializeAws_restJson1ListCatalogItemsCommand;
373
+ const serializeAws_restJson1ListOrdersCommand = async (input, context) => {
374
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
375
+ const headers = {};
376
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/list-orders";
377
+ const query = {
378
+ ...(input.OutpostIdentifierFilter !== undefined && { OutpostIdentifierFilter: input.OutpostIdentifierFilter }),
379
+ ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
380
+ ...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
381
+ };
382
+ let body;
383
+ return new protocol_http_1.HttpRequest({
384
+ protocol,
385
+ hostname,
386
+ port,
387
+ method: "GET",
388
+ headers,
389
+ path: resolvedPath,
390
+ query,
391
+ body,
392
+ });
393
+ };
394
+ exports.serializeAws_restJson1ListOrdersCommand = serializeAws_restJson1ListOrdersCommand;
171
395
  const serializeAws_restJson1ListOutpostsCommand = async (input, context) => {
172
396
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
397
  const headers = {};
@@ -306,18 +530,203 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
306
530
  });
307
531
  };
308
532
  exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
309
- const deserializeAws_restJson1CreateOrderCommand = async (output, context) => {
533
+ const serializeAws_restJson1UpdateSiteCommand = async (input, context) => {
534
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
535
+ const headers = {
536
+ "content-type": "application/json",
537
+ };
538
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}";
539
+ if (input.SiteId !== undefined) {
540
+ const labelValue = input.SiteId;
541
+ if (labelValue.length <= 0) {
542
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
543
+ }
544
+ resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
545
+ }
546
+ else {
547
+ throw new Error("No value provided for input HTTP label: SiteId.");
548
+ }
549
+ let body;
550
+ body = JSON.stringify({
551
+ ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
552
+ ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
553
+ ...(input.Notes !== undefined && input.Notes !== null && { Notes: input.Notes }),
554
+ });
555
+ return new protocol_http_1.HttpRequest({
556
+ protocol,
557
+ hostname,
558
+ port,
559
+ method: "PATCH",
560
+ headers,
561
+ path: resolvedPath,
562
+ body,
563
+ });
564
+ };
565
+ exports.serializeAws_restJson1UpdateSiteCommand = serializeAws_restJson1UpdateSiteCommand;
566
+ const serializeAws_restJson1UpdateSiteAddressCommand = async (input, context) => {
567
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
568
+ const headers = {
569
+ "content-type": "application/json",
570
+ };
571
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/address";
572
+ if (input.SiteId !== undefined) {
573
+ const labelValue = input.SiteId;
574
+ if (labelValue.length <= 0) {
575
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
576
+ }
577
+ resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
578
+ }
579
+ else {
580
+ throw new Error("No value provided for input HTTP label: SiteId.");
581
+ }
582
+ let body;
583
+ body = JSON.stringify({
584
+ ...(input.Address !== undefined &&
585
+ input.Address !== null && { Address: serializeAws_restJson1Address(input.Address, context) }),
586
+ ...(input.AddressType !== undefined && input.AddressType !== null && { AddressType: input.AddressType }),
587
+ });
588
+ return new protocol_http_1.HttpRequest({
589
+ protocol,
590
+ hostname,
591
+ port,
592
+ method: "PUT",
593
+ headers,
594
+ path: resolvedPath,
595
+ body,
596
+ });
597
+ };
598
+ exports.serializeAws_restJson1UpdateSiteAddressCommand = serializeAws_restJson1UpdateSiteAddressCommand;
599
+ const serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = async (input, context) => {
600
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
601
+ const headers = {
602
+ "content-type": "application/json",
603
+ };
604
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/rackPhysicalProperties";
605
+ if (input.SiteId !== undefined) {
606
+ const labelValue = input.SiteId;
607
+ if (labelValue.length <= 0) {
608
+ throw new Error("Empty value provided for input HTTP label: SiteId.");
609
+ }
610
+ resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
611
+ }
612
+ else {
613
+ throw new Error("No value provided for input HTTP label: SiteId.");
614
+ }
615
+ let body;
616
+ body = JSON.stringify({
617
+ ...(input.FiberOpticCableType !== undefined &&
618
+ input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType }),
619
+ ...(input.MaximumSupportedWeightLbs !== undefined &&
620
+ input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }),
621
+ ...(input.OpticalStandard !== undefined &&
622
+ input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard }),
623
+ ...(input.PowerConnector !== undefined &&
624
+ input.PowerConnector !== null && { PowerConnector: input.PowerConnector }),
625
+ ...(input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva }),
626
+ ...(input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop }),
627
+ ...(input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase }),
628
+ ...(input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount }),
629
+ ...(input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps }),
630
+ });
631
+ return new protocol_http_1.HttpRequest({
632
+ protocol,
633
+ hostname,
634
+ port,
635
+ method: "PATCH",
636
+ headers,
637
+ path: resolvedPath,
638
+ body,
639
+ });
640
+ };
641
+ exports.serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand;
642
+ const deserializeAws_restJson1CancelOrderCommand = async (output, context) => {
310
643
  if (output.statusCode !== 200 && output.statusCode >= 300) {
311
- return deserializeAws_restJson1CreateOrderCommandError(output, context);
644
+ return deserializeAws_restJson1CancelOrderCommandError(output, context);
312
645
  }
313
646
  const contents = {
314
647
  $metadata: deserializeMetadata(output),
315
- Order: undefined,
316
648
  };
317
- const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
318
- if (data.Order !== undefined && data.Order !== null) {
319
- contents.Order = deserializeAws_restJson1Order(data.Order, context);
320
- }
649
+ await collectBody(output.body, context);
650
+ return Promise.resolve(contents);
651
+ };
652
+ exports.deserializeAws_restJson1CancelOrderCommand = deserializeAws_restJson1CancelOrderCommand;
653
+ const deserializeAws_restJson1CancelOrderCommandError = async (output, context) => {
654
+ const parsedOutput = {
655
+ ...output,
656
+ body: await parseBody(output.body, context),
657
+ };
658
+ let response;
659
+ let errorCode = "UnknownError";
660
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
661
+ switch (errorCode) {
662
+ case "AccessDeniedException":
663
+ case "com.amazonaws.outposts#AccessDeniedException":
664
+ response = {
665
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
666
+ name: errorCode,
667
+ $metadata: deserializeMetadata(output),
668
+ };
669
+ break;
670
+ case "ConflictException":
671
+ case "com.amazonaws.outposts#ConflictException":
672
+ response = {
673
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
674
+ name: errorCode,
675
+ $metadata: deserializeMetadata(output),
676
+ };
677
+ break;
678
+ case "InternalServerException":
679
+ case "com.amazonaws.outposts#InternalServerException":
680
+ response = {
681
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
682
+ name: errorCode,
683
+ $metadata: deserializeMetadata(output),
684
+ };
685
+ break;
686
+ case "NotFoundException":
687
+ case "com.amazonaws.outposts#NotFoundException":
688
+ response = {
689
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
690
+ name: errorCode,
691
+ $metadata: deserializeMetadata(output),
692
+ };
693
+ break;
694
+ case "ValidationException":
695
+ case "com.amazonaws.outposts#ValidationException":
696
+ response = {
697
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
698
+ name: errorCode,
699
+ $metadata: deserializeMetadata(output),
700
+ };
701
+ break;
702
+ default:
703
+ const parsedBody = parsedOutput.body;
704
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
705
+ response = {
706
+ ...parsedBody,
707
+ name: `${errorCode}`,
708
+ message: parsedBody.message || parsedBody.Message || errorCode,
709
+ $fault: "client",
710
+ $metadata: deserializeMetadata(output),
711
+ };
712
+ }
713
+ const message = response.message || response.Message || errorCode;
714
+ response.message = message;
715
+ delete response.Message;
716
+ return Promise.reject(Object.assign(new Error(message), response));
717
+ };
718
+ const deserializeAws_restJson1CreateOrderCommand = async (output, context) => {
719
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
720
+ return deserializeAws_restJson1CreateOrderCommandError(output, context);
721
+ }
722
+ const contents = {
723
+ $metadata: deserializeMetadata(output),
724
+ Order: undefined,
725
+ };
726
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
727
+ if (data.Order !== undefined && data.Order !== null) {
728
+ contents.Order = deserializeAws_restJson1Order(data.Order, context);
729
+ }
321
730
  return Promise.resolve(contents);
322
731
  };
323
732
  exports.deserializeAws_restJson1CreateOrderCommand = deserializeAws_restJson1CreateOrderCommand;
@@ -482,6 +891,86 @@ const deserializeAws_restJson1CreateOutpostCommandError = async (output, context
482
891
  delete response.Message;
483
892
  return Promise.reject(Object.assign(new Error(message), response));
484
893
  };
894
+ const deserializeAws_restJson1CreateSiteCommand = async (output, context) => {
895
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
896
+ return deserializeAws_restJson1CreateSiteCommandError(output, context);
897
+ }
898
+ const contents = {
899
+ $metadata: deserializeMetadata(output),
900
+ Site: undefined,
901
+ };
902
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
903
+ if (data.Site !== undefined && data.Site !== null) {
904
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
905
+ }
906
+ return Promise.resolve(contents);
907
+ };
908
+ exports.deserializeAws_restJson1CreateSiteCommand = deserializeAws_restJson1CreateSiteCommand;
909
+ const deserializeAws_restJson1CreateSiteCommandError = async (output, context) => {
910
+ const parsedOutput = {
911
+ ...output,
912
+ body: await parseBody(output.body, context),
913
+ };
914
+ let response;
915
+ let errorCode = "UnknownError";
916
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
917
+ switch (errorCode) {
918
+ case "AccessDeniedException":
919
+ case "com.amazonaws.outposts#AccessDeniedException":
920
+ response = {
921
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
922
+ name: errorCode,
923
+ $metadata: deserializeMetadata(output),
924
+ };
925
+ break;
926
+ case "ConflictException":
927
+ case "com.amazonaws.outposts#ConflictException":
928
+ response = {
929
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
930
+ name: errorCode,
931
+ $metadata: deserializeMetadata(output),
932
+ };
933
+ break;
934
+ case "InternalServerException":
935
+ case "com.amazonaws.outposts#InternalServerException":
936
+ response = {
937
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
938
+ name: errorCode,
939
+ $metadata: deserializeMetadata(output),
940
+ };
941
+ break;
942
+ case "ServiceQuotaExceededException":
943
+ case "com.amazonaws.outposts#ServiceQuotaExceededException":
944
+ response = {
945
+ ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
946
+ name: errorCode,
947
+ $metadata: deserializeMetadata(output),
948
+ };
949
+ break;
950
+ case "ValidationException":
951
+ case "com.amazonaws.outposts#ValidationException":
952
+ response = {
953
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
954
+ name: errorCode,
955
+ $metadata: deserializeMetadata(output),
956
+ };
957
+ break;
958
+ default:
959
+ const parsedBody = parsedOutput.body;
960
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
961
+ response = {
962
+ ...parsedBody,
963
+ name: `${errorCode}`,
964
+ message: parsedBody.message || parsedBody.Message || errorCode,
965
+ $fault: "client",
966
+ $metadata: deserializeMetadata(output),
967
+ };
968
+ }
969
+ const message = response.message || response.Message || errorCode;
970
+ response.message = message;
971
+ delete response.Message;
972
+ return Promise.reject(Object.assign(new Error(message), response));
973
+ };
485
974
  const deserializeAws_restJson1DeleteOutpostCommand = async (output, context) => {
486
975
  if (output.statusCode !== 200 && output.statusCode >= 300) {
487
976
  return deserializeAws_restJson1DeleteOutpostCommandError(output, context);
@@ -634,22 +1123,22 @@ const deserializeAws_restJson1DeleteSiteCommandError = async (output, context) =
634
1123
  delete response.Message;
635
1124
  return Promise.reject(Object.assign(new Error(message), response));
636
1125
  };
637
- const deserializeAws_restJson1GetOutpostCommand = async (output, context) => {
1126
+ const deserializeAws_restJson1GetCatalogItemCommand = async (output, context) => {
638
1127
  if (output.statusCode !== 200 && output.statusCode >= 300) {
639
- return deserializeAws_restJson1GetOutpostCommandError(output, context);
1128
+ return deserializeAws_restJson1GetCatalogItemCommandError(output, context);
640
1129
  }
641
1130
  const contents = {
642
1131
  $metadata: deserializeMetadata(output),
643
- Outpost: undefined,
1132
+ CatalogItem: undefined,
644
1133
  };
645
1134
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
646
- if (data.Outpost !== undefined && data.Outpost !== null) {
647
- contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
1135
+ if (data.CatalogItem !== undefined && data.CatalogItem !== null) {
1136
+ contents.CatalogItem = deserializeAws_restJson1CatalogItem(data.CatalogItem, context);
648
1137
  }
649
1138
  return Promise.resolve(contents);
650
1139
  };
651
- exports.deserializeAws_restJson1GetOutpostCommand = deserializeAws_restJson1GetOutpostCommand;
652
- const deserializeAws_restJson1GetOutpostCommandError = async (output, context) => {
1140
+ exports.deserializeAws_restJson1GetCatalogItemCommand = deserializeAws_restJson1GetCatalogItemCommand;
1141
+ const deserializeAws_restJson1GetCatalogItemCommandError = async (output, context) => {
653
1142
  const parsedOutput = {
654
1143
  ...output,
655
1144
  body: await parseBody(output.body, context),
@@ -658,14 +1147,70 @@ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) =
658
1147
  let errorCode = "UnknownError";
659
1148
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
1149
  switch (errorCode) {
661
- case "AccessDeniedException":
662
- case "com.amazonaws.outposts#AccessDeniedException":
1150
+ case "InternalServerException":
1151
+ case "com.amazonaws.outposts#InternalServerException":
663
1152
  response = {
664
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1153
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1154
+ name: errorCode,
1155
+ $metadata: deserializeMetadata(output),
1156
+ };
1157
+ break;
1158
+ case "NotFoundException":
1159
+ case "com.amazonaws.outposts#NotFoundException":
1160
+ response = {
1161
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1162
+ name: errorCode,
1163
+ $metadata: deserializeMetadata(output),
1164
+ };
1165
+ break;
1166
+ case "ValidationException":
1167
+ case "com.amazonaws.outposts#ValidationException":
1168
+ response = {
1169
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
665
1170
  name: errorCode,
666
1171
  $metadata: deserializeMetadata(output),
667
1172
  };
668
1173
  break;
1174
+ default:
1175
+ const parsedBody = parsedOutput.body;
1176
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1177
+ response = {
1178
+ ...parsedBody,
1179
+ name: `${errorCode}`,
1180
+ message: parsedBody.message || parsedBody.Message || errorCode,
1181
+ $fault: "client",
1182
+ $metadata: deserializeMetadata(output),
1183
+ };
1184
+ }
1185
+ const message = response.message || response.Message || errorCode;
1186
+ response.message = message;
1187
+ delete response.Message;
1188
+ return Promise.reject(Object.assign(new Error(message), response));
1189
+ };
1190
+ const deserializeAws_restJson1GetOrderCommand = async (output, context) => {
1191
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1192
+ return deserializeAws_restJson1GetOrderCommandError(output, context);
1193
+ }
1194
+ const contents = {
1195
+ $metadata: deserializeMetadata(output),
1196
+ Order: undefined,
1197
+ };
1198
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1199
+ if (data.Order !== undefined && data.Order !== null) {
1200
+ contents.Order = deserializeAws_restJson1Order(data.Order, context);
1201
+ }
1202
+ return Promise.resolve(contents);
1203
+ };
1204
+ exports.deserializeAws_restJson1GetOrderCommand = deserializeAws_restJson1GetOrderCommand;
1205
+ const deserializeAws_restJson1GetOrderCommandError = async (output, context) => {
1206
+ const parsedOutput = {
1207
+ ...output,
1208
+ body: await parseBody(output.body, context),
1209
+ };
1210
+ let response;
1211
+ let errorCode = "UnknownError";
1212
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1213
+ switch (errorCode) {
669
1214
  case "InternalServerException":
670
1215
  case "com.amazonaws.outposts#InternalServerException":
671
1216
  response = {
@@ -674,10 +1219,598 @@ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) =
674
1219
  $metadata: deserializeMetadata(output),
675
1220
  };
676
1221
  break;
677
- case "NotFoundException":
678
- case "com.amazonaws.outposts#NotFoundException":
1222
+ case "NotFoundException":
1223
+ case "com.amazonaws.outposts#NotFoundException":
1224
+ response = {
1225
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1226
+ name: errorCode,
1227
+ $metadata: deserializeMetadata(output),
1228
+ };
1229
+ break;
1230
+ case "ValidationException":
1231
+ case "com.amazonaws.outposts#ValidationException":
1232
+ response = {
1233
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1234
+ name: errorCode,
1235
+ $metadata: deserializeMetadata(output),
1236
+ };
1237
+ break;
1238
+ default:
1239
+ const parsedBody = parsedOutput.body;
1240
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1241
+ response = {
1242
+ ...parsedBody,
1243
+ name: `${errorCode}`,
1244
+ message: parsedBody.message || parsedBody.Message || errorCode,
1245
+ $fault: "client",
1246
+ $metadata: deserializeMetadata(output),
1247
+ };
1248
+ }
1249
+ const message = response.message || response.Message || errorCode;
1250
+ response.message = message;
1251
+ delete response.Message;
1252
+ return Promise.reject(Object.assign(new Error(message), response));
1253
+ };
1254
+ const deserializeAws_restJson1GetOutpostCommand = async (output, context) => {
1255
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1256
+ return deserializeAws_restJson1GetOutpostCommandError(output, context);
1257
+ }
1258
+ const contents = {
1259
+ $metadata: deserializeMetadata(output),
1260
+ Outpost: undefined,
1261
+ };
1262
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1263
+ if (data.Outpost !== undefined && data.Outpost !== null) {
1264
+ contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
1265
+ }
1266
+ return Promise.resolve(contents);
1267
+ };
1268
+ exports.deserializeAws_restJson1GetOutpostCommand = deserializeAws_restJson1GetOutpostCommand;
1269
+ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) => {
1270
+ const parsedOutput = {
1271
+ ...output,
1272
+ body: await parseBody(output.body, context),
1273
+ };
1274
+ let response;
1275
+ let errorCode = "UnknownError";
1276
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1277
+ switch (errorCode) {
1278
+ case "AccessDeniedException":
1279
+ case "com.amazonaws.outposts#AccessDeniedException":
1280
+ response = {
1281
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1282
+ name: errorCode,
1283
+ $metadata: deserializeMetadata(output),
1284
+ };
1285
+ break;
1286
+ case "InternalServerException":
1287
+ case "com.amazonaws.outposts#InternalServerException":
1288
+ response = {
1289
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1290
+ name: errorCode,
1291
+ $metadata: deserializeMetadata(output),
1292
+ };
1293
+ break;
1294
+ case "NotFoundException":
1295
+ case "com.amazonaws.outposts#NotFoundException":
1296
+ response = {
1297
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1298
+ name: errorCode,
1299
+ $metadata: deserializeMetadata(output),
1300
+ };
1301
+ break;
1302
+ case "ValidationException":
1303
+ case "com.amazonaws.outposts#ValidationException":
1304
+ response = {
1305
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1306
+ name: errorCode,
1307
+ $metadata: deserializeMetadata(output),
1308
+ };
1309
+ break;
1310
+ default:
1311
+ const parsedBody = parsedOutput.body;
1312
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1313
+ response = {
1314
+ ...parsedBody,
1315
+ name: `${errorCode}`,
1316
+ message: parsedBody.message || parsedBody.Message || errorCode,
1317
+ $fault: "client",
1318
+ $metadata: deserializeMetadata(output),
1319
+ };
1320
+ }
1321
+ const message = response.message || response.Message || errorCode;
1322
+ response.message = message;
1323
+ delete response.Message;
1324
+ return Promise.reject(Object.assign(new Error(message), response));
1325
+ };
1326
+ const deserializeAws_restJson1GetOutpostInstanceTypesCommand = async (output, context) => {
1327
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1328
+ return deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context);
1329
+ }
1330
+ const contents = {
1331
+ $metadata: deserializeMetadata(output),
1332
+ InstanceTypes: undefined,
1333
+ NextToken: undefined,
1334
+ OutpostArn: undefined,
1335
+ OutpostId: undefined,
1336
+ };
1337
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1338
+ if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
1339
+ contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
1340
+ }
1341
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1342
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
1343
+ }
1344
+ if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
1345
+ contents.OutpostArn = smithy_client_1.expectString(data.OutpostArn);
1346
+ }
1347
+ if (data.OutpostId !== undefined && data.OutpostId !== null) {
1348
+ contents.OutpostId = smithy_client_1.expectString(data.OutpostId);
1349
+ }
1350
+ return Promise.resolve(contents);
1351
+ };
1352
+ exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = deserializeAws_restJson1GetOutpostInstanceTypesCommand;
1353
+ const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (output, context) => {
1354
+ const parsedOutput = {
1355
+ ...output,
1356
+ body: await parseBody(output.body, context),
1357
+ };
1358
+ let response;
1359
+ let errorCode = "UnknownError";
1360
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1361
+ switch (errorCode) {
1362
+ case "AccessDeniedException":
1363
+ case "com.amazonaws.outposts#AccessDeniedException":
1364
+ response = {
1365
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1366
+ name: errorCode,
1367
+ $metadata: deserializeMetadata(output),
1368
+ };
1369
+ break;
1370
+ case "InternalServerException":
1371
+ case "com.amazonaws.outposts#InternalServerException":
1372
+ response = {
1373
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1374
+ name: errorCode,
1375
+ $metadata: deserializeMetadata(output),
1376
+ };
1377
+ break;
1378
+ case "NotFoundException":
1379
+ case "com.amazonaws.outposts#NotFoundException":
1380
+ response = {
1381
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1382
+ name: errorCode,
1383
+ $metadata: deserializeMetadata(output),
1384
+ };
1385
+ break;
1386
+ case "ValidationException":
1387
+ case "com.amazonaws.outposts#ValidationException":
1388
+ response = {
1389
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1390
+ name: errorCode,
1391
+ $metadata: deserializeMetadata(output),
1392
+ };
1393
+ break;
1394
+ default:
1395
+ const parsedBody = parsedOutput.body;
1396
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1397
+ response = {
1398
+ ...parsedBody,
1399
+ name: `${errorCode}`,
1400
+ message: parsedBody.message || parsedBody.Message || errorCode,
1401
+ $fault: "client",
1402
+ $metadata: deserializeMetadata(output),
1403
+ };
1404
+ }
1405
+ const message = response.message || response.Message || errorCode;
1406
+ response.message = message;
1407
+ delete response.Message;
1408
+ return Promise.reject(Object.assign(new Error(message), response));
1409
+ };
1410
+ const deserializeAws_restJson1GetSiteCommand = async (output, context) => {
1411
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1412
+ return deserializeAws_restJson1GetSiteCommandError(output, context);
1413
+ }
1414
+ const contents = {
1415
+ $metadata: deserializeMetadata(output),
1416
+ Site: undefined,
1417
+ };
1418
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1419
+ if (data.Site !== undefined && data.Site !== null) {
1420
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
1421
+ }
1422
+ return Promise.resolve(contents);
1423
+ };
1424
+ exports.deserializeAws_restJson1GetSiteCommand = deserializeAws_restJson1GetSiteCommand;
1425
+ const deserializeAws_restJson1GetSiteCommandError = async (output, context) => {
1426
+ const parsedOutput = {
1427
+ ...output,
1428
+ body: await parseBody(output.body, context),
1429
+ };
1430
+ let response;
1431
+ let errorCode = "UnknownError";
1432
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1433
+ switch (errorCode) {
1434
+ case "AccessDeniedException":
1435
+ case "com.amazonaws.outposts#AccessDeniedException":
1436
+ response = {
1437
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1438
+ name: errorCode,
1439
+ $metadata: deserializeMetadata(output),
1440
+ };
1441
+ break;
1442
+ case "InternalServerException":
1443
+ case "com.amazonaws.outposts#InternalServerException":
1444
+ response = {
1445
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1446
+ name: errorCode,
1447
+ $metadata: deserializeMetadata(output),
1448
+ };
1449
+ break;
1450
+ case "NotFoundException":
1451
+ case "com.amazonaws.outposts#NotFoundException":
1452
+ response = {
1453
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1454
+ name: errorCode,
1455
+ $metadata: deserializeMetadata(output),
1456
+ };
1457
+ break;
1458
+ case "ValidationException":
1459
+ case "com.amazonaws.outposts#ValidationException":
1460
+ response = {
1461
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1462
+ name: errorCode,
1463
+ $metadata: deserializeMetadata(output),
1464
+ };
1465
+ break;
1466
+ default:
1467
+ const parsedBody = parsedOutput.body;
1468
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1469
+ response = {
1470
+ ...parsedBody,
1471
+ name: `${errorCode}`,
1472
+ message: parsedBody.message || parsedBody.Message || errorCode,
1473
+ $fault: "client",
1474
+ $metadata: deserializeMetadata(output),
1475
+ };
1476
+ }
1477
+ const message = response.message || response.Message || errorCode;
1478
+ response.message = message;
1479
+ delete response.Message;
1480
+ return Promise.reject(Object.assign(new Error(message), response));
1481
+ };
1482
+ const deserializeAws_restJson1GetSiteAddressCommand = async (output, context) => {
1483
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1484
+ return deserializeAws_restJson1GetSiteAddressCommandError(output, context);
1485
+ }
1486
+ const contents = {
1487
+ $metadata: deserializeMetadata(output),
1488
+ Address: undefined,
1489
+ AddressType: undefined,
1490
+ SiteId: undefined,
1491
+ };
1492
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1493
+ if (data.Address !== undefined && data.Address !== null) {
1494
+ contents.Address = deserializeAws_restJson1Address(data.Address, context);
1495
+ }
1496
+ if (data.AddressType !== undefined && data.AddressType !== null) {
1497
+ contents.AddressType = smithy_client_1.expectString(data.AddressType);
1498
+ }
1499
+ if (data.SiteId !== undefined && data.SiteId !== null) {
1500
+ contents.SiteId = smithy_client_1.expectString(data.SiteId);
1501
+ }
1502
+ return Promise.resolve(contents);
1503
+ };
1504
+ exports.deserializeAws_restJson1GetSiteAddressCommand = deserializeAws_restJson1GetSiteAddressCommand;
1505
+ const deserializeAws_restJson1GetSiteAddressCommandError = async (output, context) => {
1506
+ const parsedOutput = {
1507
+ ...output,
1508
+ body: await parseBody(output.body, context),
1509
+ };
1510
+ let response;
1511
+ let errorCode = "UnknownError";
1512
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1513
+ switch (errorCode) {
1514
+ case "AccessDeniedException":
1515
+ case "com.amazonaws.outposts#AccessDeniedException":
1516
+ response = {
1517
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1518
+ name: errorCode,
1519
+ $metadata: deserializeMetadata(output),
1520
+ };
1521
+ break;
1522
+ case "InternalServerException":
1523
+ case "com.amazonaws.outposts#InternalServerException":
1524
+ response = {
1525
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1526
+ name: errorCode,
1527
+ $metadata: deserializeMetadata(output),
1528
+ };
1529
+ break;
1530
+ case "NotFoundException":
1531
+ case "com.amazonaws.outposts#NotFoundException":
1532
+ response = {
1533
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1534
+ name: errorCode,
1535
+ $metadata: deserializeMetadata(output),
1536
+ };
1537
+ break;
1538
+ case "ValidationException":
1539
+ case "com.amazonaws.outposts#ValidationException":
1540
+ response = {
1541
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1542
+ name: errorCode,
1543
+ $metadata: deserializeMetadata(output),
1544
+ };
1545
+ break;
1546
+ default:
1547
+ const parsedBody = parsedOutput.body;
1548
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1549
+ response = {
1550
+ ...parsedBody,
1551
+ name: `${errorCode}`,
1552
+ message: parsedBody.message || parsedBody.Message || errorCode,
1553
+ $fault: "client",
1554
+ $metadata: deserializeMetadata(output),
1555
+ };
1556
+ }
1557
+ const message = response.message || response.Message || errorCode;
1558
+ response.message = message;
1559
+ delete response.Message;
1560
+ return Promise.reject(Object.assign(new Error(message), response));
1561
+ };
1562
+ const deserializeAws_restJson1ListCatalogItemsCommand = async (output, context) => {
1563
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1564
+ return deserializeAws_restJson1ListCatalogItemsCommandError(output, context);
1565
+ }
1566
+ const contents = {
1567
+ $metadata: deserializeMetadata(output),
1568
+ CatalogItems: undefined,
1569
+ NextToken: undefined,
1570
+ };
1571
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1572
+ if (data.CatalogItems !== undefined && data.CatalogItems !== null) {
1573
+ contents.CatalogItems = deserializeAws_restJson1CatalogItemListDefinition(data.CatalogItems, context);
1574
+ }
1575
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1576
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
1577
+ }
1578
+ return Promise.resolve(contents);
1579
+ };
1580
+ exports.deserializeAws_restJson1ListCatalogItemsCommand = deserializeAws_restJson1ListCatalogItemsCommand;
1581
+ const deserializeAws_restJson1ListCatalogItemsCommandError = async (output, context) => {
1582
+ const parsedOutput = {
1583
+ ...output,
1584
+ body: await parseBody(output.body, context),
1585
+ };
1586
+ let response;
1587
+ let errorCode = "UnknownError";
1588
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1589
+ switch (errorCode) {
1590
+ case "InternalServerException":
1591
+ case "com.amazonaws.outposts#InternalServerException":
1592
+ response = {
1593
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1594
+ name: errorCode,
1595
+ $metadata: deserializeMetadata(output),
1596
+ };
1597
+ break;
1598
+ case "NotFoundException":
1599
+ case "com.amazonaws.outposts#NotFoundException":
1600
+ response = {
1601
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1602
+ name: errorCode,
1603
+ $metadata: deserializeMetadata(output),
1604
+ };
1605
+ break;
1606
+ case "ValidationException":
1607
+ case "com.amazonaws.outposts#ValidationException":
1608
+ response = {
1609
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1610
+ name: errorCode,
1611
+ $metadata: deserializeMetadata(output),
1612
+ };
1613
+ break;
1614
+ default:
1615
+ const parsedBody = parsedOutput.body;
1616
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1617
+ response = {
1618
+ ...parsedBody,
1619
+ name: `${errorCode}`,
1620
+ message: parsedBody.message || parsedBody.Message || errorCode,
1621
+ $fault: "client",
1622
+ $metadata: deserializeMetadata(output),
1623
+ };
1624
+ }
1625
+ const message = response.message || response.Message || errorCode;
1626
+ response.message = message;
1627
+ delete response.Message;
1628
+ return Promise.reject(Object.assign(new Error(message), response));
1629
+ };
1630
+ const deserializeAws_restJson1ListOrdersCommand = async (output, context) => {
1631
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1632
+ return deserializeAws_restJson1ListOrdersCommandError(output, context);
1633
+ }
1634
+ const contents = {
1635
+ $metadata: deserializeMetadata(output),
1636
+ NextToken: undefined,
1637
+ Orders: undefined,
1638
+ };
1639
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1640
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1641
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
1642
+ }
1643
+ if (data.Orders !== undefined && data.Orders !== null) {
1644
+ contents.Orders = deserializeAws_restJson1OrderSummaryListDefinition(data.Orders, context);
1645
+ }
1646
+ return Promise.resolve(contents);
1647
+ };
1648
+ exports.deserializeAws_restJson1ListOrdersCommand = deserializeAws_restJson1ListOrdersCommand;
1649
+ const deserializeAws_restJson1ListOrdersCommandError = async (output, context) => {
1650
+ const parsedOutput = {
1651
+ ...output,
1652
+ body: await parseBody(output.body, context),
1653
+ };
1654
+ let response;
1655
+ let errorCode = "UnknownError";
1656
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1657
+ switch (errorCode) {
1658
+ case "AccessDeniedException":
1659
+ case "com.amazonaws.outposts#AccessDeniedException":
1660
+ response = {
1661
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1662
+ name: errorCode,
1663
+ $metadata: deserializeMetadata(output),
1664
+ };
1665
+ break;
1666
+ case "InternalServerException":
1667
+ case "com.amazonaws.outposts#InternalServerException":
1668
+ response = {
1669
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1670
+ name: errorCode,
1671
+ $metadata: deserializeMetadata(output),
1672
+ };
1673
+ break;
1674
+ case "NotFoundException":
1675
+ case "com.amazonaws.outposts#NotFoundException":
1676
+ response = {
1677
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1678
+ name: errorCode,
1679
+ $metadata: deserializeMetadata(output),
1680
+ };
1681
+ break;
1682
+ case "ValidationException":
1683
+ case "com.amazonaws.outposts#ValidationException":
1684
+ response = {
1685
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1686
+ name: errorCode,
1687
+ $metadata: deserializeMetadata(output),
1688
+ };
1689
+ break;
1690
+ default:
1691
+ const parsedBody = parsedOutput.body;
1692
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1693
+ response = {
1694
+ ...parsedBody,
1695
+ name: `${errorCode}`,
1696
+ message: parsedBody.message || parsedBody.Message || errorCode,
1697
+ $fault: "client",
1698
+ $metadata: deserializeMetadata(output),
1699
+ };
1700
+ }
1701
+ const message = response.message || response.Message || errorCode;
1702
+ response.message = message;
1703
+ delete response.Message;
1704
+ return Promise.reject(Object.assign(new Error(message), response));
1705
+ };
1706
+ const deserializeAws_restJson1ListOutpostsCommand = async (output, context) => {
1707
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1708
+ return deserializeAws_restJson1ListOutpostsCommandError(output, context);
1709
+ }
1710
+ const contents = {
1711
+ $metadata: deserializeMetadata(output),
1712
+ NextToken: undefined,
1713
+ Outposts: undefined,
1714
+ };
1715
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1716
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1717
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
1718
+ }
1719
+ if (data.Outposts !== undefined && data.Outposts !== null) {
1720
+ contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
1721
+ }
1722
+ return Promise.resolve(contents);
1723
+ };
1724
+ exports.deserializeAws_restJson1ListOutpostsCommand = deserializeAws_restJson1ListOutpostsCommand;
1725
+ const deserializeAws_restJson1ListOutpostsCommandError = async (output, context) => {
1726
+ const parsedOutput = {
1727
+ ...output,
1728
+ body: await parseBody(output.body, context),
1729
+ };
1730
+ let response;
1731
+ let errorCode = "UnknownError";
1732
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1733
+ switch (errorCode) {
1734
+ case "AccessDeniedException":
1735
+ case "com.amazonaws.outposts#AccessDeniedException":
1736
+ response = {
1737
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1738
+ name: errorCode,
1739
+ $metadata: deserializeMetadata(output),
1740
+ };
1741
+ break;
1742
+ case "InternalServerException":
1743
+ case "com.amazonaws.outposts#InternalServerException":
1744
+ response = {
1745
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1746
+ name: errorCode,
1747
+ $metadata: deserializeMetadata(output),
1748
+ };
1749
+ break;
1750
+ case "ValidationException":
1751
+ case "com.amazonaws.outposts#ValidationException":
1752
+ response = {
1753
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1754
+ name: errorCode,
1755
+ $metadata: deserializeMetadata(output),
1756
+ };
1757
+ break;
1758
+ default:
1759
+ const parsedBody = parsedOutput.body;
1760
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1761
+ response = {
1762
+ ...parsedBody,
1763
+ name: `${errorCode}`,
1764
+ message: parsedBody.message || parsedBody.Message || errorCode,
1765
+ $fault: "client",
1766
+ $metadata: deserializeMetadata(output),
1767
+ };
1768
+ }
1769
+ const message = response.message || response.Message || errorCode;
1770
+ response.message = message;
1771
+ delete response.Message;
1772
+ return Promise.reject(Object.assign(new Error(message), response));
1773
+ };
1774
+ const deserializeAws_restJson1ListSitesCommand = async (output, context) => {
1775
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1776
+ return deserializeAws_restJson1ListSitesCommandError(output, context);
1777
+ }
1778
+ const contents = {
1779
+ $metadata: deserializeMetadata(output),
1780
+ NextToken: undefined,
1781
+ Sites: undefined,
1782
+ };
1783
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1784
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1785
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
1786
+ }
1787
+ if (data.Sites !== undefined && data.Sites !== null) {
1788
+ contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
1789
+ }
1790
+ return Promise.resolve(contents);
1791
+ };
1792
+ exports.deserializeAws_restJson1ListSitesCommand = deserializeAws_restJson1ListSitesCommand;
1793
+ const deserializeAws_restJson1ListSitesCommandError = async (output, context) => {
1794
+ const parsedOutput = {
1795
+ ...output,
1796
+ body: await parseBody(output.body, context),
1797
+ };
1798
+ let response;
1799
+ let errorCode = "UnknownError";
1800
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1801
+ switch (errorCode) {
1802
+ case "AccessDeniedException":
1803
+ case "com.amazonaws.outposts#AccessDeniedException":
1804
+ response = {
1805
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1806
+ name: errorCode,
1807
+ $metadata: deserializeMetadata(output),
1808
+ };
1809
+ break;
1810
+ case "InternalServerException":
1811
+ case "com.amazonaws.outposts#InternalServerException":
679
1812
  response = {
680
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1813
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
681
1814
  name: errorCode,
682
1815
  $metadata: deserializeMetadata(output),
683
1816
  };
@@ -706,34 +1839,22 @@ const deserializeAws_restJson1GetOutpostCommandError = async (output, context) =
706
1839
  delete response.Message;
707
1840
  return Promise.reject(Object.assign(new Error(message), response));
708
1841
  };
709
- const deserializeAws_restJson1GetOutpostInstanceTypesCommand = async (output, context) => {
1842
+ const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
710
1843
  if (output.statusCode !== 200 && output.statusCode >= 300) {
711
- return deserializeAws_restJson1GetOutpostInstanceTypesCommandError(output, context);
1844
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
712
1845
  }
713
1846
  const contents = {
714
1847
  $metadata: deserializeMetadata(output),
715
- InstanceTypes: undefined,
716
- NextToken: undefined,
717
- OutpostArn: undefined,
718
- OutpostId: undefined,
1848
+ Tags: undefined,
719
1849
  };
720
1850
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
721
- if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
722
- contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
723
- }
724
- if (data.NextToken !== undefined && data.NextToken !== null) {
725
- contents.NextToken = smithy_client_1.expectString(data.NextToken);
726
- }
727
- if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
728
- contents.OutpostArn = smithy_client_1.expectString(data.OutpostArn);
729
- }
730
- if (data.OutpostId !== undefined && data.OutpostId !== null) {
731
- contents.OutpostId = smithy_client_1.expectString(data.OutpostId);
1851
+ if (data.Tags !== undefined && data.Tags !== null) {
1852
+ contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
732
1853
  }
733
1854
  return Promise.resolve(contents);
734
1855
  };
735
- exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = deserializeAws_restJson1GetOutpostInstanceTypesCommand;
736
- const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (output, context) => {
1856
+ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
1857
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
737
1858
  const parsedOutput = {
738
1859
  ...output,
739
1860
  body: await parseBody(output.body, context),
@@ -742,14 +1863,6 @@ const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (outpu
742
1863
  let errorCode = "UnknownError";
743
1864
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
744
1865
  switch (errorCode) {
745
- case "AccessDeniedException":
746
- case "com.amazonaws.outposts#AccessDeniedException":
747
- response = {
748
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
749
- name: errorCode,
750
- $metadata: deserializeMetadata(output),
751
- };
752
- break;
753
1866
  case "InternalServerException":
754
1867
  case "com.amazonaws.outposts#InternalServerException":
755
1868
  response = {
@@ -790,26 +1903,18 @@ const deserializeAws_restJson1GetOutpostInstanceTypesCommandError = async (outpu
790
1903
  delete response.Message;
791
1904
  return Promise.reject(Object.assign(new Error(message), response));
792
1905
  };
793
- const deserializeAws_restJson1ListOutpostsCommand = async (output, context) => {
1906
+ const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
794
1907
  if (output.statusCode !== 200 && output.statusCode >= 300) {
795
- return deserializeAws_restJson1ListOutpostsCommandError(output, context);
1908
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
796
1909
  }
797
1910
  const contents = {
798
1911
  $metadata: deserializeMetadata(output),
799
- NextToken: undefined,
800
- Outposts: undefined,
801
1912
  };
802
- const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
803
- if (data.NextToken !== undefined && data.NextToken !== null) {
804
- contents.NextToken = smithy_client_1.expectString(data.NextToken);
805
- }
806
- if (data.Outposts !== undefined && data.Outposts !== null) {
807
- contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
808
- }
1913
+ await collectBody(output.body, context);
809
1914
  return Promise.resolve(contents);
810
1915
  };
811
- exports.deserializeAws_restJson1ListOutpostsCommand = deserializeAws_restJson1ListOutpostsCommand;
812
- const deserializeAws_restJson1ListOutpostsCommandError = async (output, context) => {
1916
+ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
1917
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
813
1918
  const parsedOutput = {
814
1919
  ...output,
815
1920
  body: await parseBody(output.body, context),
@@ -818,18 +1923,18 @@ const deserializeAws_restJson1ListOutpostsCommandError = async (output, context)
818
1923
  let errorCode = "UnknownError";
819
1924
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
820
1925
  switch (errorCode) {
821
- case "AccessDeniedException":
822
- case "com.amazonaws.outposts#AccessDeniedException":
1926
+ case "InternalServerException":
1927
+ case "com.amazonaws.outposts#InternalServerException":
823
1928
  response = {
824
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1929
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
825
1930
  name: errorCode,
826
1931
  $metadata: deserializeMetadata(output),
827
1932
  };
828
1933
  break;
829
- case "InternalServerException":
830
- case "com.amazonaws.outposts#InternalServerException":
1934
+ case "NotFoundException":
1935
+ case "com.amazonaws.outposts#NotFoundException":
831
1936
  response = {
832
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1937
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
833
1938
  name: errorCode,
834
1939
  $metadata: deserializeMetadata(output),
835
1940
  };
@@ -858,26 +1963,18 @@ const deserializeAws_restJson1ListOutpostsCommandError = async (output, context)
858
1963
  delete response.Message;
859
1964
  return Promise.reject(Object.assign(new Error(message), response));
860
1965
  };
861
- const deserializeAws_restJson1ListSitesCommand = async (output, context) => {
1966
+ const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
862
1967
  if (output.statusCode !== 200 && output.statusCode >= 300) {
863
- return deserializeAws_restJson1ListSitesCommandError(output, context);
1968
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
864
1969
  }
865
1970
  const contents = {
866
1971
  $metadata: deserializeMetadata(output),
867
- NextToken: undefined,
868
- Sites: undefined,
869
1972
  };
870
- const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
871
- if (data.NextToken !== undefined && data.NextToken !== null) {
872
- contents.NextToken = smithy_client_1.expectString(data.NextToken);
873
- }
874
- if (data.Sites !== undefined && data.Sites !== null) {
875
- contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
876
- }
1973
+ await collectBody(output.body, context);
877
1974
  return Promise.resolve(contents);
878
1975
  };
879
- exports.deserializeAws_restJson1ListSitesCommand = deserializeAws_restJson1ListSitesCommand;
880
- const deserializeAws_restJson1ListSitesCommandError = async (output, context) => {
1976
+ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
1977
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
881
1978
  const parsedOutput = {
882
1979
  ...output,
883
1980
  body: await parseBody(output.body, context),
@@ -886,18 +1983,18 @@ const deserializeAws_restJson1ListSitesCommandError = async (output, context) =>
886
1983
  let errorCode = "UnknownError";
887
1984
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
1985
  switch (errorCode) {
889
- case "AccessDeniedException":
890
- case "com.amazonaws.outposts#AccessDeniedException":
1986
+ case "InternalServerException":
1987
+ case "com.amazonaws.outposts#InternalServerException":
891
1988
  response = {
892
- ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1989
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
893
1990
  name: errorCode,
894
1991
  $metadata: deserializeMetadata(output),
895
1992
  };
896
1993
  break;
897
- case "InternalServerException":
898
- case "com.amazonaws.outposts#InternalServerException":
1994
+ case "NotFoundException":
1995
+ case "com.amazonaws.outposts#NotFoundException":
899
1996
  response = {
900
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1997
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
901
1998
  name: errorCode,
902
1999
  $metadata: deserializeMetadata(output),
903
2000
  };
@@ -926,22 +2023,22 @@ const deserializeAws_restJson1ListSitesCommandError = async (output, context) =>
926
2023
  delete response.Message;
927
2024
  return Promise.reject(Object.assign(new Error(message), response));
928
2025
  };
929
- const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
2026
+ const deserializeAws_restJson1UpdateSiteCommand = async (output, context) => {
930
2027
  if (output.statusCode !== 200 && output.statusCode >= 300) {
931
- return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
2028
+ return deserializeAws_restJson1UpdateSiteCommandError(output, context);
932
2029
  }
933
2030
  const contents = {
934
2031
  $metadata: deserializeMetadata(output),
935
- Tags: undefined,
2032
+ Site: undefined,
936
2033
  };
937
2034
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
938
- if (data.Tags !== undefined && data.Tags !== null) {
939
- contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
2035
+ if (data.Site !== undefined && data.Site !== null) {
2036
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
940
2037
  }
941
2038
  return Promise.resolve(contents);
942
2039
  };
943
- exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
944
- const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
2040
+ exports.deserializeAws_restJson1UpdateSiteCommand = deserializeAws_restJson1UpdateSiteCommand;
2041
+ const deserializeAws_restJson1UpdateSiteCommandError = async (output, context) => {
945
2042
  const parsedOutput = {
946
2043
  ...output,
947
2044
  body: await parseBody(output.body, context),
@@ -950,6 +2047,22 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
950
2047
  let errorCode = "UnknownError";
951
2048
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
952
2049
  switch (errorCode) {
2050
+ case "AccessDeniedException":
2051
+ case "com.amazonaws.outposts#AccessDeniedException":
2052
+ response = {
2053
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2054
+ name: errorCode,
2055
+ $metadata: deserializeMetadata(output),
2056
+ };
2057
+ break;
2058
+ case "ConflictException":
2059
+ case "com.amazonaws.outposts#ConflictException":
2060
+ response = {
2061
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2062
+ name: errorCode,
2063
+ $metadata: deserializeMetadata(output),
2064
+ };
2065
+ break;
953
2066
  case "InternalServerException":
954
2067
  case "com.amazonaws.outposts#InternalServerException":
955
2068
  response = {
@@ -990,18 +2103,26 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
990
2103
  delete response.Message;
991
2104
  return Promise.reject(Object.assign(new Error(message), response));
992
2105
  };
993
- const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
2106
+ const deserializeAws_restJson1UpdateSiteAddressCommand = async (output, context) => {
994
2107
  if (output.statusCode !== 200 && output.statusCode >= 300) {
995
- return deserializeAws_restJson1TagResourceCommandError(output, context);
2108
+ return deserializeAws_restJson1UpdateSiteAddressCommandError(output, context);
996
2109
  }
997
2110
  const contents = {
998
2111
  $metadata: deserializeMetadata(output),
2112
+ Address: undefined,
2113
+ AddressType: undefined,
999
2114
  };
1000
- await collectBody(output.body, context);
2115
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2116
+ if (data.Address !== undefined && data.Address !== null) {
2117
+ contents.Address = deserializeAws_restJson1Address(data.Address, context);
2118
+ }
2119
+ if (data.AddressType !== undefined && data.AddressType !== null) {
2120
+ contents.AddressType = smithy_client_1.expectString(data.AddressType);
2121
+ }
1001
2122
  return Promise.resolve(contents);
1002
2123
  };
1003
- exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
1004
- const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
2124
+ exports.deserializeAws_restJson1UpdateSiteAddressCommand = deserializeAws_restJson1UpdateSiteAddressCommand;
2125
+ const deserializeAws_restJson1UpdateSiteAddressCommandError = async (output, context) => {
1005
2126
  const parsedOutput = {
1006
2127
  ...output,
1007
2128
  body: await parseBody(output.body, context),
@@ -1010,6 +2131,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1010
2131
  let errorCode = "UnknownError";
1011
2132
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1012
2133
  switch (errorCode) {
2134
+ case "AccessDeniedException":
2135
+ case "com.amazonaws.outposts#AccessDeniedException":
2136
+ response = {
2137
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2138
+ name: errorCode,
2139
+ $metadata: deserializeMetadata(output),
2140
+ };
2141
+ break;
2142
+ case "ConflictException":
2143
+ case "com.amazonaws.outposts#ConflictException":
2144
+ response = {
2145
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2146
+ name: errorCode,
2147
+ $metadata: deserializeMetadata(output),
2148
+ };
2149
+ break;
1013
2150
  case "InternalServerException":
1014
2151
  case "com.amazonaws.outposts#InternalServerException":
1015
2152
  response = {
@@ -1050,18 +2187,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1050
2187
  delete response.Message;
1051
2188
  return Promise.reject(Object.assign(new Error(message), response));
1052
2189
  };
1053
- const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
2190
+ const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = async (output, context) => {
1054
2191
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1055
- return deserializeAws_restJson1UntagResourceCommandError(output, context);
2192
+ return deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError(output, context);
1056
2193
  }
1057
2194
  const contents = {
1058
2195
  $metadata: deserializeMetadata(output),
2196
+ Site: undefined,
1059
2197
  };
1060
- await collectBody(output.body, context);
2198
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2199
+ if (data.Site !== undefined && data.Site !== null) {
2200
+ contents.Site = deserializeAws_restJson1Site(data.Site, context);
2201
+ }
1061
2202
  return Promise.resolve(contents);
1062
2203
  };
1063
- exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
1064
- const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2204
+ exports.deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand;
2205
+ const deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommandError = async (output, context) => {
1065
2206
  const parsedOutput = {
1066
2207
  ...output,
1067
2208
  body: await parseBody(output.body, context),
@@ -1070,6 +2211,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1070
2211
  let errorCode = "UnknownError";
1071
2212
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1072
2213
  switch (errorCode) {
2214
+ case "AccessDeniedException":
2215
+ case "com.amazonaws.outposts#AccessDeniedException":
2216
+ response = {
2217
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2218
+ name: errorCode,
2219
+ $metadata: deserializeMetadata(output),
2220
+ };
2221
+ break;
2222
+ case "ConflictException":
2223
+ case "com.amazonaws.outposts#ConflictException":
2224
+ response = {
2225
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2226
+ name: errorCode,
2227
+ $metadata: deserializeMetadata(output),
2228
+ };
2229
+ break;
1073
2230
  case "InternalServerException":
1074
2231
  case "com.amazonaws.outposts#InternalServerException":
1075
2232
  response = {
@@ -1196,6 +2353,23 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
1196
2353
  }
1197
2354
  return contents;
1198
2355
  };
2356
+ const serializeAws_restJson1Address = (input, context) => {
2357
+ return {
2358
+ ...(input.AddressLine1 !== undefined && input.AddressLine1 !== null && { AddressLine1: input.AddressLine1 }),
2359
+ ...(input.AddressLine2 !== undefined && input.AddressLine2 !== null && { AddressLine2: input.AddressLine2 }),
2360
+ ...(input.AddressLine3 !== undefined && input.AddressLine3 !== null && { AddressLine3: input.AddressLine3 }),
2361
+ ...(input.City !== undefined && input.City !== null && { City: input.City }),
2362
+ ...(input.ContactName !== undefined && input.ContactName !== null && { ContactName: input.ContactName }),
2363
+ ...(input.ContactPhoneNumber !== undefined &&
2364
+ input.ContactPhoneNumber !== null && { ContactPhoneNumber: input.ContactPhoneNumber }),
2365
+ ...(input.CountryCode !== undefined && input.CountryCode !== null && { CountryCode: input.CountryCode }),
2366
+ ...(input.DistrictOrCounty !== undefined &&
2367
+ input.DistrictOrCounty !== null && { DistrictOrCounty: input.DistrictOrCounty }),
2368
+ ...(input.Municipality !== undefined && input.Municipality !== null && { Municipality: input.Municipality }),
2369
+ ...(input.PostalCode !== undefined && input.PostalCode !== null && { PostalCode: input.PostalCode }),
2370
+ ...(input.StateOrRegion !== undefined && input.StateOrRegion !== null && { StateOrRegion: input.StateOrRegion }),
2371
+ };
2372
+ };
1199
2373
  const serializeAws_restJson1LineItemRequest = (input, context) => {
1200
2374
  return {
1201
2375
  ...(input.CatalogItemId !== undefined && input.CatalogItemId !== null && { CatalogItemId: input.CatalogItemId }),
@@ -1212,6 +2386,23 @@ const serializeAws_restJson1LineItemRequestListDefinition = (input, context) =>
1212
2386
  return serializeAws_restJson1LineItemRequest(entry, context);
1213
2387
  });
1214
2388
  };
2389
+ const serializeAws_restJson1RackPhysicalProperties = (input, context) => {
2390
+ return {
2391
+ ...(input.FiberOpticCableType !== undefined &&
2392
+ input.FiberOpticCableType !== null && { FiberOpticCableType: input.FiberOpticCableType }),
2393
+ ...(input.MaximumSupportedWeightLbs !== undefined &&
2394
+ input.MaximumSupportedWeightLbs !== null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }),
2395
+ ...(input.OpticalStandard !== undefined &&
2396
+ input.OpticalStandard !== null && { OpticalStandard: input.OpticalStandard }),
2397
+ ...(input.PowerConnector !== undefined &&
2398
+ input.PowerConnector !== null && { PowerConnector: input.PowerConnector }),
2399
+ ...(input.PowerDrawKva !== undefined && input.PowerDrawKva !== null && { PowerDrawKva: input.PowerDrawKva }),
2400
+ ...(input.PowerFeedDrop !== undefined && input.PowerFeedDrop !== null && { PowerFeedDrop: input.PowerFeedDrop }),
2401
+ ...(input.PowerPhase !== undefined && input.PowerPhase !== null && { PowerPhase: input.PowerPhase }),
2402
+ ...(input.UplinkCount !== undefined && input.UplinkCount !== null && { UplinkCount: input.UplinkCount }),
2403
+ ...(input.UplinkGbps !== undefined && input.UplinkGbps !== null && { UplinkGbps: input.UplinkGbps }),
2404
+ };
2405
+ };
1215
2406
  const serializeAws_restJson1TagMap = (input, context) => {
1216
2407
  return Object.entries(input).reduce((acc, [key, value]) => {
1217
2408
  if (value === null) {
@@ -1223,6 +2414,65 @@ const serializeAws_restJson1TagMap = (input, context) => {
1223
2414
  };
1224
2415
  }, {});
1225
2416
  };
2417
+ const deserializeAws_restJson1Address = (output, context) => {
2418
+ return {
2419
+ AddressLine1: smithy_client_1.expectString(output.AddressLine1),
2420
+ AddressLine2: smithy_client_1.expectString(output.AddressLine2),
2421
+ AddressLine3: smithy_client_1.expectString(output.AddressLine3),
2422
+ City: smithy_client_1.expectString(output.City),
2423
+ ContactName: smithy_client_1.expectString(output.ContactName),
2424
+ ContactPhoneNumber: smithy_client_1.expectString(output.ContactPhoneNumber),
2425
+ CountryCode: smithy_client_1.expectString(output.CountryCode),
2426
+ DistrictOrCounty: smithy_client_1.expectString(output.DistrictOrCounty),
2427
+ Municipality: smithy_client_1.expectString(output.Municipality),
2428
+ PostalCode: smithy_client_1.expectString(output.PostalCode),
2429
+ StateOrRegion: smithy_client_1.expectString(output.StateOrRegion),
2430
+ };
2431
+ };
2432
+ const deserializeAws_restJson1CatalogItem = (output, context) => {
2433
+ return {
2434
+ CatalogItemId: smithy_client_1.expectString(output.CatalogItemId),
2435
+ EC2Capacities: output.EC2Capacities !== undefined && output.EC2Capacities !== null
2436
+ ? deserializeAws_restJson1EC2CapacityListDefinition(output.EC2Capacities, context)
2437
+ : undefined,
2438
+ ItemStatus: smithy_client_1.expectString(output.ItemStatus),
2439
+ PowerKva: smithy_client_1.limitedParseFloat32(output.PowerKva),
2440
+ SupportedStorage: output.SupportedStorage !== undefined && output.SupportedStorage !== null
2441
+ ? deserializeAws_restJson1SupportedStorageList(output.SupportedStorage, context)
2442
+ : undefined,
2443
+ SupportedUplinkGbps: output.SupportedUplinkGbps !== undefined && output.SupportedUplinkGbps !== null
2444
+ ? deserializeAws_restJson1SupportedUplinkGbpsListDefinition(output.SupportedUplinkGbps, context)
2445
+ : undefined,
2446
+ WeightLbs: smithy_client_1.expectInt32(output.WeightLbs),
2447
+ };
2448
+ };
2449
+ const deserializeAws_restJson1CatalogItemListDefinition = (output, context) => {
2450
+ return (output || [])
2451
+ .filter((e) => e != null)
2452
+ .map((entry) => {
2453
+ if (entry === null) {
2454
+ return null;
2455
+ }
2456
+ return deserializeAws_restJson1CatalogItem(entry, context);
2457
+ });
2458
+ };
2459
+ const deserializeAws_restJson1EC2Capacity = (output, context) => {
2460
+ return {
2461
+ Family: smithy_client_1.expectString(output.Family),
2462
+ MaxSize: smithy_client_1.expectString(output.MaxSize),
2463
+ Quantity: smithy_client_1.expectString(output.Quantity),
2464
+ };
2465
+ };
2466
+ const deserializeAws_restJson1EC2CapacityListDefinition = (output, context) => {
2467
+ return (output || [])
2468
+ .filter((e) => e != null)
2469
+ .map((entry) => {
2470
+ if (entry === null) {
2471
+ return null;
2472
+ }
2473
+ return deserializeAws_restJson1EC2Capacity(entry, context);
2474
+ });
2475
+ };
1226
2476
  const deserializeAws_restJson1InstanceTypeItem = (output, context) => {
1227
2477
  return {
1228
2478
  InstanceType: smithy_client_1.expectString(output.InstanceType),
@@ -1256,6 +2506,17 @@ const deserializeAws_restJson1LineItemListDefinition = (output, context) => {
1256
2506
  return deserializeAws_restJson1LineItem(entry, context);
1257
2507
  });
1258
2508
  };
2509
+ const deserializeAws_restJson1LineItemStatusCounts = (output, context) => {
2510
+ return Object.entries(output).reduce((acc, [key, value]) => {
2511
+ if (value === null) {
2512
+ return acc;
2513
+ }
2514
+ return {
2515
+ ...acc,
2516
+ [key]: smithy_client_1.expectInt32(value),
2517
+ };
2518
+ }, {});
2519
+ };
1259
2520
  const deserializeAws_restJson1Order = (output, context) => {
1260
2521
  return {
1261
2522
  LineItems: output.LineItems !== undefined && output.LineItems !== null
@@ -1273,6 +2534,33 @@ const deserializeAws_restJson1Order = (output, context) => {
1273
2534
  Status: smithy_client_1.expectString(output.Status),
1274
2535
  };
1275
2536
  };
2537
+ const deserializeAws_restJson1OrderSummary = (output, context) => {
2538
+ return {
2539
+ LineItemCountsByStatus: output.LineItemCountsByStatus !== undefined && output.LineItemCountsByStatus !== null
2540
+ ? deserializeAws_restJson1LineItemStatusCounts(output.LineItemCountsByStatus, context)
2541
+ : undefined,
2542
+ OrderFulfilledDate: output.OrderFulfilledDate !== undefined && output.OrderFulfilledDate !== null
2543
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.OrderFulfilledDate)))
2544
+ : undefined,
2545
+ OrderId: smithy_client_1.expectString(output.OrderId),
2546
+ OrderSubmissionDate: output.OrderSubmissionDate !== undefined && output.OrderSubmissionDate !== null
2547
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.OrderSubmissionDate)))
2548
+ : undefined,
2549
+ OrderType: smithy_client_1.expectString(output.OrderType),
2550
+ OutpostId: smithy_client_1.expectString(output.OutpostId),
2551
+ Status: smithy_client_1.expectString(output.Status),
2552
+ };
2553
+ };
2554
+ const deserializeAws_restJson1OrderSummaryListDefinition = (output, context) => {
2555
+ return (output || [])
2556
+ .filter((e) => e != null)
2557
+ .map((entry) => {
2558
+ if (entry === null) {
2559
+ return null;
2560
+ }
2561
+ return deserializeAws_restJson1OrderSummary(entry, context);
2562
+ });
2563
+ };
1276
2564
  const deserializeAws_restJson1Outpost = (output, context) => {
1277
2565
  return {
1278
2566
  AvailabilityZone: smithy_client_1.expectString(output.AvailabilityZone),
@@ -1285,6 +2573,7 @@ const deserializeAws_restJson1Outpost = (output, context) => {
1285
2573
  OwnerId: smithy_client_1.expectString(output.OwnerId),
1286
2574
  SiteArn: smithy_client_1.expectString(output.SiteArn),
1287
2575
  SiteId: smithy_client_1.expectString(output.SiteId),
2576
+ SupportedHardwareType: smithy_client_1.expectString(output.SupportedHardwareType),
1288
2577
  Tags: output.Tags !== undefined && output.Tags !== null
1289
2578
  ? deserializeAws_restJson1TagMap(output.Tags, context)
1290
2579
  : undefined,
@@ -1300,11 +2589,31 @@ const deserializeAws_restJson1outpostListDefinition = (output, context) => {
1300
2589
  return deserializeAws_restJson1Outpost(entry, context);
1301
2590
  });
1302
2591
  };
2592
+ const deserializeAws_restJson1RackPhysicalProperties = (output, context) => {
2593
+ return {
2594
+ FiberOpticCableType: smithy_client_1.expectString(output.FiberOpticCableType),
2595
+ MaximumSupportedWeightLbs: smithy_client_1.expectString(output.MaximumSupportedWeightLbs),
2596
+ OpticalStandard: smithy_client_1.expectString(output.OpticalStandard),
2597
+ PowerConnector: smithy_client_1.expectString(output.PowerConnector),
2598
+ PowerDrawKva: smithy_client_1.expectString(output.PowerDrawKva),
2599
+ PowerFeedDrop: smithy_client_1.expectString(output.PowerFeedDrop),
2600
+ PowerPhase: smithy_client_1.expectString(output.PowerPhase),
2601
+ UplinkCount: smithy_client_1.expectString(output.UplinkCount),
2602
+ UplinkGbps: smithy_client_1.expectString(output.UplinkGbps),
2603
+ };
2604
+ };
1303
2605
  const deserializeAws_restJson1Site = (output, context) => {
1304
2606
  return {
1305
2607
  AccountId: smithy_client_1.expectString(output.AccountId),
1306
2608
  Description: smithy_client_1.expectString(output.Description),
1307
2609
  Name: smithy_client_1.expectString(output.Name),
2610
+ Notes: smithy_client_1.expectString(output.Notes),
2611
+ OperatingAddressCity: smithy_client_1.expectString(output.OperatingAddressCity),
2612
+ OperatingAddressCountryCode: smithy_client_1.expectString(output.OperatingAddressCountryCode),
2613
+ OperatingAddressStateOrRegion: smithy_client_1.expectString(output.OperatingAddressStateOrRegion),
2614
+ RackPhysicalProperties: output.RackPhysicalProperties !== undefined && output.RackPhysicalProperties !== null
2615
+ ? deserializeAws_restJson1RackPhysicalProperties(output.RackPhysicalProperties, context)
2616
+ : undefined,
1308
2617
  SiteArn: smithy_client_1.expectString(output.SiteArn),
1309
2618
  SiteId: smithy_client_1.expectString(output.SiteId),
1310
2619
  Tags: output.Tags !== undefined && output.Tags !== null
@@ -1322,6 +2631,26 @@ const deserializeAws_restJson1siteListDefinition = (output, context) => {
1322
2631
  return deserializeAws_restJson1Site(entry, context);
1323
2632
  });
1324
2633
  };
2634
+ const deserializeAws_restJson1SupportedStorageList = (output, context) => {
2635
+ return (output || [])
2636
+ .filter((e) => e != null)
2637
+ .map((entry) => {
2638
+ if (entry === null) {
2639
+ return null;
2640
+ }
2641
+ return smithy_client_1.expectString(entry);
2642
+ });
2643
+ };
2644
+ const deserializeAws_restJson1SupportedUplinkGbpsListDefinition = (output, context) => {
2645
+ return (output || [])
2646
+ .filter((e) => e != null)
2647
+ .map((entry) => {
2648
+ if (entry === null) {
2649
+ return null;
2650
+ }
2651
+ return smithy_client_1.expectInt32(entry);
2652
+ });
2653
+ };
1325
2654
  const deserializeAws_restJson1TagMap = (output, context) => {
1326
2655
  return Object.entries(output).reduce((acc, [key, value]) => {
1327
2656
  if (value === null) {