@aws-sdk/client-outposts 3.29.0 → 3.33.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 (81) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/Outposts.ts +27 -0
  3. package/OutpostsClient.ts +3 -0
  4. package/README.md +7 -7
  5. package/commands/CreateOrderCommand.ts +94 -0
  6. package/dist/cjs/Outposts.js +15 -0
  7. package/dist/cjs/Outposts.js.map +1 -1
  8. package/dist/cjs/OutpostsClient.js +13 -13
  9. package/dist/cjs/OutpostsClient.js.map +1 -1
  10. package/dist/cjs/commands/CreateOrderCommand.js +61 -0
  11. package/dist/cjs/commands/CreateOrderCommand.js.map +1 -0
  12. package/dist/cjs/commands/CreateOutpostCommand.js +3 -3
  13. package/dist/cjs/commands/CreateOutpostCommand.js.map +1 -1
  14. package/dist/cjs/commands/DeleteOutpostCommand.js +3 -3
  15. package/dist/cjs/commands/DeleteOutpostCommand.js.map +1 -1
  16. package/dist/cjs/commands/DeleteSiteCommand.js +3 -3
  17. package/dist/cjs/commands/DeleteSiteCommand.js.map +1 -1
  18. package/dist/cjs/commands/GetOutpostCommand.js +3 -3
  19. package/dist/cjs/commands/GetOutpostCommand.js.map +1 -1
  20. package/dist/cjs/commands/GetOutpostInstanceTypesCommand.js +3 -3
  21. package/dist/cjs/commands/GetOutpostInstanceTypesCommand.js.map +1 -1
  22. package/dist/cjs/commands/ListOutpostsCommand.js +3 -3
  23. package/dist/cjs/commands/ListOutpostsCommand.js.map +1 -1
  24. package/dist/cjs/commands/ListSitesCommand.js +3 -3
  25. package/dist/cjs/commands/ListSitesCommand.js.map +1 -1
  26. package/dist/cjs/commands/ListTagsForResourceCommand.js +3 -3
  27. package/dist/cjs/commands/ListTagsForResourceCommand.js.map +1 -1
  28. package/dist/cjs/commands/TagResourceCommand.js +3 -3
  29. package/dist/cjs/commands/TagResourceCommand.js.map +1 -1
  30. package/dist/cjs/commands/UntagResourceCommand.js +3 -3
  31. package/dist/cjs/commands/UntagResourceCommand.js.map +1 -1
  32. package/dist/cjs/endpoints.js +1 -1
  33. package/dist/cjs/endpoints.js.map +1 -1
  34. package/dist/cjs/index.js +17 -16
  35. package/dist/cjs/index.js.map +1 -1
  36. package/dist/cjs/models/index.js +1 -1
  37. package/dist/cjs/models/index.js.map +1 -1
  38. package/dist/cjs/models/models_0.js +77 -13
  39. package/dist/cjs/models/models_0.js.map +1 -1
  40. package/dist/cjs/package.json +31 -31
  41. package/dist/cjs/protocols/Aws_restJson1.js +211 -44
  42. package/dist/cjs/protocols/Aws_restJson1.js.map +1 -1
  43. package/dist/cjs/runtimeConfig.browser.js +4 -4
  44. package/dist/cjs/runtimeConfig.browser.js.map +1 -1
  45. package/dist/cjs/runtimeConfig.js +8 -8
  46. package/dist/cjs/runtimeConfig.js.map +1 -1
  47. package/dist/cjs/runtimeConfig.native.js +1 -1
  48. package/dist/cjs/runtimeConfig.native.js.map +1 -1
  49. package/dist/es/Outposts.js +15 -0
  50. package/dist/es/Outposts.js.map +1 -1
  51. package/dist/es/OutpostsClient.js.map +1 -1
  52. package/dist/es/commands/CreateOrderCommand.js +65 -0
  53. package/dist/es/commands/CreateOrderCommand.js.map +1 -0
  54. package/dist/es/index.js +1 -0
  55. package/dist/es/index.js.map +1 -1
  56. package/dist/es/models/models_0.js +66 -12
  57. package/dist/es/models/models_0.js.map +1 -1
  58. package/dist/es/package.json +31 -31
  59. package/dist/es/pagination/ListOutpostsPaginator.js +4 -4
  60. package/dist/es/pagination/ListOutpostsPaginator.js.map +1 -1
  61. package/dist/es/pagination/ListSitesPaginator.js +4 -4
  62. package/dist/es/pagination/ListSitesPaginator.js.map +1 -1
  63. package/dist/es/protocols/Aws_restJson1.js +179 -1
  64. package/dist/es/protocols/Aws_restJson1.js.map +1 -1
  65. package/dist/types/Outposts.d.ts +7 -0
  66. package/dist/types/OutpostsClient.d.ts +3 -2
  67. package/dist/types/commands/CreateOrderCommand.d.ts +35 -0
  68. package/dist/types/index.d.ts +1 -0
  69. package/dist/types/models/models_0.d.ts +207 -54
  70. package/dist/types/protocols/Aws_restJson1.d.ts +3 -0
  71. package/dist/types/ts3.4/Outposts.d.ts +7 -0
  72. package/dist/types/ts3.4/OutpostsClient.d.ts +3 -2
  73. package/dist/types/ts3.4/commands/CreateOrderCommand.d.ts +35 -0
  74. package/dist/types/ts3.4/index.d.ts +1 -0
  75. package/dist/types/ts3.4/models/models_0.d.ts +207 -54
  76. package/dist/types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  77. package/index.ts +1 -0
  78. package/models/models_0.ts +239 -50
  79. package/package.json +31 -31
  80. package/protocols/Aws_restJson1.ts +195 -0
  81. package/tsconfig.json +1 -2
@@ -1,8 +1,36 @@
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.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 = void 0;
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;
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_restJson1CreateOrderCommand = async (input, context) => {
7
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const headers = {
9
+ "content-type": "application/json",
10
+ };
11
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/orders";
12
+ let body;
13
+ body = JSON.stringify({
14
+ ...(input.LineItems !== undefined &&
15
+ input.LineItems !== null && {
16
+ LineItems: serializeAws_restJson1LineItemRequestListDefinition(input.LineItems, context),
17
+ }),
18
+ ...(input.OutpostIdentifier !== undefined &&
19
+ input.OutpostIdentifier !== null && { OutpostIdentifier: input.OutpostIdentifier }),
20
+ ...(input.PaymentOption !== undefined && input.PaymentOption !== null && { PaymentOption: input.PaymentOption }),
21
+ ...(input.PaymentTerm !== undefined && input.PaymentTerm !== null && { PaymentTerm: input.PaymentTerm }),
22
+ });
23
+ return new protocol_http_1.HttpRequest({
24
+ protocol,
25
+ hostname,
26
+ port,
27
+ method: "POST",
28
+ headers,
29
+ path: resolvedPath,
30
+ body,
31
+ });
32
+ };
33
+ exports.serializeAws_restJson1CreateOrderCommand = serializeAws_restJson1CreateOrderCommand;
6
34
  const serializeAws_restJson1CreateOutpostCommand = async (input, context) => {
7
35
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
36
  const headers = {
@@ -40,7 +68,7 @@ const serializeAws_restJson1DeleteOutpostCommand = async (input, context) => {
40
68
  if (labelValue.length <= 0) {
41
69
  throw new Error("Empty value provided for input HTTP label: OutpostId.");
42
70
  }
43
- resolvedPath = resolvedPath.replace("{OutpostId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
71
+ resolvedPath = resolvedPath.replace("{OutpostId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
44
72
  }
45
73
  else {
46
74
  throw new Error("No value provided for input HTTP label: OutpostId.");
@@ -66,7 +94,7 @@ const serializeAws_restJson1DeleteSiteCommand = async (input, context) => {
66
94
  if (labelValue.length <= 0) {
67
95
  throw new Error("Empty value provided for input HTTP label: SiteId.");
68
96
  }
69
- resolvedPath = resolvedPath.replace("{SiteId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
97
+ resolvedPath = resolvedPath.replace("{SiteId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
70
98
  }
71
99
  else {
72
100
  throw new Error("No value provided for input HTTP label: SiteId.");
@@ -92,7 +120,7 @@ const serializeAws_restJson1GetOutpostCommand = async (input, context) => {
92
120
  if (labelValue.length <= 0) {
93
121
  throw new Error("Empty value provided for input HTTP label: OutpostId.");
94
122
  }
95
- resolvedPath = resolvedPath.replace("{OutpostId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
123
+ resolvedPath = resolvedPath.replace("{OutpostId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
96
124
  }
97
125
  else {
98
126
  throw new Error("No value provided for input HTTP label: OutpostId.");
@@ -118,7 +146,7 @@ const serializeAws_restJson1GetOutpostInstanceTypesCommand = async (input, conte
118
146
  if (labelValue.length <= 0) {
119
147
  throw new Error("Empty value provided for input HTTP label: OutpostId.");
120
148
  }
121
- resolvedPath = resolvedPath.replace("{OutpostId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
149
+ resolvedPath = resolvedPath.replace("{OutpostId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
122
150
  }
123
151
  else {
124
152
  throw new Error("No value provided for input HTTP label: OutpostId.");
@@ -200,7 +228,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
200
228
  if (labelValue.length <= 0) {
201
229
  throw new Error("Empty value provided for input HTTP label: ResourceArn.");
202
230
  }
203
- resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
231
+ resolvedPath = resolvedPath.replace("{ResourceArn}", smithy_client_1.extendedEncodeURIComponent(labelValue));
204
232
  }
205
233
  else {
206
234
  throw new Error("No value provided for input HTTP label: ResourceArn.");
@@ -228,7 +256,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
228
256
  if (labelValue.length <= 0) {
229
257
  throw new Error("Empty value provided for input HTTP label: ResourceArn.");
230
258
  }
231
- resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
259
+ resolvedPath = resolvedPath.replace("{ResourceArn}", smithy_client_1.extendedEncodeURIComponent(labelValue));
232
260
  }
233
261
  else {
234
262
  throw new Error("No value provided for input HTTP label: ResourceArn.");
@@ -257,7 +285,7 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
257
285
  if (labelValue.length <= 0) {
258
286
  throw new Error("Empty value provided for input HTTP label: ResourceArn.");
259
287
  }
260
- resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
288
+ resolvedPath = resolvedPath.replace("{ResourceArn}", smithy_client_1.extendedEncodeURIComponent(labelValue));
261
289
  }
262
290
  else {
263
291
  throw new Error("No value provided for input HTTP label: ResourceArn.");
@@ -278,6 +306,94 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
278
306
  });
279
307
  };
280
308
  exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
309
+ const deserializeAws_restJson1CreateOrderCommand = async (output, context) => {
310
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
311
+ return deserializeAws_restJson1CreateOrderCommandError(output, context);
312
+ }
313
+ const contents = {
314
+ $metadata: deserializeMetadata(output),
315
+ Order: undefined,
316
+ };
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
+ }
321
+ return Promise.resolve(contents);
322
+ };
323
+ exports.deserializeAws_restJson1CreateOrderCommand = deserializeAws_restJson1CreateOrderCommand;
324
+ const deserializeAws_restJson1CreateOrderCommandError = async (output, context) => {
325
+ const parsedOutput = {
326
+ ...output,
327
+ body: await parseBody(output.body, context),
328
+ };
329
+ let response;
330
+ let errorCode = "UnknownError";
331
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
332
+ switch (errorCode) {
333
+ case "AccessDeniedException":
334
+ case "com.amazonaws.outposts#AccessDeniedException":
335
+ response = {
336
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
337
+ name: errorCode,
338
+ $metadata: deserializeMetadata(output),
339
+ };
340
+ break;
341
+ case "ConflictException":
342
+ case "com.amazonaws.outposts#ConflictException":
343
+ response = {
344
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
345
+ name: errorCode,
346
+ $metadata: deserializeMetadata(output),
347
+ };
348
+ break;
349
+ case "InternalServerException":
350
+ case "com.amazonaws.outposts#InternalServerException":
351
+ response = {
352
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
353
+ name: errorCode,
354
+ $metadata: deserializeMetadata(output),
355
+ };
356
+ break;
357
+ case "NotFoundException":
358
+ case "com.amazonaws.outposts#NotFoundException":
359
+ response = {
360
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
361
+ name: errorCode,
362
+ $metadata: deserializeMetadata(output),
363
+ };
364
+ break;
365
+ case "ServiceQuotaExceededException":
366
+ case "com.amazonaws.outposts#ServiceQuotaExceededException":
367
+ response = {
368
+ ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
369
+ name: errorCode,
370
+ $metadata: deserializeMetadata(output),
371
+ };
372
+ break;
373
+ case "ValidationException":
374
+ case "com.amazonaws.outposts#ValidationException":
375
+ response = {
376
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
377
+ name: errorCode,
378
+ $metadata: deserializeMetadata(output),
379
+ };
380
+ break;
381
+ default:
382
+ const parsedBody = parsedOutput.body;
383
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
384
+ response = {
385
+ ...parsedBody,
386
+ name: `${errorCode}`,
387
+ message: parsedBody.message || parsedBody.Message || errorCode,
388
+ $fault: "client",
389
+ $metadata: deserializeMetadata(output),
390
+ };
391
+ }
392
+ const message = response.message || response.Message || errorCode;
393
+ response.message = message;
394
+ delete response.Message;
395
+ return Promise.reject(Object.assign(new Error(message), response));
396
+ };
281
397
  const deserializeAws_restJson1CreateOutpostCommand = async (output, context) => {
282
398
  if (output.statusCode !== 200 && output.statusCode >= 300) {
283
399
  return deserializeAws_restJson1CreateOutpostCommandError(output, context);
@@ -286,7 +402,7 @@ const deserializeAws_restJson1CreateOutpostCommand = async (output, context) =>
286
402
  $metadata: deserializeMetadata(output),
287
403
  Outpost: undefined,
288
404
  };
289
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
405
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
290
406
  if (data.Outpost !== undefined && data.Outpost !== null) {
291
407
  contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
292
408
  }
@@ -526,7 +642,7 @@ const deserializeAws_restJson1GetOutpostCommand = async (output, context) => {
526
642
  $metadata: deserializeMetadata(output),
527
643
  Outpost: undefined,
528
644
  };
529
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
645
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
530
646
  if (data.Outpost !== undefined && data.Outpost !== null) {
531
647
  contents.Outpost = deserializeAws_restJson1Outpost(data.Outpost, context);
532
648
  }
@@ -601,18 +717,18 @@ const deserializeAws_restJson1GetOutpostInstanceTypesCommand = async (output, co
601
717
  OutpostArn: undefined,
602
718
  OutpostId: undefined,
603
719
  };
604
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
720
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
605
721
  if (data.InstanceTypes !== undefined && data.InstanceTypes !== null) {
606
722
  contents.InstanceTypes = deserializeAws_restJson1InstanceTypeListDefinition(data.InstanceTypes, context);
607
723
  }
608
724
  if (data.NextToken !== undefined && data.NextToken !== null) {
609
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
725
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
610
726
  }
611
727
  if (data.OutpostArn !== undefined && data.OutpostArn !== null) {
612
- contents.OutpostArn = (0, smithy_client_1.expectString)(data.OutpostArn);
728
+ contents.OutpostArn = smithy_client_1.expectString(data.OutpostArn);
613
729
  }
614
730
  if (data.OutpostId !== undefined && data.OutpostId !== null) {
615
- contents.OutpostId = (0, smithy_client_1.expectString)(data.OutpostId);
731
+ contents.OutpostId = smithy_client_1.expectString(data.OutpostId);
616
732
  }
617
733
  return Promise.resolve(contents);
618
734
  };
@@ -683,9 +799,9 @@ const deserializeAws_restJson1ListOutpostsCommand = async (output, context) => {
683
799
  NextToken: undefined,
684
800
  Outposts: undefined,
685
801
  };
686
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
802
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
687
803
  if (data.NextToken !== undefined && data.NextToken !== null) {
688
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
804
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
689
805
  }
690
806
  if (data.Outposts !== undefined && data.Outposts !== null) {
691
807
  contents.Outposts = deserializeAws_restJson1outpostListDefinition(data.Outposts, context);
@@ -751,9 +867,9 @@ const deserializeAws_restJson1ListSitesCommand = async (output, context) => {
751
867
  NextToken: undefined,
752
868
  Sites: undefined,
753
869
  };
754
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
870
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
755
871
  if (data.NextToken !== undefined && data.NextToken !== null) {
756
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
872
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
757
873
  }
758
874
  if (data.Sites !== undefined && data.Sites !== null) {
759
875
  contents.Sites = deserializeAws_restJson1siteListDefinition(data.Sites, context);
@@ -818,7 +934,7 @@ const deserializeAws_restJson1ListTagsForResourceCommand = async (output, contex
818
934
  $metadata: deserializeMetadata(output),
819
935
  Tags: undefined,
820
936
  };
821
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
937
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
822
938
  if (data.Tags !== undefined && data.Tags !== null) {
823
939
  contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
824
940
  }
@@ -1003,7 +1119,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
1003
1119
  };
1004
1120
  const data = parsedOutput.body;
1005
1121
  if (data.Message !== undefined && data.Message !== null) {
1006
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1122
+ contents.Message = smithy_client_1.expectString(data.Message);
1007
1123
  }
1008
1124
  return contents;
1009
1125
  };
@@ -1018,13 +1134,13 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
1018
1134
  };
1019
1135
  const data = parsedOutput.body;
1020
1136
  if (data.Message !== undefined && data.Message !== null) {
1021
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1137
+ contents.Message = smithy_client_1.expectString(data.Message);
1022
1138
  }
1023
1139
  if (data.ResourceId !== undefined && data.ResourceId !== null) {
1024
- contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
1140
+ contents.ResourceId = smithy_client_1.expectString(data.ResourceId);
1025
1141
  }
1026
1142
  if (data.ResourceType !== undefined && data.ResourceType !== null) {
1027
- contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
1143
+ contents.ResourceType = smithy_client_1.expectString(data.ResourceType);
1028
1144
  }
1029
1145
  return contents;
1030
1146
  };
@@ -1037,7 +1153,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
1037
1153
  };
1038
1154
  const data = parsedOutput.body;
1039
1155
  if (data.Message !== undefined && data.Message !== null) {
1040
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1156
+ contents.Message = smithy_client_1.expectString(data.Message);
1041
1157
  }
1042
1158
  return contents;
1043
1159
  };
@@ -1050,7 +1166,7 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
1050
1166
  };
1051
1167
  const data = parsedOutput.body;
1052
1168
  if (data.Message !== undefined && data.Message !== null) {
1053
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1169
+ contents.Message = smithy_client_1.expectString(data.Message);
1054
1170
  }
1055
1171
  return contents;
1056
1172
  };
@@ -1063,7 +1179,7 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
1063
1179
  };
1064
1180
  const data = parsedOutput.body;
1065
1181
  if (data.Message !== undefined && data.Message !== null) {
1066
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1182
+ contents.Message = smithy_client_1.expectString(data.Message);
1067
1183
  }
1068
1184
  return contents;
1069
1185
  };
@@ -1076,10 +1192,26 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
1076
1192
  };
1077
1193
  const data = parsedOutput.body;
1078
1194
  if (data.Message !== undefined && data.Message !== null) {
1079
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
1195
+ contents.Message = smithy_client_1.expectString(data.Message);
1080
1196
  }
1081
1197
  return contents;
1082
1198
  };
1199
+ const serializeAws_restJson1LineItemRequest = (input, context) => {
1200
+ return {
1201
+ ...(input.CatalogItemId !== undefined && input.CatalogItemId !== null && { CatalogItemId: input.CatalogItemId }),
1202
+ ...(input.Quantity !== undefined && input.Quantity !== null && { Quantity: input.Quantity }),
1203
+ };
1204
+ };
1205
+ const serializeAws_restJson1LineItemRequestListDefinition = (input, context) => {
1206
+ return input
1207
+ .filter((e) => e != null)
1208
+ .map((entry) => {
1209
+ if (entry === null) {
1210
+ return null;
1211
+ }
1212
+ return serializeAws_restJson1LineItemRequest(entry, context);
1213
+ });
1214
+ };
1083
1215
  const serializeAws_restJson1TagMap = (input, context) => {
1084
1216
  return Object.entries(input).reduce((acc, [key, value]) => {
1085
1217
  if (value === null) {
@@ -1093,7 +1225,7 @@ const serializeAws_restJson1TagMap = (input, context) => {
1093
1225
  };
1094
1226
  const deserializeAws_restJson1InstanceTypeItem = (output, context) => {
1095
1227
  return {
1096
- InstanceType: (0, smithy_client_1.expectString)(output.InstanceType),
1228
+ InstanceType: smithy_client_1.expectString(output.InstanceType),
1097
1229
  };
1098
1230
  };
1099
1231
  const deserializeAws_restJson1InstanceTypeListDefinition = (output, context) => {
@@ -1106,18 +1238,53 @@ const deserializeAws_restJson1InstanceTypeListDefinition = (output, context) =>
1106
1238
  return deserializeAws_restJson1InstanceTypeItem(entry, context);
1107
1239
  });
1108
1240
  };
1241
+ const deserializeAws_restJson1LineItem = (output, context) => {
1242
+ return {
1243
+ CatalogItemId: smithy_client_1.expectString(output.CatalogItemId),
1244
+ LineItemId: smithy_client_1.expectString(output.LineItemId),
1245
+ Quantity: smithy_client_1.expectInt32(output.Quantity),
1246
+ Status: smithy_client_1.expectString(output.Status),
1247
+ };
1248
+ };
1249
+ const deserializeAws_restJson1LineItemListDefinition = (output, context) => {
1250
+ return (output || [])
1251
+ .filter((e) => e != null)
1252
+ .map((entry) => {
1253
+ if (entry === null) {
1254
+ return null;
1255
+ }
1256
+ return deserializeAws_restJson1LineItem(entry, context);
1257
+ });
1258
+ };
1259
+ const deserializeAws_restJson1Order = (output, context) => {
1260
+ return {
1261
+ LineItems: output.LineItems !== undefined && output.LineItems !== null
1262
+ ? deserializeAws_restJson1LineItemListDefinition(output.LineItems, context)
1263
+ : undefined,
1264
+ OrderFulfilledDate: output.OrderFulfilledDate !== undefined && output.OrderFulfilledDate !== null
1265
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.OrderFulfilledDate)))
1266
+ : undefined,
1267
+ OrderId: smithy_client_1.expectString(output.OrderId),
1268
+ OrderSubmissionDate: output.OrderSubmissionDate !== undefined && output.OrderSubmissionDate !== null
1269
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.OrderSubmissionDate)))
1270
+ : undefined,
1271
+ OutpostId: smithy_client_1.expectString(output.OutpostId),
1272
+ PaymentOption: smithy_client_1.expectString(output.PaymentOption),
1273
+ Status: smithy_client_1.expectString(output.Status),
1274
+ };
1275
+ };
1109
1276
  const deserializeAws_restJson1Outpost = (output, context) => {
1110
1277
  return {
1111
- AvailabilityZone: (0, smithy_client_1.expectString)(output.AvailabilityZone),
1112
- AvailabilityZoneId: (0, smithy_client_1.expectString)(output.AvailabilityZoneId),
1113
- Description: (0, smithy_client_1.expectString)(output.Description),
1114
- LifeCycleStatus: (0, smithy_client_1.expectString)(output.LifeCycleStatus),
1115
- Name: (0, smithy_client_1.expectString)(output.Name),
1116
- OutpostArn: (0, smithy_client_1.expectString)(output.OutpostArn),
1117
- OutpostId: (0, smithy_client_1.expectString)(output.OutpostId),
1118
- OwnerId: (0, smithy_client_1.expectString)(output.OwnerId),
1119
- SiteArn: (0, smithy_client_1.expectString)(output.SiteArn),
1120
- SiteId: (0, smithy_client_1.expectString)(output.SiteId),
1278
+ AvailabilityZone: smithy_client_1.expectString(output.AvailabilityZone),
1279
+ AvailabilityZoneId: smithy_client_1.expectString(output.AvailabilityZoneId),
1280
+ Description: smithy_client_1.expectString(output.Description),
1281
+ LifeCycleStatus: smithy_client_1.expectString(output.LifeCycleStatus),
1282
+ Name: smithy_client_1.expectString(output.Name),
1283
+ OutpostArn: smithy_client_1.expectString(output.OutpostArn),
1284
+ OutpostId: smithy_client_1.expectString(output.OutpostId),
1285
+ OwnerId: smithy_client_1.expectString(output.OwnerId),
1286
+ SiteArn: smithy_client_1.expectString(output.SiteArn),
1287
+ SiteId: smithy_client_1.expectString(output.SiteId),
1121
1288
  Tags: output.Tags !== undefined && output.Tags !== null
1122
1289
  ? deserializeAws_restJson1TagMap(output.Tags, context)
1123
1290
  : undefined,
@@ -1135,11 +1302,11 @@ const deserializeAws_restJson1outpostListDefinition = (output, context) => {
1135
1302
  };
1136
1303
  const deserializeAws_restJson1Site = (output, context) => {
1137
1304
  return {
1138
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
1139
- Description: (0, smithy_client_1.expectString)(output.Description),
1140
- Name: (0, smithy_client_1.expectString)(output.Name),
1141
- SiteArn: (0, smithy_client_1.expectString)(output.SiteArn),
1142
- SiteId: (0, smithy_client_1.expectString)(output.SiteId),
1305
+ AccountId: smithy_client_1.expectString(output.AccountId),
1306
+ Description: smithy_client_1.expectString(output.Description),
1307
+ Name: smithy_client_1.expectString(output.Name),
1308
+ SiteArn: smithy_client_1.expectString(output.SiteArn),
1309
+ SiteId: smithy_client_1.expectString(output.SiteId),
1143
1310
  Tags: output.Tags !== undefined && output.Tags !== null
1144
1311
  ? deserializeAws_restJson1TagMap(output.Tags, context)
1145
1312
  : undefined,
@@ -1162,7 +1329,7 @@ const deserializeAws_restJson1TagMap = (output, context) => {
1162
1329
  }
1163
1330
  return {
1164
1331
  ...acc,
1165
- [key]: (0, smithy_client_1.expectString)(value),
1332
+ [key]: smithy_client_1.expectString(value),
1166
1333
  };
1167
1334
  }, {});
1168
1335
  };