@aws-sdk/client-appconfig 3.128.0 → 3.131.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 (80) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +24 -23
  3. package/dist-cjs/AppConfig.js +150 -0
  4. package/dist-cjs/commands/CreateExtensionAssociationCommand.js +36 -0
  5. package/dist-cjs/commands/CreateExtensionCommand.js +36 -0
  6. package/dist-cjs/commands/DeleteExtensionAssociationCommand.js +36 -0
  7. package/dist-cjs/commands/DeleteExtensionCommand.js +36 -0
  8. package/dist-cjs/commands/GetExtensionAssociationCommand.js +36 -0
  9. package/dist-cjs/commands/GetExtensionCommand.js +36 -0
  10. package/dist-cjs/commands/ListExtensionAssociationsCommand.js +36 -0
  11. package/dist-cjs/commands/ListExtensionsCommand.js +36 -0
  12. package/dist-cjs/commands/UpdateExtensionAssociationCommand.js +36 -0
  13. package/dist-cjs/commands/UpdateExtensionCommand.js +36 -0
  14. package/dist-cjs/commands/index.js +10 -0
  15. package/dist-cjs/models/models_0.js +146 -16
  16. package/dist-cjs/pagination/ListExtensionAssociationsPaginator.js +36 -0
  17. package/dist-cjs/pagination/ListExtensionsPaginator.js +36 -0
  18. package/dist-cjs/pagination/index.js +2 -0
  19. package/dist-cjs/protocols/Aws_restJson1.js +1107 -38
  20. package/dist-es/AppConfig.js +150 -0
  21. package/dist-es/commands/CreateExtensionAssociationCommand.js +39 -0
  22. package/dist-es/commands/CreateExtensionCommand.js +39 -0
  23. package/dist-es/commands/DeleteExtensionAssociationCommand.js +39 -0
  24. package/dist-es/commands/DeleteExtensionCommand.js +39 -0
  25. package/dist-es/commands/GetExtensionAssociationCommand.js +39 -0
  26. package/dist-es/commands/GetExtensionCommand.js +39 -0
  27. package/dist-es/commands/ListExtensionAssociationsCommand.js +39 -0
  28. package/dist-es/commands/ListExtensionsCommand.js +39 -0
  29. package/dist-es/commands/UpdateExtensionAssociationCommand.js +39 -0
  30. package/dist-es/commands/UpdateExtensionCommand.js +39 -0
  31. package/dist-es/commands/index.js +10 -0
  32. package/dist-es/models/models_0.js +103 -13
  33. package/dist-es/pagination/ListExtensionAssociationsPaginator.js +75 -0
  34. package/dist-es/pagination/ListExtensionsPaginator.js +75 -0
  35. package/dist-es/pagination/index.js +2 -0
  36. package/dist-es/protocols/Aws_restJson1.js +1504 -228
  37. package/dist-types/AppConfig.d.ts +159 -51
  38. package/dist-types/AppConfigClient.d.ts +36 -25
  39. package/dist-types/commands/CreateApplicationCommand.d.ts +5 -5
  40. package/dist-types/commands/CreateConfigurationProfileCommand.d.ts +5 -6
  41. package/dist-types/commands/CreateEnvironmentCommand.d.ts +1 -1
  42. package/dist-types/commands/CreateExtensionAssociationCommand.d.ts +47 -0
  43. package/dist-types/commands/CreateExtensionCommand.d.ts +43 -0
  44. package/dist-types/commands/CreateHostedConfigurationVersionCommand.d.ts +2 -1
  45. package/dist-types/commands/DeleteExtensionAssociationCommand.d.ts +36 -0
  46. package/dist-types/commands/DeleteExtensionCommand.d.ts +36 -0
  47. package/dist-types/commands/GetConfigurationCommand.d.ts +6 -5
  48. package/dist-types/commands/GetEnvironmentCommand.d.ts +6 -5
  49. package/dist-types/commands/GetExtensionAssociationCommand.d.ts +38 -0
  50. package/dist-types/commands/GetExtensionCommand.d.ts +35 -0
  51. package/dist-types/commands/ListExtensionAssociationsCommand.d.ts +38 -0
  52. package/dist-types/commands/ListExtensionsCommand.d.ts +38 -0
  53. package/dist-types/commands/TagResourceCommand.d.ts +3 -5
  54. package/dist-types/commands/UpdateExtensionAssociationCommand.d.ts +38 -0
  55. package/dist-types/commands/UpdateExtensionCommand.d.ts +38 -0
  56. package/dist-types/commands/index.d.ts +10 -0
  57. package/dist-types/models/models_0.d.ts +678 -98
  58. package/dist-types/pagination/ListExtensionAssociationsPaginator.d.ts +4 -0
  59. package/dist-types/pagination/ListExtensionsPaginator.d.ts +4 -0
  60. package/dist-types/pagination/index.d.ts +2 -0
  61. package/dist-types/protocols/Aws_restJson1.d.ts +30 -0
  62. package/dist-types/ts3.4/AppConfig.d.ts +50 -0
  63. package/dist-types/ts3.4/AppConfigClient.d.ts +12 -2
  64. package/dist-types/ts3.4/commands/CreateExtensionAssociationCommand.d.ts +17 -0
  65. package/dist-types/ts3.4/commands/CreateExtensionCommand.d.ts +17 -0
  66. package/dist-types/ts3.4/commands/DeleteExtensionAssociationCommand.d.ts +17 -0
  67. package/dist-types/ts3.4/commands/DeleteExtensionCommand.d.ts +17 -0
  68. package/dist-types/ts3.4/commands/GetExtensionAssociationCommand.d.ts +17 -0
  69. package/dist-types/ts3.4/commands/GetExtensionCommand.d.ts +17 -0
  70. package/dist-types/ts3.4/commands/ListExtensionAssociationsCommand.d.ts +17 -0
  71. package/dist-types/ts3.4/commands/ListExtensionsCommand.d.ts +17 -0
  72. package/dist-types/ts3.4/commands/UpdateExtensionAssociationCommand.d.ts +17 -0
  73. package/dist-types/ts3.4/commands/UpdateExtensionCommand.d.ts +17 -0
  74. package/dist-types/ts3.4/commands/index.d.ts +10 -0
  75. package/dist-types/ts3.4/models/models_0.d.ts +298 -9
  76. package/dist-types/ts3.4/pagination/ListExtensionAssociationsPaginator.d.ts +4 -0
  77. package/dist-types/ts3.4/pagination/ListExtensionsPaginator.d.ts +4 -0
  78. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  79. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +30 -0
  80. package/package.json +7 -7
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1GetHostedConfigurationVersionCommand = exports.deserializeAws_restJson1GetEnvironmentCommand = exports.deserializeAws_restJson1GetDeploymentStrategyCommand = exports.deserializeAws_restJson1GetDeploymentCommand = exports.deserializeAws_restJson1GetConfigurationProfileCommand = exports.deserializeAws_restJson1GetConfigurationCommand = exports.deserializeAws_restJson1GetApplicationCommand = exports.deserializeAws_restJson1DeleteHostedConfigurationVersionCommand = exports.deserializeAws_restJson1DeleteEnvironmentCommand = exports.deserializeAws_restJson1DeleteDeploymentStrategyCommand = exports.deserializeAws_restJson1DeleteConfigurationProfileCommand = exports.deserializeAws_restJson1DeleteApplicationCommand = exports.deserializeAws_restJson1CreateHostedConfigurationVersionCommand = exports.deserializeAws_restJson1CreateEnvironmentCommand = exports.deserializeAws_restJson1CreateDeploymentStrategyCommand = exports.deserializeAws_restJson1CreateConfigurationProfileCommand = exports.deserializeAws_restJson1CreateApplicationCommand = exports.serializeAws_restJson1ValidateConfigurationCommand = exports.serializeAws_restJson1UpdateEnvironmentCommand = exports.serializeAws_restJson1UpdateDeploymentStrategyCommand = exports.serializeAws_restJson1UpdateConfigurationProfileCommand = exports.serializeAws_restJson1UpdateApplicationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopDeploymentCommand = exports.serializeAws_restJson1StartDeploymentCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListHostedConfigurationVersionsCommand = exports.serializeAws_restJson1ListEnvironmentsCommand = exports.serializeAws_restJson1ListDeploymentStrategiesCommand = exports.serializeAws_restJson1ListDeploymentsCommand = exports.serializeAws_restJson1ListConfigurationProfilesCommand = exports.serializeAws_restJson1ListApplicationsCommand = exports.serializeAws_restJson1GetHostedConfigurationVersionCommand = exports.serializeAws_restJson1GetEnvironmentCommand = exports.serializeAws_restJson1GetDeploymentStrategyCommand = exports.serializeAws_restJson1GetDeploymentCommand = exports.serializeAws_restJson1GetConfigurationProfileCommand = exports.serializeAws_restJson1GetConfigurationCommand = exports.serializeAws_restJson1GetApplicationCommand = exports.serializeAws_restJson1DeleteHostedConfigurationVersionCommand = exports.serializeAws_restJson1DeleteEnvironmentCommand = exports.serializeAws_restJson1DeleteDeploymentStrategyCommand = exports.serializeAws_restJson1DeleteConfigurationProfileCommand = exports.serializeAws_restJson1DeleteApplicationCommand = exports.serializeAws_restJson1CreateHostedConfigurationVersionCommand = exports.serializeAws_restJson1CreateEnvironmentCommand = exports.serializeAws_restJson1CreateDeploymentStrategyCommand = exports.serializeAws_restJson1CreateConfigurationProfileCommand = exports.serializeAws_restJson1CreateApplicationCommand = void 0;
4
- exports.deserializeAws_restJson1ValidateConfigurationCommand = exports.deserializeAws_restJson1UpdateEnvironmentCommand = exports.deserializeAws_restJson1UpdateDeploymentStrategyCommand = exports.deserializeAws_restJson1UpdateConfigurationProfileCommand = exports.deserializeAws_restJson1UpdateApplicationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopDeploymentCommand = exports.deserializeAws_restJson1StartDeploymentCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListHostedConfigurationVersionsCommand = exports.deserializeAws_restJson1ListEnvironmentsCommand = exports.deserializeAws_restJson1ListDeploymentStrategiesCommand = exports.deserializeAws_restJson1ListDeploymentsCommand = exports.deserializeAws_restJson1ListConfigurationProfilesCommand = exports.deserializeAws_restJson1ListApplicationsCommand = void 0;
3
+ exports.deserializeAws_restJson1CreateHostedConfigurationVersionCommand = exports.deserializeAws_restJson1CreateExtensionAssociationCommand = exports.deserializeAws_restJson1CreateExtensionCommand = exports.deserializeAws_restJson1CreateEnvironmentCommand = exports.deserializeAws_restJson1CreateDeploymentStrategyCommand = exports.deserializeAws_restJson1CreateConfigurationProfileCommand = exports.deserializeAws_restJson1CreateApplicationCommand = exports.serializeAws_restJson1ValidateConfigurationCommand = exports.serializeAws_restJson1UpdateExtensionAssociationCommand = exports.serializeAws_restJson1UpdateExtensionCommand = exports.serializeAws_restJson1UpdateEnvironmentCommand = exports.serializeAws_restJson1UpdateDeploymentStrategyCommand = exports.serializeAws_restJson1UpdateConfigurationProfileCommand = exports.serializeAws_restJson1UpdateApplicationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopDeploymentCommand = exports.serializeAws_restJson1StartDeploymentCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListHostedConfigurationVersionsCommand = exports.serializeAws_restJson1ListExtensionsCommand = exports.serializeAws_restJson1ListExtensionAssociationsCommand = exports.serializeAws_restJson1ListEnvironmentsCommand = exports.serializeAws_restJson1ListDeploymentStrategiesCommand = exports.serializeAws_restJson1ListDeploymentsCommand = exports.serializeAws_restJson1ListConfigurationProfilesCommand = exports.serializeAws_restJson1ListApplicationsCommand = exports.serializeAws_restJson1GetHostedConfigurationVersionCommand = exports.serializeAws_restJson1GetExtensionAssociationCommand = exports.serializeAws_restJson1GetExtensionCommand = exports.serializeAws_restJson1GetEnvironmentCommand = exports.serializeAws_restJson1GetDeploymentStrategyCommand = exports.serializeAws_restJson1GetDeploymentCommand = exports.serializeAws_restJson1GetConfigurationProfileCommand = exports.serializeAws_restJson1GetConfigurationCommand = exports.serializeAws_restJson1GetApplicationCommand = exports.serializeAws_restJson1DeleteHostedConfigurationVersionCommand = exports.serializeAws_restJson1DeleteExtensionAssociationCommand = exports.serializeAws_restJson1DeleteExtensionCommand = exports.serializeAws_restJson1DeleteEnvironmentCommand = exports.serializeAws_restJson1DeleteDeploymentStrategyCommand = exports.serializeAws_restJson1DeleteConfigurationProfileCommand = exports.serializeAws_restJson1DeleteApplicationCommand = exports.serializeAws_restJson1CreateHostedConfigurationVersionCommand = exports.serializeAws_restJson1CreateExtensionAssociationCommand = exports.serializeAws_restJson1CreateExtensionCommand = exports.serializeAws_restJson1CreateEnvironmentCommand = exports.serializeAws_restJson1CreateDeploymentStrategyCommand = exports.serializeAws_restJson1CreateConfigurationProfileCommand = exports.serializeAws_restJson1CreateApplicationCommand = void 0;
4
+ exports.deserializeAws_restJson1ValidateConfigurationCommand = exports.deserializeAws_restJson1UpdateExtensionAssociationCommand = exports.deserializeAws_restJson1UpdateExtensionCommand = exports.deserializeAws_restJson1UpdateEnvironmentCommand = exports.deserializeAws_restJson1UpdateDeploymentStrategyCommand = exports.deserializeAws_restJson1UpdateConfigurationProfileCommand = exports.deserializeAws_restJson1UpdateApplicationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopDeploymentCommand = exports.deserializeAws_restJson1StartDeploymentCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListHostedConfigurationVersionsCommand = exports.deserializeAws_restJson1ListExtensionsCommand = exports.deserializeAws_restJson1ListExtensionAssociationsCommand = exports.deserializeAws_restJson1ListEnvironmentsCommand = exports.deserializeAws_restJson1ListDeploymentStrategiesCommand = exports.deserializeAws_restJson1ListDeploymentsCommand = exports.deserializeAws_restJson1ListConfigurationProfilesCommand = exports.deserializeAws_restJson1ListApplicationsCommand = exports.deserializeAws_restJson1GetHostedConfigurationVersionCommand = exports.deserializeAws_restJson1GetExtensionAssociationCommand = exports.deserializeAws_restJson1GetExtensionCommand = exports.deserializeAws_restJson1GetEnvironmentCommand = exports.deserializeAws_restJson1GetDeploymentStrategyCommand = exports.deserializeAws_restJson1GetDeploymentCommand = exports.deserializeAws_restJson1GetConfigurationProfileCommand = exports.deserializeAws_restJson1GetConfigurationCommand = exports.deserializeAws_restJson1GetApplicationCommand = exports.deserializeAws_restJson1DeleteHostedConfigurationVersionCommand = exports.deserializeAws_restJson1DeleteExtensionAssociationCommand = exports.deserializeAws_restJson1DeleteExtensionCommand = exports.deserializeAws_restJson1DeleteEnvironmentCommand = exports.deserializeAws_restJson1DeleteDeploymentStrategyCommand = exports.deserializeAws_restJson1DeleteConfigurationProfileCommand = exports.deserializeAws_restJson1DeleteApplicationCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const AppConfigServiceException_1 = require("../models/AppConfigServiceException");
@@ -132,6 +132,59 @@ const serializeAws_restJson1CreateEnvironmentCommand = async (input, context) =>
132
132
  });
133
133
  };
134
134
  exports.serializeAws_restJson1CreateEnvironmentCommand = serializeAws_restJson1CreateEnvironmentCommand;
135
+ const serializeAws_restJson1CreateExtensionCommand = async (input, context) => {
136
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
137
+ const headers = {
138
+ "content-type": "application/json",
139
+ ...(isSerializableHeaderValue(input.LatestVersionNumber) && {
140
+ "latest-version-number": input.LatestVersionNumber.toString(),
141
+ }),
142
+ };
143
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/extensions";
144
+ let body;
145
+ body = JSON.stringify({
146
+ ...(input.Actions != null && { Actions: serializeAws_restJson1ActionsMap(input.Actions, context) }),
147
+ ...(input.Description != null && { Description: input.Description }),
148
+ ...(input.Name != null && { Name: input.Name }),
149
+ ...(input.Parameters != null && { Parameters: serializeAws_restJson1ParameterMap(input.Parameters, context) }),
150
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
151
+ });
152
+ return new protocol_http_1.HttpRequest({
153
+ protocol,
154
+ hostname,
155
+ port,
156
+ method: "POST",
157
+ headers,
158
+ path: resolvedPath,
159
+ body,
160
+ });
161
+ };
162
+ exports.serializeAws_restJson1CreateExtensionCommand = serializeAws_restJson1CreateExtensionCommand;
163
+ const serializeAws_restJson1CreateExtensionAssociationCommand = async (input, context) => {
164
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
165
+ const headers = {
166
+ "content-type": "application/json",
167
+ };
168
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/extensionassociations";
169
+ let body;
170
+ body = JSON.stringify({
171
+ ...(input.ExtensionIdentifier != null && { ExtensionIdentifier: input.ExtensionIdentifier }),
172
+ ...(input.ExtensionVersionNumber != null && { ExtensionVersionNumber: input.ExtensionVersionNumber }),
173
+ ...(input.Parameters != null && { Parameters: serializeAws_restJson1ParameterValueMap(input.Parameters, context) }),
174
+ ...(input.ResourceIdentifier != null && { ResourceIdentifier: input.ResourceIdentifier }),
175
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
176
+ });
177
+ return new protocol_http_1.HttpRequest({
178
+ protocol,
179
+ hostname,
180
+ port,
181
+ method: "POST",
182
+ headers,
183
+ path: resolvedPath,
184
+ body,
185
+ });
186
+ };
187
+ exports.serializeAws_restJson1CreateExtensionAssociationCommand = serializeAws_restJson1CreateExtensionAssociationCommand;
135
188
  const serializeAws_restJson1CreateHostedConfigurationVersionCommand = async (input, context) => {
136
189
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
137
190
  const headers = {
@@ -306,6 +359,63 @@ const serializeAws_restJson1DeleteEnvironmentCommand = async (input, context) =>
306
359
  });
307
360
  };
308
361
  exports.serializeAws_restJson1DeleteEnvironmentCommand = serializeAws_restJson1DeleteEnvironmentCommand;
362
+ const serializeAws_restJson1DeleteExtensionCommand = async (input, context) => {
363
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
364
+ const headers = {};
365
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/extensions/{ExtensionIdentifier}";
366
+ if (input.ExtensionIdentifier !== undefined) {
367
+ const labelValue = input.ExtensionIdentifier;
368
+ if (labelValue.length <= 0) {
369
+ throw new Error("Empty value provided for input HTTP label: ExtensionIdentifier.");
370
+ }
371
+ resolvedPath = resolvedPath.replace("{ExtensionIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
372
+ }
373
+ else {
374
+ throw new Error("No value provided for input HTTP label: ExtensionIdentifier.");
375
+ }
376
+ const query = {
377
+ ...(input.VersionNumber !== undefined && { version: input.VersionNumber.toString() }),
378
+ };
379
+ let body;
380
+ return new protocol_http_1.HttpRequest({
381
+ protocol,
382
+ hostname,
383
+ port,
384
+ method: "DELETE",
385
+ headers,
386
+ path: resolvedPath,
387
+ query,
388
+ body,
389
+ });
390
+ };
391
+ exports.serializeAws_restJson1DeleteExtensionCommand = serializeAws_restJson1DeleteExtensionCommand;
392
+ const serializeAws_restJson1DeleteExtensionAssociationCommand = async (input, context) => {
393
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
394
+ const headers = {};
395
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
396
+ "/extensionassociations/{ExtensionAssociationId}";
397
+ if (input.ExtensionAssociationId !== undefined) {
398
+ const labelValue = input.ExtensionAssociationId;
399
+ if (labelValue.length <= 0) {
400
+ throw new Error("Empty value provided for input HTTP label: ExtensionAssociationId.");
401
+ }
402
+ resolvedPath = resolvedPath.replace("{ExtensionAssociationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
403
+ }
404
+ else {
405
+ throw new Error("No value provided for input HTTP label: ExtensionAssociationId.");
406
+ }
407
+ let body;
408
+ return new protocol_http_1.HttpRequest({
409
+ protocol,
410
+ hostname,
411
+ port,
412
+ method: "DELETE",
413
+ headers,
414
+ path: resolvedPath,
415
+ body,
416
+ });
417
+ };
418
+ exports.serializeAws_restJson1DeleteExtensionAssociationCommand = serializeAws_restJson1DeleteExtensionAssociationCommand;
309
419
  const serializeAws_restJson1DeleteHostedConfigurationVersionCommand = async (input, context) => {
310
420
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
311
421
  const headers = {};
@@ -581,6 +691,63 @@ const serializeAws_restJson1GetEnvironmentCommand = async (input, context) => {
581
691
  });
582
692
  };
583
693
  exports.serializeAws_restJson1GetEnvironmentCommand = serializeAws_restJson1GetEnvironmentCommand;
694
+ const serializeAws_restJson1GetExtensionCommand = async (input, context) => {
695
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
696
+ const headers = {};
697
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/extensions/{ExtensionIdentifier}";
698
+ if (input.ExtensionIdentifier !== undefined) {
699
+ const labelValue = input.ExtensionIdentifier;
700
+ if (labelValue.length <= 0) {
701
+ throw new Error("Empty value provided for input HTTP label: ExtensionIdentifier.");
702
+ }
703
+ resolvedPath = resolvedPath.replace("{ExtensionIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
704
+ }
705
+ else {
706
+ throw new Error("No value provided for input HTTP label: ExtensionIdentifier.");
707
+ }
708
+ const query = {
709
+ ...(input.VersionNumber !== undefined && { version_number: input.VersionNumber.toString() }),
710
+ };
711
+ let body;
712
+ return new protocol_http_1.HttpRequest({
713
+ protocol,
714
+ hostname,
715
+ port,
716
+ method: "GET",
717
+ headers,
718
+ path: resolvedPath,
719
+ query,
720
+ body,
721
+ });
722
+ };
723
+ exports.serializeAws_restJson1GetExtensionCommand = serializeAws_restJson1GetExtensionCommand;
724
+ const serializeAws_restJson1GetExtensionAssociationCommand = async (input, context) => {
725
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
726
+ const headers = {};
727
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
728
+ "/extensionassociations/{ExtensionAssociationId}";
729
+ if (input.ExtensionAssociationId !== undefined) {
730
+ const labelValue = input.ExtensionAssociationId;
731
+ if (labelValue.length <= 0) {
732
+ throw new Error("Empty value provided for input HTTP label: ExtensionAssociationId.");
733
+ }
734
+ resolvedPath = resolvedPath.replace("{ExtensionAssociationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
735
+ }
736
+ else {
737
+ throw new Error("No value provided for input HTTP label: ExtensionAssociationId.");
738
+ }
739
+ let body;
740
+ return new protocol_http_1.HttpRequest({
741
+ protocol,
742
+ hostname,
743
+ port,
744
+ method: "GET",
745
+ headers,
746
+ path: resolvedPath,
747
+ body,
748
+ });
749
+ };
750
+ exports.serializeAws_restJson1GetExtensionAssociationCommand = serializeAws_restJson1GetExtensionAssociationCommand;
584
751
  const serializeAws_restJson1GetHostedConfigurationVersionCommand = async (input, context) => {
585
752
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
586
753
  const headers = {};
@@ -777,6 +944,54 @@ const serializeAws_restJson1ListEnvironmentsCommand = async (input, context) =>
777
944
  });
778
945
  };
779
946
  exports.serializeAws_restJson1ListEnvironmentsCommand = serializeAws_restJson1ListEnvironmentsCommand;
947
+ const serializeAws_restJson1ListExtensionAssociationsCommand = async (input, context) => {
948
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
949
+ const headers = {};
950
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/extensionassociations";
951
+ const query = {
952
+ ...(input.ResourceIdentifier !== undefined && { resource_identifier: input.ResourceIdentifier }),
953
+ ...(input.ExtensionIdentifier !== undefined && { extension_identifier: input.ExtensionIdentifier }),
954
+ ...(input.ExtensionVersionNumber !== undefined && {
955
+ extension_version_number: input.ExtensionVersionNumber.toString(),
956
+ }),
957
+ ...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
958
+ ...(input.NextToken !== undefined && { next_token: input.NextToken }),
959
+ };
960
+ let body;
961
+ return new protocol_http_1.HttpRequest({
962
+ protocol,
963
+ hostname,
964
+ port,
965
+ method: "GET",
966
+ headers,
967
+ path: resolvedPath,
968
+ query,
969
+ body,
970
+ });
971
+ };
972
+ exports.serializeAws_restJson1ListExtensionAssociationsCommand = serializeAws_restJson1ListExtensionAssociationsCommand;
973
+ const serializeAws_restJson1ListExtensionsCommand = async (input, context) => {
974
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
975
+ const headers = {};
976
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/extensions";
977
+ const query = {
978
+ ...(input.MaxResults !== undefined && { max_results: input.MaxResults.toString() }),
979
+ ...(input.NextToken !== undefined && { next_token: input.NextToken }),
980
+ ...(input.Name !== undefined && { name: input.Name }),
981
+ };
982
+ let body;
983
+ return new protocol_http_1.HttpRequest({
984
+ protocol,
985
+ hostname,
986
+ port,
987
+ method: "GET",
988
+ headers,
989
+ path: resolvedPath,
990
+ query,
991
+ body,
992
+ });
993
+ };
994
+ exports.serializeAws_restJson1ListExtensionsCommand = serializeAws_restJson1ListExtensionsCommand;
780
995
  const serializeAws_restJson1ListHostedConfigurationVersionsCommand = async (input, context) => {
781
996
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
782
997
  const headers = {};
@@ -1158,6 +1373,72 @@ const serializeAws_restJson1UpdateEnvironmentCommand = async (input, context) =>
1158
1373
  });
1159
1374
  };
1160
1375
  exports.serializeAws_restJson1UpdateEnvironmentCommand = serializeAws_restJson1UpdateEnvironmentCommand;
1376
+ const serializeAws_restJson1UpdateExtensionCommand = async (input, context) => {
1377
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1378
+ const headers = {
1379
+ "content-type": "application/json",
1380
+ };
1381
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/extensions/{ExtensionIdentifier}";
1382
+ if (input.ExtensionIdentifier !== undefined) {
1383
+ const labelValue = input.ExtensionIdentifier;
1384
+ if (labelValue.length <= 0) {
1385
+ throw new Error("Empty value provided for input HTTP label: ExtensionIdentifier.");
1386
+ }
1387
+ resolvedPath = resolvedPath.replace("{ExtensionIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1388
+ }
1389
+ else {
1390
+ throw new Error("No value provided for input HTTP label: ExtensionIdentifier.");
1391
+ }
1392
+ let body;
1393
+ body = JSON.stringify({
1394
+ ...(input.Actions != null && { Actions: serializeAws_restJson1ActionsMap(input.Actions, context) }),
1395
+ ...(input.Description != null && { Description: input.Description }),
1396
+ ...(input.Parameters != null && { Parameters: serializeAws_restJson1ParameterMap(input.Parameters, context) }),
1397
+ ...(input.VersionNumber != null && { VersionNumber: input.VersionNumber }),
1398
+ });
1399
+ return new protocol_http_1.HttpRequest({
1400
+ protocol,
1401
+ hostname,
1402
+ port,
1403
+ method: "PATCH",
1404
+ headers,
1405
+ path: resolvedPath,
1406
+ body,
1407
+ });
1408
+ };
1409
+ exports.serializeAws_restJson1UpdateExtensionCommand = serializeAws_restJson1UpdateExtensionCommand;
1410
+ const serializeAws_restJson1UpdateExtensionAssociationCommand = async (input, context) => {
1411
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1412
+ const headers = {
1413
+ "content-type": "application/json",
1414
+ };
1415
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1416
+ "/extensionassociations/{ExtensionAssociationId}";
1417
+ if (input.ExtensionAssociationId !== undefined) {
1418
+ const labelValue = input.ExtensionAssociationId;
1419
+ if (labelValue.length <= 0) {
1420
+ throw new Error("Empty value provided for input HTTP label: ExtensionAssociationId.");
1421
+ }
1422
+ resolvedPath = resolvedPath.replace("{ExtensionAssociationId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1423
+ }
1424
+ else {
1425
+ throw new Error("No value provided for input HTTP label: ExtensionAssociationId.");
1426
+ }
1427
+ let body;
1428
+ body = JSON.stringify({
1429
+ ...(input.Parameters != null && { Parameters: serializeAws_restJson1ParameterValueMap(input.Parameters, context) }),
1430
+ });
1431
+ return new protocol_http_1.HttpRequest({
1432
+ protocol,
1433
+ hostname,
1434
+ port,
1435
+ method: "PATCH",
1436
+ headers,
1437
+ path: resolvedPath,
1438
+ body,
1439
+ });
1440
+ };
1441
+ exports.serializeAws_restJson1UpdateExtensionAssociationCommand = serializeAws_restJson1UpdateExtensionAssociationCommand;
1161
1442
  const serializeAws_restJson1ValidateConfigurationCommand = async (input, context) => {
1162
1443
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1163
1444
  const headers = {};
@@ -1453,40 +1734,46 @@ const deserializeAws_restJson1CreateEnvironmentCommandError = async (output, con
1453
1734
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1454
1735
  }
1455
1736
  };
1456
- const deserializeAws_restJson1CreateHostedConfigurationVersionCommand = async (output, context) => {
1737
+ const deserializeAws_restJson1CreateExtensionCommand = async (output, context) => {
1457
1738
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1458
- return deserializeAws_restJson1CreateHostedConfigurationVersionCommandError(output, context);
1739
+ return deserializeAws_restJson1CreateExtensionCommandError(output, context);
1459
1740
  }
1460
1741
  const contents = {
1461
1742
  $metadata: deserializeMetadata(output),
1462
- ApplicationId: undefined,
1463
- ConfigurationProfileId: undefined,
1464
- Content: undefined,
1465
- ContentType: undefined,
1743
+ Actions: undefined,
1744
+ Arn: undefined,
1466
1745
  Description: undefined,
1746
+ Id: undefined,
1747
+ Name: undefined,
1748
+ Parameters: undefined,
1467
1749
  VersionNumber: undefined,
1468
1750
  };
1469
- if (output.headers["application-id"] !== undefined) {
1470
- contents.ApplicationId = output.headers["application-id"];
1751
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1752
+ if (data.Actions !== undefined && data.Actions !== null) {
1753
+ contents.Actions = deserializeAws_restJson1ActionsMap(data.Actions, context);
1471
1754
  }
1472
- if (output.headers["configuration-profile-id"] !== undefined) {
1473
- contents.ConfigurationProfileId = output.headers["configuration-profile-id"];
1755
+ if (data.Arn !== undefined && data.Arn !== null) {
1756
+ contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1474
1757
  }
1475
- if (output.headers["version-number"] !== undefined) {
1476
- contents.VersionNumber = (0, smithy_client_1.strictParseInt32)(output.headers["version-number"]);
1758
+ if (data.Description !== undefined && data.Description !== null) {
1759
+ contents.Description = (0, smithy_client_1.expectString)(data.Description);
1477
1760
  }
1478
- if (output.headers["description"] !== undefined) {
1479
- contents.Description = output.headers["description"];
1761
+ if (data.Id !== undefined && data.Id !== null) {
1762
+ contents.Id = (0, smithy_client_1.expectString)(data.Id);
1480
1763
  }
1481
- if (output.headers["content-type"] !== undefined) {
1482
- contents.ContentType = output.headers["content-type"];
1764
+ if (data.Name !== undefined && data.Name !== null) {
1765
+ contents.Name = (0, smithy_client_1.expectString)(data.Name);
1766
+ }
1767
+ if (data.Parameters !== undefined && data.Parameters !== null) {
1768
+ contents.Parameters = deserializeAws_restJson1ParameterMap(data.Parameters, context);
1769
+ }
1770
+ if (data.VersionNumber !== undefined && data.VersionNumber !== null) {
1771
+ contents.VersionNumber = (0, smithy_client_1.expectInt32)(data.VersionNumber);
1483
1772
  }
1484
- const data = await collectBody(output.body, context);
1485
- contents.Content = data;
1486
1773
  return Promise.resolve(contents);
1487
1774
  };
1488
- exports.deserializeAws_restJson1CreateHostedConfigurationVersionCommand = deserializeAws_restJson1CreateHostedConfigurationVersionCommand;
1489
- const deserializeAws_restJson1CreateHostedConfigurationVersionCommandError = async (output, context) => {
1775
+ exports.deserializeAws_restJson1CreateExtensionCommand = deserializeAws_restJson1CreateExtensionCommand;
1776
+ const deserializeAws_restJson1CreateExtensionCommandError = async (output, context) => {
1490
1777
  const parsedOutput = {
1491
1778
  ...output,
1492
1779
  body: await parseBody(output.body, context),
@@ -1503,12 +1790,6 @@ const deserializeAws_restJson1CreateHostedConfigurationVersionCommandError = asy
1503
1790
  case "InternalServerException":
1504
1791
  case "com.amazonaws.appconfig#InternalServerException":
1505
1792
  throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1506
- case "PayloadTooLargeException":
1507
- case "com.amazonaws.appconfig#PayloadTooLargeException":
1508
- throw await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context);
1509
- case "ResourceNotFoundException":
1510
- case "com.amazonaws.appconfig#ResourceNotFoundException":
1511
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1512
1793
  case "ServiceQuotaExceededException":
1513
1794
  case "com.amazonaws.appconfig#ServiceQuotaExceededException":
1514
1795
  throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
@@ -1524,14 +1805,152 @@ const deserializeAws_restJson1CreateHostedConfigurationVersionCommandError = asy
1524
1805
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1525
1806
  }
1526
1807
  };
1527
- const deserializeAws_restJson1DeleteApplicationCommand = async (output, context) => {
1528
- if (output.statusCode !== 204 && output.statusCode >= 300) {
1529
- return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
1808
+ const deserializeAws_restJson1CreateExtensionAssociationCommand = async (output, context) => {
1809
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
1810
+ return deserializeAws_restJson1CreateExtensionAssociationCommandError(output, context);
1530
1811
  }
1531
1812
  const contents = {
1532
1813
  $metadata: deserializeMetadata(output),
1814
+ Arn: undefined,
1815
+ ExtensionArn: undefined,
1816
+ ExtensionVersionNumber: undefined,
1817
+ Id: undefined,
1818
+ Parameters: undefined,
1819
+ ResourceArn: undefined,
1533
1820
  };
1534
- await collectBody(output.body, context);
1821
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1822
+ if (data.Arn !== undefined && data.Arn !== null) {
1823
+ contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
1824
+ }
1825
+ if (data.ExtensionArn !== undefined && data.ExtensionArn !== null) {
1826
+ contents.ExtensionArn = (0, smithy_client_1.expectString)(data.ExtensionArn);
1827
+ }
1828
+ if (data.ExtensionVersionNumber !== undefined && data.ExtensionVersionNumber !== null) {
1829
+ contents.ExtensionVersionNumber = (0, smithy_client_1.expectInt32)(data.ExtensionVersionNumber);
1830
+ }
1831
+ if (data.Id !== undefined && data.Id !== null) {
1832
+ contents.Id = (0, smithy_client_1.expectString)(data.Id);
1833
+ }
1834
+ if (data.Parameters !== undefined && data.Parameters !== null) {
1835
+ contents.Parameters = deserializeAws_restJson1ParameterValueMap(data.Parameters, context);
1836
+ }
1837
+ if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
1838
+ contents.ResourceArn = (0, smithy_client_1.expectString)(data.ResourceArn);
1839
+ }
1840
+ return Promise.resolve(contents);
1841
+ };
1842
+ exports.deserializeAws_restJson1CreateExtensionAssociationCommand = deserializeAws_restJson1CreateExtensionAssociationCommand;
1843
+ const deserializeAws_restJson1CreateExtensionAssociationCommandError = async (output, context) => {
1844
+ const parsedOutput = {
1845
+ ...output,
1846
+ body: await parseBody(output.body, context),
1847
+ };
1848
+ let response;
1849
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1850
+ switch (errorCode) {
1851
+ case "BadRequestException":
1852
+ case "com.amazonaws.appconfig#BadRequestException":
1853
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1854
+ case "InternalServerException":
1855
+ case "com.amazonaws.appconfig#InternalServerException":
1856
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1857
+ case "ResourceNotFoundException":
1858
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
1859
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1860
+ case "ServiceQuotaExceededException":
1861
+ case "com.amazonaws.appconfig#ServiceQuotaExceededException":
1862
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1863
+ default:
1864
+ const parsedBody = parsedOutput.body;
1865
+ const $metadata = deserializeMetadata(output);
1866
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1867
+ response = new AppConfigServiceException_1.AppConfigServiceException({
1868
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1869
+ $fault: "client",
1870
+ $metadata,
1871
+ });
1872
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1873
+ }
1874
+ };
1875
+ const deserializeAws_restJson1CreateHostedConfigurationVersionCommand = async (output, context) => {
1876
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
1877
+ return deserializeAws_restJson1CreateHostedConfigurationVersionCommandError(output, context);
1878
+ }
1879
+ const contents = {
1880
+ $metadata: deserializeMetadata(output),
1881
+ ApplicationId: undefined,
1882
+ ConfigurationProfileId: undefined,
1883
+ Content: undefined,
1884
+ ContentType: undefined,
1885
+ Description: undefined,
1886
+ VersionNumber: undefined,
1887
+ };
1888
+ if (output.headers["application-id"] !== undefined) {
1889
+ contents.ApplicationId = output.headers["application-id"];
1890
+ }
1891
+ if (output.headers["configuration-profile-id"] !== undefined) {
1892
+ contents.ConfigurationProfileId = output.headers["configuration-profile-id"];
1893
+ }
1894
+ if (output.headers["version-number"] !== undefined) {
1895
+ contents.VersionNumber = (0, smithy_client_1.strictParseInt32)(output.headers["version-number"]);
1896
+ }
1897
+ if (output.headers["description"] !== undefined) {
1898
+ contents.Description = output.headers["description"];
1899
+ }
1900
+ if (output.headers["content-type"] !== undefined) {
1901
+ contents.ContentType = output.headers["content-type"];
1902
+ }
1903
+ const data = await collectBody(output.body, context);
1904
+ contents.Content = data;
1905
+ return Promise.resolve(contents);
1906
+ };
1907
+ exports.deserializeAws_restJson1CreateHostedConfigurationVersionCommand = deserializeAws_restJson1CreateHostedConfigurationVersionCommand;
1908
+ const deserializeAws_restJson1CreateHostedConfigurationVersionCommandError = async (output, context) => {
1909
+ const parsedOutput = {
1910
+ ...output,
1911
+ body: await parseBody(output.body, context),
1912
+ };
1913
+ let response;
1914
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1915
+ switch (errorCode) {
1916
+ case "BadRequestException":
1917
+ case "com.amazonaws.appconfig#BadRequestException":
1918
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1919
+ case "ConflictException":
1920
+ case "com.amazonaws.appconfig#ConflictException":
1921
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1922
+ case "InternalServerException":
1923
+ case "com.amazonaws.appconfig#InternalServerException":
1924
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1925
+ case "PayloadTooLargeException":
1926
+ case "com.amazonaws.appconfig#PayloadTooLargeException":
1927
+ throw await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context);
1928
+ case "ResourceNotFoundException":
1929
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
1930
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1931
+ case "ServiceQuotaExceededException":
1932
+ case "com.amazonaws.appconfig#ServiceQuotaExceededException":
1933
+ throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1934
+ default:
1935
+ const parsedBody = parsedOutput.body;
1936
+ const $metadata = deserializeMetadata(output);
1937
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1938
+ response = new AppConfigServiceException_1.AppConfigServiceException({
1939
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1940
+ $fault: "client",
1941
+ $metadata,
1942
+ });
1943
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1944
+ }
1945
+ };
1946
+ const deserializeAws_restJson1DeleteApplicationCommand = async (output, context) => {
1947
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
1948
+ return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
1949
+ }
1950
+ const contents = {
1951
+ $metadata: deserializeMetadata(output),
1952
+ };
1953
+ await collectBody(output.body, context);
1535
1954
  return Promise.resolve(contents);
1536
1955
  };
1537
1956
  exports.deserializeAws_restJson1DeleteApplicationCommand = deserializeAws_restJson1DeleteApplicationCommand;
@@ -1690,6 +2109,86 @@ const deserializeAws_restJson1DeleteEnvironmentCommandError = async (output, con
1690
2109
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1691
2110
  }
1692
2111
  };
2112
+ const deserializeAws_restJson1DeleteExtensionCommand = async (output, context) => {
2113
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
2114
+ return deserializeAws_restJson1DeleteExtensionCommandError(output, context);
2115
+ }
2116
+ const contents = {
2117
+ $metadata: deserializeMetadata(output),
2118
+ };
2119
+ await collectBody(output.body, context);
2120
+ return Promise.resolve(contents);
2121
+ };
2122
+ exports.deserializeAws_restJson1DeleteExtensionCommand = deserializeAws_restJson1DeleteExtensionCommand;
2123
+ const deserializeAws_restJson1DeleteExtensionCommandError = async (output, context) => {
2124
+ const parsedOutput = {
2125
+ ...output,
2126
+ body: await parseBody(output.body, context),
2127
+ };
2128
+ let response;
2129
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2130
+ switch (errorCode) {
2131
+ case "BadRequestException":
2132
+ case "com.amazonaws.appconfig#BadRequestException":
2133
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2134
+ case "InternalServerException":
2135
+ case "com.amazonaws.appconfig#InternalServerException":
2136
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2137
+ case "ResourceNotFoundException":
2138
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
2139
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2140
+ default:
2141
+ const parsedBody = parsedOutput.body;
2142
+ const $metadata = deserializeMetadata(output);
2143
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2144
+ response = new AppConfigServiceException_1.AppConfigServiceException({
2145
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2146
+ $fault: "client",
2147
+ $metadata,
2148
+ });
2149
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2150
+ }
2151
+ };
2152
+ const deserializeAws_restJson1DeleteExtensionAssociationCommand = async (output, context) => {
2153
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
2154
+ return deserializeAws_restJson1DeleteExtensionAssociationCommandError(output, context);
2155
+ }
2156
+ const contents = {
2157
+ $metadata: deserializeMetadata(output),
2158
+ };
2159
+ await collectBody(output.body, context);
2160
+ return Promise.resolve(contents);
2161
+ };
2162
+ exports.deserializeAws_restJson1DeleteExtensionAssociationCommand = deserializeAws_restJson1DeleteExtensionAssociationCommand;
2163
+ const deserializeAws_restJson1DeleteExtensionAssociationCommandError = async (output, context) => {
2164
+ const parsedOutput = {
2165
+ ...output,
2166
+ body: await parseBody(output.body, context),
2167
+ };
2168
+ let response;
2169
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2170
+ switch (errorCode) {
2171
+ case "BadRequestException":
2172
+ case "com.amazonaws.appconfig#BadRequestException":
2173
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2174
+ case "InternalServerException":
2175
+ case "com.amazonaws.appconfig#InternalServerException":
2176
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2177
+ case "ResourceNotFoundException":
2178
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
2179
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2180
+ default:
2181
+ const parsedBody = parsedOutput.body;
2182
+ const $metadata = deserializeMetadata(output);
2183
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2184
+ response = new AppConfigServiceException_1.AppConfigServiceException({
2185
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2186
+ $fault: "client",
2187
+ $metadata,
2188
+ });
2189
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2190
+ }
2191
+ };
1693
2192
  const deserializeAws_restJson1DeleteHostedConfigurationVersionCommand = async (output, context) => {
1694
2193
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1695
2194
  return deserializeAws_restJson1DeleteHostedConfigurationVersionCommandError(output, context);
@@ -1911,6 +2410,7 @@ const deserializeAws_restJson1GetDeploymentCommand = async (output, context) =>
1911
2410
  const contents = {
1912
2411
  $metadata: deserializeMetadata(output),
1913
2412
  ApplicationId: undefined,
2413
+ AppliedExtensions: undefined,
1914
2414
  CompletedAt: undefined,
1915
2415
  ConfigurationLocationUri: undefined,
1916
2416
  ConfigurationName: undefined,
@@ -1933,6 +2433,9 @@ const deserializeAws_restJson1GetDeploymentCommand = async (output, context) =>
1933
2433
  if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
1934
2434
  contents.ApplicationId = (0, smithy_client_1.expectString)(data.ApplicationId);
1935
2435
  }
2436
+ if (data.AppliedExtensions !== undefined && data.AppliedExtensions !== null) {
2437
+ contents.AppliedExtensions = deserializeAws_restJson1AppliedExtensions(data.AppliedExtensions, context);
2438
+ }
1936
2439
  if (data.CompletedAt !== undefined && data.CompletedAt !== null) {
1937
2440
  contents.CompletedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.CompletedAt));
1938
2441
  }
@@ -2152,6 +2655,138 @@ const deserializeAws_restJson1GetEnvironmentCommandError = async (output, contex
2152
2655
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2153
2656
  }
2154
2657
  };
2658
+ const deserializeAws_restJson1GetExtensionCommand = async (output, context) => {
2659
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2660
+ return deserializeAws_restJson1GetExtensionCommandError(output, context);
2661
+ }
2662
+ const contents = {
2663
+ $metadata: deserializeMetadata(output),
2664
+ Actions: undefined,
2665
+ Arn: undefined,
2666
+ Description: undefined,
2667
+ Id: undefined,
2668
+ Name: undefined,
2669
+ Parameters: undefined,
2670
+ VersionNumber: undefined,
2671
+ };
2672
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2673
+ if (data.Actions !== undefined && data.Actions !== null) {
2674
+ contents.Actions = deserializeAws_restJson1ActionsMap(data.Actions, context);
2675
+ }
2676
+ if (data.Arn !== undefined && data.Arn !== null) {
2677
+ contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2678
+ }
2679
+ if (data.Description !== undefined && data.Description !== null) {
2680
+ contents.Description = (0, smithy_client_1.expectString)(data.Description);
2681
+ }
2682
+ if (data.Id !== undefined && data.Id !== null) {
2683
+ contents.Id = (0, smithy_client_1.expectString)(data.Id);
2684
+ }
2685
+ if (data.Name !== undefined && data.Name !== null) {
2686
+ contents.Name = (0, smithy_client_1.expectString)(data.Name);
2687
+ }
2688
+ if (data.Parameters !== undefined && data.Parameters !== null) {
2689
+ contents.Parameters = deserializeAws_restJson1ParameterMap(data.Parameters, context);
2690
+ }
2691
+ if (data.VersionNumber !== undefined && data.VersionNumber !== null) {
2692
+ contents.VersionNumber = (0, smithy_client_1.expectInt32)(data.VersionNumber);
2693
+ }
2694
+ return Promise.resolve(contents);
2695
+ };
2696
+ exports.deserializeAws_restJson1GetExtensionCommand = deserializeAws_restJson1GetExtensionCommand;
2697
+ const deserializeAws_restJson1GetExtensionCommandError = async (output, context) => {
2698
+ const parsedOutput = {
2699
+ ...output,
2700
+ body: await parseBody(output.body, context),
2701
+ };
2702
+ let response;
2703
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2704
+ switch (errorCode) {
2705
+ case "BadRequestException":
2706
+ case "com.amazonaws.appconfig#BadRequestException":
2707
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2708
+ case "InternalServerException":
2709
+ case "com.amazonaws.appconfig#InternalServerException":
2710
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2711
+ case "ResourceNotFoundException":
2712
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
2713
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2714
+ default:
2715
+ const parsedBody = parsedOutput.body;
2716
+ const $metadata = deserializeMetadata(output);
2717
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2718
+ response = new AppConfigServiceException_1.AppConfigServiceException({
2719
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2720
+ $fault: "client",
2721
+ $metadata,
2722
+ });
2723
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2724
+ }
2725
+ };
2726
+ const deserializeAws_restJson1GetExtensionAssociationCommand = async (output, context) => {
2727
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2728
+ return deserializeAws_restJson1GetExtensionAssociationCommandError(output, context);
2729
+ }
2730
+ const contents = {
2731
+ $metadata: deserializeMetadata(output),
2732
+ Arn: undefined,
2733
+ ExtensionArn: undefined,
2734
+ ExtensionVersionNumber: undefined,
2735
+ Id: undefined,
2736
+ Parameters: undefined,
2737
+ ResourceArn: undefined,
2738
+ };
2739
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2740
+ if (data.Arn !== undefined && data.Arn !== null) {
2741
+ contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2742
+ }
2743
+ if (data.ExtensionArn !== undefined && data.ExtensionArn !== null) {
2744
+ contents.ExtensionArn = (0, smithy_client_1.expectString)(data.ExtensionArn);
2745
+ }
2746
+ if (data.ExtensionVersionNumber !== undefined && data.ExtensionVersionNumber !== null) {
2747
+ contents.ExtensionVersionNumber = (0, smithy_client_1.expectInt32)(data.ExtensionVersionNumber);
2748
+ }
2749
+ if (data.Id !== undefined && data.Id !== null) {
2750
+ contents.Id = (0, smithy_client_1.expectString)(data.Id);
2751
+ }
2752
+ if (data.Parameters !== undefined && data.Parameters !== null) {
2753
+ contents.Parameters = deserializeAws_restJson1ParameterValueMap(data.Parameters, context);
2754
+ }
2755
+ if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
2756
+ contents.ResourceArn = (0, smithy_client_1.expectString)(data.ResourceArn);
2757
+ }
2758
+ return Promise.resolve(contents);
2759
+ };
2760
+ exports.deserializeAws_restJson1GetExtensionAssociationCommand = deserializeAws_restJson1GetExtensionAssociationCommand;
2761
+ const deserializeAws_restJson1GetExtensionAssociationCommandError = async (output, context) => {
2762
+ const parsedOutput = {
2763
+ ...output,
2764
+ body: await parseBody(output.body, context),
2765
+ };
2766
+ let response;
2767
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2768
+ switch (errorCode) {
2769
+ case "BadRequestException":
2770
+ case "com.amazonaws.appconfig#BadRequestException":
2771
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2772
+ case "InternalServerException":
2773
+ case "com.amazonaws.appconfig#InternalServerException":
2774
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2775
+ case "ResourceNotFoundException":
2776
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
2777
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2778
+ default:
2779
+ const parsedBody = parsedOutput.body;
2780
+ const $metadata = deserializeMetadata(output);
2781
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2782
+ response = new AppConfigServiceException_1.AppConfigServiceException({
2783
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2784
+ $fault: "client",
2785
+ $metadata,
2786
+ });
2787
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2788
+ }
2789
+ };
2155
2790
  const deserializeAws_restJson1GetHostedConfigurationVersionCommand = async (output, context) => {
2156
2791
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2157
2792
  return deserializeAws_restJson1GetHostedConfigurationVersionCommandError(output, context);
@@ -2411,15 +3046,108 @@ const deserializeAws_restJson1ListEnvironmentsCommand = async (output, context)
2411
3046
  };
2412
3047
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2413
3048
  if (data.Items !== undefined && data.Items !== null) {
2414
- contents.Items = deserializeAws_restJson1EnvironmentList(data.Items, context);
3049
+ contents.Items = deserializeAws_restJson1EnvironmentList(data.Items, context);
3050
+ }
3051
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3052
+ contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3053
+ }
3054
+ return Promise.resolve(contents);
3055
+ };
3056
+ exports.deserializeAws_restJson1ListEnvironmentsCommand = deserializeAws_restJson1ListEnvironmentsCommand;
3057
+ const deserializeAws_restJson1ListEnvironmentsCommandError = async (output, context) => {
3058
+ const parsedOutput = {
3059
+ ...output,
3060
+ body: await parseBody(output.body, context),
3061
+ };
3062
+ let response;
3063
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3064
+ switch (errorCode) {
3065
+ case "BadRequestException":
3066
+ case "com.amazonaws.appconfig#BadRequestException":
3067
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3068
+ case "InternalServerException":
3069
+ case "com.amazonaws.appconfig#InternalServerException":
3070
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3071
+ case "ResourceNotFoundException":
3072
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
3073
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3074
+ default:
3075
+ const parsedBody = parsedOutput.body;
3076
+ const $metadata = deserializeMetadata(output);
3077
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3078
+ response = new AppConfigServiceException_1.AppConfigServiceException({
3079
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3080
+ $fault: "client",
3081
+ $metadata,
3082
+ });
3083
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3084
+ }
3085
+ };
3086
+ const deserializeAws_restJson1ListExtensionAssociationsCommand = async (output, context) => {
3087
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3088
+ return deserializeAws_restJson1ListExtensionAssociationsCommandError(output, context);
3089
+ }
3090
+ const contents = {
3091
+ $metadata: deserializeMetadata(output),
3092
+ Items: undefined,
3093
+ NextToken: undefined,
3094
+ };
3095
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3096
+ if (data.Items !== undefined && data.Items !== null) {
3097
+ contents.Items = deserializeAws_restJson1ExtensionAssociationSummaries(data.Items, context);
3098
+ }
3099
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3100
+ contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3101
+ }
3102
+ return Promise.resolve(contents);
3103
+ };
3104
+ exports.deserializeAws_restJson1ListExtensionAssociationsCommand = deserializeAws_restJson1ListExtensionAssociationsCommand;
3105
+ const deserializeAws_restJson1ListExtensionAssociationsCommandError = async (output, context) => {
3106
+ const parsedOutput = {
3107
+ ...output,
3108
+ body: await parseBody(output.body, context),
3109
+ };
3110
+ let response;
3111
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3112
+ switch (errorCode) {
3113
+ case "BadRequestException":
3114
+ case "com.amazonaws.appconfig#BadRequestException":
3115
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3116
+ case "InternalServerException":
3117
+ case "com.amazonaws.appconfig#InternalServerException":
3118
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3119
+ default:
3120
+ const parsedBody = parsedOutput.body;
3121
+ const $metadata = deserializeMetadata(output);
3122
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3123
+ response = new AppConfigServiceException_1.AppConfigServiceException({
3124
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3125
+ $fault: "client",
3126
+ $metadata,
3127
+ });
3128
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3129
+ }
3130
+ };
3131
+ const deserializeAws_restJson1ListExtensionsCommand = async (output, context) => {
3132
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3133
+ return deserializeAws_restJson1ListExtensionsCommandError(output, context);
3134
+ }
3135
+ const contents = {
3136
+ $metadata: deserializeMetadata(output),
3137
+ Items: undefined,
3138
+ NextToken: undefined,
3139
+ };
3140
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3141
+ if (data.Items !== undefined && data.Items !== null) {
3142
+ contents.Items = deserializeAws_restJson1ExtensionSummaries(data.Items, context);
2415
3143
  }
2416
3144
  if (data.NextToken !== undefined && data.NextToken !== null) {
2417
3145
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
2418
3146
  }
2419
3147
  return Promise.resolve(contents);
2420
3148
  };
2421
- exports.deserializeAws_restJson1ListEnvironmentsCommand = deserializeAws_restJson1ListEnvironmentsCommand;
2422
- const deserializeAws_restJson1ListEnvironmentsCommandError = async (output, context) => {
3149
+ exports.deserializeAws_restJson1ListExtensionsCommand = deserializeAws_restJson1ListExtensionsCommand;
3150
+ const deserializeAws_restJson1ListExtensionsCommandError = async (output, context) => {
2423
3151
  const parsedOutput = {
2424
3152
  ...output,
2425
3153
  body: await parseBody(output.body, context),
@@ -2433,9 +3161,6 @@ const deserializeAws_restJson1ListEnvironmentsCommandError = async (output, cont
2433
3161
  case "InternalServerException":
2434
3162
  case "com.amazonaws.appconfig#InternalServerException":
2435
3163
  throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2436
- case "ResourceNotFoundException":
2437
- case "com.amazonaws.appconfig#ResourceNotFoundException":
2438
- throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2439
3164
  default:
2440
3165
  const parsedBody = parsedOutput.body;
2441
3166
  const $metadata = deserializeMetadata(output);
@@ -2547,6 +3272,7 @@ const deserializeAws_restJson1StartDeploymentCommand = async (output, context) =
2547
3272
  const contents = {
2548
3273
  $metadata: deserializeMetadata(output),
2549
3274
  ApplicationId: undefined,
3275
+ AppliedExtensions: undefined,
2550
3276
  CompletedAt: undefined,
2551
3277
  ConfigurationLocationUri: undefined,
2552
3278
  ConfigurationName: undefined,
@@ -2569,6 +3295,9 @@ const deserializeAws_restJson1StartDeploymentCommand = async (output, context) =
2569
3295
  if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
2570
3296
  contents.ApplicationId = (0, smithy_client_1.expectString)(data.ApplicationId);
2571
3297
  }
3298
+ if (data.AppliedExtensions !== undefined && data.AppliedExtensions !== null) {
3299
+ contents.AppliedExtensions = deserializeAws_restJson1AppliedExtensions(data.AppliedExtensions, context);
3300
+ }
2572
3301
  if (data.CompletedAt !== undefined && data.CompletedAt !== null) {
2573
3302
  contents.CompletedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.CompletedAt));
2574
3303
  }
@@ -2662,6 +3391,7 @@ const deserializeAws_restJson1StopDeploymentCommand = async (output, context) =>
2662
3391
  const contents = {
2663
3392
  $metadata: deserializeMetadata(output),
2664
3393
  ApplicationId: undefined,
3394
+ AppliedExtensions: undefined,
2665
3395
  CompletedAt: undefined,
2666
3396
  ConfigurationLocationUri: undefined,
2667
3397
  ConfigurationName: undefined,
@@ -2684,6 +3414,9 @@ const deserializeAws_restJson1StopDeploymentCommand = async (output, context) =>
2684
3414
  if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
2685
3415
  contents.ApplicationId = (0, smithy_client_1.expectString)(data.ApplicationId);
2686
3416
  }
3417
+ if (data.AppliedExtensions !== undefined && data.AppliedExtensions !== null) {
3418
+ contents.AppliedExtensions = deserializeAws_restJson1AppliedExtensions(data.AppliedExtensions, context);
3419
+ }
2687
3420
  if (data.CompletedAt !== undefined && data.CompletedAt !== null) {
2688
3421
  contents.CompletedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.CompletedAt));
2689
3422
  }
@@ -3107,6 +3840,141 @@ const deserializeAws_restJson1UpdateEnvironmentCommandError = async (output, con
3107
3840
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3108
3841
  }
3109
3842
  };
3843
+ const deserializeAws_restJson1UpdateExtensionCommand = async (output, context) => {
3844
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3845
+ return deserializeAws_restJson1UpdateExtensionCommandError(output, context);
3846
+ }
3847
+ const contents = {
3848
+ $metadata: deserializeMetadata(output),
3849
+ Actions: undefined,
3850
+ Arn: undefined,
3851
+ Description: undefined,
3852
+ Id: undefined,
3853
+ Name: undefined,
3854
+ Parameters: undefined,
3855
+ VersionNumber: undefined,
3856
+ };
3857
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3858
+ if (data.Actions !== undefined && data.Actions !== null) {
3859
+ contents.Actions = deserializeAws_restJson1ActionsMap(data.Actions, context);
3860
+ }
3861
+ if (data.Arn !== undefined && data.Arn !== null) {
3862
+ contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
3863
+ }
3864
+ if (data.Description !== undefined && data.Description !== null) {
3865
+ contents.Description = (0, smithy_client_1.expectString)(data.Description);
3866
+ }
3867
+ if (data.Id !== undefined && data.Id !== null) {
3868
+ contents.Id = (0, smithy_client_1.expectString)(data.Id);
3869
+ }
3870
+ if (data.Name !== undefined && data.Name !== null) {
3871
+ contents.Name = (0, smithy_client_1.expectString)(data.Name);
3872
+ }
3873
+ if (data.Parameters !== undefined && data.Parameters !== null) {
3874
+ contents.Parameters = deserializeAws_restJson1ParameterMap(data.Parameters, context);
3875
+ }
3876
+ if (data.VersionNumber !== undefined && data.VersionNumber !== null) {
3877
+ contents.VersionNumber = (0, smithy_client_1.expectInt32)(data.VersionNumber);
3878
+ }
3879
+ return Promise.resolve(contents);
3880
+ };
3881
+ exports.deserializeAws_restJson1UpdateExtensionCommand = deserializeAws_restJson1UpdateExtensionCommand;
3882
+ const deserializeAws_restJson1UpdateExtensionCommandError = async (output, context) => {
3883
+ const parsedOutput = {
3884
+ ...output,
3885
+ body: await parseBody(output.body, context),
3886
+ };
3887
+ let response;
3888
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3889
+ switch (errorCode) {
3890
+ case "BadRequestException":
3891
+ case "com.amazonaws.appconfig#BadRequestException":
3892
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3893
+ case "ConflictException":
3894
+ case "com.amazonaws.appconfig#ConflictException":
3895
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3896
+ case "InternalServerException":
3897
+ case "com.amazonaws.appconfig#InternalServerException":
3898
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3899
+ case "ResourceNotFoundException":
3900
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
3901
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3902
+ default:
3903
+ const parsedBody = parsedOutput.body;
3904
+ const $metadata = deserializeMetadata(output);
3905
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3906
+ response = new AppConfigServiceException_1.AppConfigServiceException({
3907
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3908
+ $fault: "client",
3909
+ $metadata,
3910
+ });
3911
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3912
+ }
3913
+ };
3914
+ const deserializeAws_restJson1UpdateExtensionAssociationCommand = async (output, context) => {
3915
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3916
+ return deserializeAws_restJson1UpdateExtensionAssociationCommandError(output, context);
3917
+ }
3918
+ const contents = {
3919
+ $metadata: deserializeMetadata(output),
3920
+ Arn: undefined,
3921
+ ExtensionArn: undefined,
3922
+ ExtensionVersionNumber: undefined,
3923
+ Id: undefined,
3924
+ Parameters: undefined,
3925
+ ResourceArn: undefined,
3926
+ };
3927
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3928
+ if (data.Arn !== undefined && data.Arn !== null) {
3929
+ contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
3930
+ }
3931
+ if (data.ExtensionArn !== undefined && data.ExtensionArn !== null) {
3932
+ contents.ExtensionArn = (0, smithy_client_1.expectString)(data.ExtensionArn);
3933
+ }
3934
+ if (data.ExtensionVersionNumber !== undefined && data.ExtensionVersionNumber !== null) {
3935
+ contents.ExtensionVersionNumber = (0, smithy_client_1.expectInt32)(data.ExtensionVersionNumber);
3936
+ }
3937
+ if (data.Id !== undefined && data.Id !== null) {
3938
+ contents.Id = (0, smithy_client_1.expectString)(data.Id);
3939
+ }
3940
+ if (data.Parameters !== undefined && data.Parameters !== null) {
3941
+ contents.Parameters = deserializeAws_restJson1ParameterValueMap(data.Parameters, context);
3942
+ }
3943
+ if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
3944
+ contents.ResourceArn = (0, smithy_client_1.expectString)(data.ResourceArn);
3945
+ }
3946
+ return Promise.resolve(contents);
3947
+ };
3948
+ exports.deserializeAws_restJson1UpdateExtensionAssociationCommand = deserializeAws_restJson1UpdateExtensionAssociationCommand;
3949
+ const deserializeAws_restJson1UpdateExtensionAssociationCommandError = async (output, context) => {
3950
+ const parsedOutput = {
3951
+ ...output,
3952
+ body: await parseBody(output.body, context),
3953
+ };
3954
+ let response;
3955
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3956
+ switch (errorCode) {
3957
+ case "BadRequestException":
3958
+ case "com.amazonaws.appconfig#BadRequestException":
3959
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3960
+ case "InternalServerException":
3961
+ case "com.amazonaws.appconfig#InternalServerException":
3962
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3963
+ case "ResourceNotFoundException":
3964
+ case "com.amazonaws.appconfig#ResourceNotFoundException":
3965
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3966
+ default:
3967
+ const parsedBody = parsedOutput.body;
3968
+ const $metadata = deserializeMetadata(output);
3969
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3970
+ response = new AppConfigServiceException_1.AppConfigServiceException({
3971
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3972
+ $fault: "client",
3973
+ $metadata,
3974
+ });
3975
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3976
+ }
3977
+ };
3110
3978
  const deserializeAws_restJson1ValidateConfigurationCommand = async (output, context) => {
3111
3979
  if (output.statusCode !== 204 && output.statusCode >= 300) {
3112
3980
  return deserializeAws_restJson1ValidateConfigurationCommandError(output, context);
@@ -3237,6 +4105,35 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
3237
4105
  });
3238
4106
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
3239
4107
  };
4108
+ const serializeAws_restJson1Action = (input, context) => {
4109
+ return {
4110
+ ...(input.Description != null && { Description: input.Description }),
4111
+ ...(input.Name != null && { Name: input.Name }),
4112
+ ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
4113
+ ...(input.Uri != null && { Uri: input.Uri }),
4114
+ };
4115
+ };
4116
+ const serializeAws_restJson1ActionList = (input, context) => {
4117
+ return input
4118
+ .filter((e) => e != null)
4119
+ .map((entry) => {
4120
+ if (entry === null) {
4121
+ return null;
4122
+ }
4123
+ return serializeAws_restJson1Action(entry, context);
4124
+ });
4125
+ };
4126
+ const serializeAws_restJson1ActionsMap = (input, context) => {
4127
+ return Object.entries(input).reduce((acc, [key, value]) => {
4128
+ if (value === null) {
4129
+ return acc;
4130
+ }
4131
+ return {
4132
+ ...acc,
4133
+ [key]: serializeAws_restJson1ActionList(value, context),
4134
+ };
4135
+ }, {});
4136
+ };
3240
4137
  const serializeAws_restJson1Monitor = (input, context) => {
3241
4138
  return {
3242
4139
  ...(input.AlarmArn != null && { AlarmArn: input.AlarmArn }),
@@ -3253,6 +4150,34 @@ const serializeAws_restJson1MonitorList = (input, context) => {
3253
4150
  return serializeAws_restJson1Monitor(entry, context);
3254
4151
  });
3255
4152
  };
4153
+ const serializeAws_restJson1Parameter = (input, context) => {
4154
+ return {
4155
+ ...(input.Description != null && { Description: input.Description }),
4156
+ ...(input.Required != null && { Required: input.Required }),
4157
+ };
4158
+ };
4159
+ const serializeAws_restJson1ParameterMap = (input, context) => {
4160
+ return Object.entries(input).reduce((acc, [key, value]) => {
4161
+ if (value === null) {
4162
+ return acc;
4163
+ }
4164
+ return {
4165
+ ...acc,
4166
+ [key]: serializeAws_restJson1Parameter(value, context),
4167
+ };
4168
+ }, {});
4169
+ };
4170
+ const serializeAws_restJson1ParameterValueMap = (input, context) => {
4171
+ return Object.entries(input).reduce((acc, [key, value]) => {
4172
+ if (value === null) {
4173
+ return acc;
4174
+ }
4175
+ return {
4176
+ ...acc,
4177
+ [key]: value,
4178
+ };
4179
+ }, {});
4180
+ };
3256
4181
  const serializeAws_restJson1TagMap = (input, context) => {
3257
4182
  return Object.entries(input).reduce((acc, [key, value]) => {
3258
4183
  if (value === null) {
@@ -3280,6 +4205,58 @@ const serializeAws_restJson1ValidatorList = (input, context) => {
3280
4205
  return serializeAws_restJson1Validator(entry, context);
3281
4206
  });
3282
4207
  };
4208
+ const deserializeAws_restJson1Action = (output, context) => {
4209
+ return {
4210
+ Description: (0, smithy_client_1.expectString)(output.Description),
4211
+ Name: (0, smithy_client_1.expectString)(output.Name),
4212
+ RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
4213
+ Uri: (0, smithy_client_1.expectString)(output.Uri),
4214
+ };
4215
+ };
4216
+ const deserializeAws_restJson1ActionInvocation = (output, context) => {
4217
+ return {
4218
+ ActionName: (0, smithy_client_1.expectString)(output.ActionName),
4219
+ ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
4220
+ ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
4221
+ ExtensionIdentifier: (0, smithy_client_1.expectString)(output.ExtensionIdentifier),
4222
+ InvocationId: (0, smithy_client_1.expectString)(output.InvocationId),
4223
+ RoleArn: (0, smithy_client_1.expectString)(output.RoleArn),
4224
+ Uri: (0, smithy_client_1.expectString)(output.Uri),
4225
+ };
4226
+ };
4227
+ const deserializeAws_restJson1ActionInvocations = (output, context) => {
4228
+ const retVal = (output || [])
4229
+ .filter((e) => e != null)
4230
+ .map((entry) => {
4231
+ if (entry === null) {
4232
+ return null;
4233
+ }
4234
+ return deserializeAws_restJson1ActionInvocation(entry, context);
4235
+ });
4236
+ return retVal;
4237
+ };
4238
+ const deserializeAws_restJson1ActionList = (output, context) => {
4239
+ const retVal = (output || [])
4240
+ .filter((e) => e != null)
4241
+ .map((entry) => {
4242
+ if (entry === null) {
4243
+ return null;
4244
+ }
4245
+ return deserializeAws_restJson1Action(entry, context);
4246
+ });
4247
+ return retVal;
4248
+ };
4249
+ const deserializeAws_restJson1ActionsMap = (output, context) => {
4250
+ return Object.entries(output).reduce((acc, [key, value]) => {
4251
+ if (value === null) {
4252
+ return acc;
4253
+ }
4254
+ return {
4255
+ ...acc,
4256
+ [key]: deserializeAws_restJson1ActionList(value, context),
4257
+ };
4258
+ }, {});
4259
+ };
3283
4260
  const deserializeAws_restJson1Application = (output, context) => {
3284
4261
  return {
3285
4262
  Description: (0, smithy_client_1.expectString)(output.Description),
@@ -3298,6 +4275,25 @@ const deserializeAws_restJson1ApplicationList = (output, context) => {
3298
4275
  });
3299
4276
  return retVal;
3300
4277
  };
4278
+ const deserializeAws_restJson1AppliedExtension = (output, context) => {
4279
+ return {
4280
+ ExtensionAssociationId: (0, smithy_client_1.expectString)(output.ExtensionAssociationId),
4281
+ ExtensionId: (0, smithy_client_1.expectString)(output.ExtensionId),
4282
+ Parameters: output.Parameters != null ? deserializeAws_restJson1ParameterValueMap(output.Parameters, context) : undefined,
4283
+ VersionNumber: (0, smithy_client_1.expectInt32)(output.VersionNumber),
4284
+ };
4285
+ };
4286
+ const deserializeAws_restJson1AppliedExtensions = (output, context) => {
4287
+ const retVal = (output || [])
4288
+ .filter((e) => e != null)
4289
+ .map((entry) => {
4290
+ if (entry === null) {
4291
+ return null;
4292
+ }
4293
+ return deserializeAws_restJson1AppliedExtension(entry, context);
4294
+ });
4295
+ return retVal;
4296
+ };
3301
4297
  const deserializeAws_restJson1BadRequestDetails = (output, context) => {
3302
4298
  if (output.InvalidConfiguration !== undefined && output.InvalidConfiguration !== null) {
3303
4299
  return {
@@ -3331,6 +4327,9 @@ const deserializeAws_restJson1ConfigurationProfileSummaryList = (output, context
3331
4327
  };
3332
4328
  const deserializeAws_restJson1DeploymentEvent = (output, context) => {
3333
4329
  return {
4330
+ ActionInvocations: output.ActionInvocations != null
4331
+ ? deserializeAws_restJson1ActionInvocations(output.ActionInvocations, context)
4332
+ : undefined,
3334
4333
  Description: (0, smithy_client_1.expectString)(output.Description),
3335
4334
  EventType: (0, smithy_client_1.expectString)(output.EventType),
3336
4335
  OccurredAt: output.OccurredAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.OccurredAt)) : undefined,
@@ -3418,6 +4417,44 @@ const deserializeAws_restJson1EnvironmentList = (output, context) => {
3418
4417
  });
3419
4418
  return retVal;
3420
4419
  };
4420
+ const deserializeAws_restJson1ExtensionAssociationSummaries = (output, context) => {
4421
+ const retVal = (output || [])
4422
+ .filter((e) => e != null)
4423
+ .map((entry) => {
4424
+ if (entry === null) {
4425
+ return null;
4426
+ }
4427
+ return deserializeAws_restJson1ExtensionAssociationSummary(entry, context);
4428
+ });
4429
+ return retVal;
4430
+ };
4431
+ const deserializeAws_restJson1ExtensionAssociationSummary = (output, context) => {
4432
+ return {
4433
+ ExtensionArn: (0, smithy_client_1.expectString)(output.ExtensionArn),
4434
+ Id: (0, smithy_client_1.expectString)(output.Id),
4435
+ ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
4436
+ };
4437
+ };
4438
+ const deserializeAws_restJson1ExtensionSummaries = (output, context) => {
4439
+ const retVal = (output || [])
4440
+ .filter((e) => e != null)
4441
+ .map((entry) => {
4442
+ if (entry === null) {
4443
+ return null;
4444
+ }
4445
+ return deserializeAws_restJson1ExtensionSummary(entry, context);
4446
+ });
4447
+ return retVal;
4448
+ };
4449
+ const deserializeAws_restJson1ExtensionSummary = (output, context) => {
4450
+ return {
4451
+ Arn: (0, smithy_client_1.expectString)(output.Arn),
4452
+ Description: (0, smithy_client_1.expectString)(output.Description),
4453
+ Id: (0, smithy_client_1.expectString)(output.Id),
4454
+ Name: (0, smithy_client_1.expectString)(output.Name),
4455
+ VersionNumber: (0, smithy_client_1.expectInt32)(output.VersionNumber),
4456
+ };
4457
+ };
3421
4458
  const deserializeAws_restJson1HostedConfigurationVersionSummary = (output, context) => {
3422
4459
  return {
3423
4460
  ApplicationId: (0, smithy_client_1.expectString)(output.ApplicationId),
@@ -3444,6 +4481,7 @@ const deserializeAws_restJson1InvalidConfigurationDetail = (output, context) =>
3444
4481
  Location: (0, smithy_client_1.expectString)(output.Location),
3445
4482
  Reason: (0, smithy_client_1.expectString)(output.Reason),
3446
4483
  Type: (0, smithy_client_1.expectString)(output.Type),
4484
+ Value: (0, smithy_client_1.expectString)(output.Value),
3447
4485
  };
3448
4486
  };
3449
4487
  const deserializeAws_restJson1InvalidConfigurationDetailList = (output, context) => {
@@ -3474,6 +4512,34 @@ const deserializeAws_restJson1MonitorList = (output, context) => {
3474
4512
  });
3475
4513
  return retVal;
3476
4514
  };
4515
+ const deserializeAws_restJson1Parameter = (output, context) => {
4516
+ return {
4517
+ Description: (0, smithy_client_1.expectString)(output.Description),
4518
+ Required: (0, smithy_client_1.expectBoolean)(output.Required),
4519
+ };
4520
+ };
4521
+ const deserializeAws_restJson1ParameterMap = (output, context) => {
4522
+ return Object.entries(output).reduce((acc, [key, value]) => {
4523
+ if (value === null) {
4524
+ return acc;
4525
+ }
4526
+ return {
4527
+ ...acc,
4528
+ [key]: deserializeAws_restJson1Parameter(value, context),
4529
+ };
4530
+ }, {});
4531
+ };
4532
+ const deserializeAws_restJson1ParameterValueMap = (output, context) => {
4533
+ return Object.entries(output).reduce((acc, [key, value]) => {
4534
+ if (value === null) {
4535
+ return acc;
4536
+ }
4537
+ return {
4538
+ ...acc,
4539
+ [key]: (0, smithy_client_1.expectString)(value),
4540
+ };
4541
+ }, {});
4542
+ };
3477
4543
  const deserializeAws_restJson1TagMap = (output, context) => {
3478
4544
  return Object.entries(output).reduce((acc, [key, value]) => {
3479
4545
  if (value === null) {
@@ -3544,6 +4610,9 @@ const loadRestJsonErrorCode = (output, data) => {
3544
4610
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3545
4611
  const sanitizeErrorCode = (rawValue) => {
3546
4612
  let cleanValue = rawValue;
4613
+ if (typeof cleanValue === "number") {
4614
+ cleanValue = cleanValue.toString();
4615
+ }
3547
4616
  if (cleanValue.indexOf(":") >= 0) {
3548
4617
  cleanValue = cleanValue.split(":")[0];
3549
4618
  }