@aws-sdk/client-appsync 3.41.0 → 3.46.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 (61) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +7 -7
  3. package/dist-cjs/AppSync.js +120 -0
  4. package/dist-cjs/commands/AssociateApiCommand.js +36 -0
  5. package/dist-cjs/commands/CreateDomainNameCommand.js +36 -0
  6. package/dist-cjs/commands/DeleteDomainNameCommand.js +36 -0
  7. package/dist-cjs/commands/DisassociateApiCommand.js +36 -0
  8. package/dist-cjs/commands/GetApiAssociationCommand.js +36 -0
  9. package/dist-cjs/commands/GetDomainNameCommand.js +36 -0
  10. package/dist-cjs/commands/ListDomainNamesCommand.js +36 -0
  11. package/dist-cjs/commands/UpdateDomainNameCommand.js +36 -0
  12. package/dist-cjs/commands/index.js +8 -0
  13. package/dist-cjs/endpoints.js +1 -0
  14. package/dist-cjs/models/models_0.js +136 -21
  15. package/dist-cjs/protocols/Aws_restJson1.js +917 -93
  16. package/dist-cjs/runtimeConfig.js +0 -2
  17. package/dist-es/AppSync.js +120 -0
  18. package/dist-es/commands/AssociateApiCommand.js +39 -0
  19. package/dist-es/commands/CreateDomainNameCommand.js +39 -0
  20. package/dist-es/commands/DeleteDomainNameCommand.js +39 -0
  21. package/dist-es/commands/DisassociateApiCommand.js +39 -0
  22. package/dist-es/commands/GetApiAssociationCommand.js +39 -0
  23. package/dist-es/commands/GetDomainNameCommand.js +39 -0
  24. package/dist-es/commands/ListDomainNamesCommand.js +39 -0
  25. package/dist-es/commands/UpdateDomainNameCommand.js +39 -0
  26. package/dist-es/commands/index.js +8 -0
  27. package/dist-es/endpoints.js +1 -0
  28. package/dist-es/models/models_0.js +90 -12
  29. package/dist-es/protocols/Aws_restJson1.js +1048 -91
  30. package/dist-es/runtimeConfig.js +0 -2
  31. package/dist-types/AppSync.d.ts +60 -5
  32. package/dist-types/AppSyncClient.d.ts +10 -2
  33. package/dist-types/commands/AssociateApiCommand.d.ts +35 -0
  34. package/dist-types/commands/CreateApiKeyCommand.d.ts +1 -2
  35. package/dist-types/commands/CreateDomainNameCommand.d.ts +35 -0
  36. package/dist-types/commands/CreateFunctionCommand.d.ts +1 -1
  37. package/dist-types/commands/CreateResolverCommand.d.ts +1 -1
  38. package/dist-types/commands/DeleteDomainNameCommand.d.ts +35 -0
  39. package/dist-types/commands/DisassociateApiCommand.d.ts +35 -0
  40. package/dist-types/commands/GetApiAssociationCommand.d.ts +35 -0
  41. package/dist-types/commands/GetDomainNameCommand.d.ts +35 -0
  42. package/dist-types/commands/ListDomainNamesCommand.d.ts +35 -0
  43. package/dist-types/commands/UpdateApiKeyCommand.d.ts +1 -1
  44. package/dist-types/commands/UpdateDomainNameCommand.d.ts +35 -0
  45. package/dist-types/commands/index.d.ts +8 -0
  46. package/dist-types/models/models_0.d.ts +578 -255
  47. package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
  48. package/dist-types/ts3.4/AppSync.d.ts +40 -0
  49. package/dist-types/ts3.4/AppSyncClient.d.ts +10 -2
  50. package/dist-types/ts3.4/commands/AssociateApiCommand.d.ts +17 -0
  51. package/dist-types/ts3.4/commands/CreateDomainNameCommand.d.ts +17 -0
  52. package/dist-types/ts3.4/commands/DeleteDomainNameCommand.d.ts +17 -0
  53. package/dist-types/ts3.4/commands/DisassociateApiCommand.d.ts +17 -0
  54. package/dist-types/ts3.4/commands/GetApiAssociationCommand.d.ts +17 -0
  55. package/dist-types/ts3.4/commands/GetDomainNameCommand.d.ts +17 -0
  56. package/dist-types/ts3.4/commands/ListDomainNamesCommand.d.ts +17 -0
  57. package/dist-types/ts3.4/commands/UpdateDomainNameCommand.d.ts +17 -0
  58. package/dist-types/ts3.4/commands/index.d.ts +8 -0
  59. package/dist-types/ts3.4/models/models_0.d.ts +215 -30
  60. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  61. package/package.json +36 -43
@@ -1,9 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1DeleteApiKeyCommand = exports.deserializeAws_restJson1DeleteApiCacheCommand = exports.deserializeAws_restJson1CreateTypeCommand = exports.deserializeAws_restJson1CreateResolverCommand = exports.deserializeAws_restJson1CreateGraphqlApiCommand = exports.deserializeAws_restJson1CreateFunctionCommand = exports.deserializeAws_restJson1CreateDataSourceCommand = exports.deserializeAws_restJson1CreateApiKeyCommand = exports.deserializeAws_restJson1CreateApiCacheCommand = exports.serializeAws_restJson1UpdateTypeCommand = exports.serializeAws_restJson1UpdateResolverCommand = exports.serializeAws_restJson1UpdateGraphqlApiCommand = exports.serializeAws_restJson1UpdateFunctionCommand = exports.serializeAws_restJson1UpdateDataSourceCommand = exports.serializeAws_restJson1UpdateApiKeyCommand = exports.serializeAws_restJson1UpdateApiCacheCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartSchemaCreationCommand = exports.serializeAws_restJson1ListTypesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListResolversByFunctionCommand = exports.serializeAws_restJson1ListResolversCommand = exports.serializeAws_restJson1ListGraphqlApisCommand = exports.serializeAws_restJson1ListFunctionsCommand = exports.serializeAws_restJson1ListDataSourcesCommand = exports.serializeAws_restJson1ListApiKeysCommand = exports.serializeAws_restJson1GetTypeCommand = exports.serializeAws_restJson1GetSchemaCreationStatusCommand = exports.serializeAws_restJson1GetResolverCommand = exports.serializeAws_restJson1GetIntrospectionSchemaCommand = exports.serializeAws_restJson1GetGraphqlApiCommand = exports.serializeAws_restJson1GetFunctionCommand = exports.serializeAws_restJson1GetDataSourceCommand = exports.serializeAws_restJson1GetApiCacheCommand = exports.serializeAws_restJson1FlushApiCacheCommand = exports.serializeAws_restJson1DeleteTypeCommand = exports.serializeAws_restJson1DeleteResolverCommand = exports.serializeAws_restJson1DeleteGraphqlApiCommand = exports.serializeAws_restJson1DeleteFunctionCommand = exports.serializeAws_restJson1DeleteDataSourceCommand = exports.serializeAws_restJson1DeleteApiKeyCommand = exports.serializeAws_restJson1DeleteApiCacheCommand = exports.serializeAws_restJson1CreateTypeCommand = exports.serializeAws_restJson1CreateResolverCommand = exports.serializeAws_restJson1CreateGraphqlApiCommand = exports.serializeAws_restJson1CreateFunctionCommand = exports.serializeAws_restJson1CreateDataSourceCommand = exports.serializeAws_restJson1CreateApiKeyCommand = exports.serializeAws_restJson1CreateApiCacheCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateTypeCommand = exports.deserializeAws_restJson1UpdateResolverCommand = exports.deserializeAws_restJson1UpdateGraphqlApiCommand = exports.deserializeAws_restJson1UpdateFunctionCommand = exports.deserializeAws_restJson1UpdateDataSourceCommand = exports.deserializeAws_restJson1UpdateApiKeyCommand = exports.deserializeAws_restJson1UpdateApiCacheCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartSchemaCreationCommand = exports.deserializeAws_restJson1ListTypesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListResolversByFunctionCommand = exports.deserializeAws_restJson1ListResolversCommand = exports.deserializeAws_restJson1ListGraphqlApisCommand = exports.deserializeAws_restJson1ListFunctionsCommand = exports.deserializeAws_restJson1ListDataSourcesCommand = exports.deserializeAws_restJson1ListApiKeysCommand = exports.deserializeAws_restJson1GetTypeCommand = exports.deserializeAws_restJson1GetSchemaCreationStatusCommand = exports.deserializeAws_restJson1GetResolverCommand = exports.deserializeAws_restJson1GetIntrospectionSchemaCommand = exports.deserializeAws_restJson1GetGraphqlApiCommand = exports.deserializeAws_restJson1GetFunctionCommand = exports.deserializeAws_restJson1GetDataSourceCommand = exports.deserializeAws_restJson1GetApiCacheCommand = exports.deserializeAws_restJson1FlushApiCacheCommand = exports.deserializeAws_restJson1DeleteTypeCommand = exports.deserializeAws_restJson1DeleteResolverCommand = exports.deserializeAws_restJson1DeleteGraphqlApiCommand = exports.deserializeAws_restJson1DeleteFunctionCommand = exports.deserializeAws_restJson1DeleteDataSourceCommand = void 0;
3
+ exports.deserializeAws_restJson1AssociateApiCommand = exports.serializeAws_restJson1UpdateTypeCommand = exports.serializeAws_restJson1UpdateResolverCommand = exports.serializeAws_restJson1UpdateGraphqlApiCommand = exports.serializeAws_restJson1UpdateFunctionCommand = exports.serializeAws_restJson1UpdateDomainNameCommand = exports.serializeAws_restJson1UpdateDataSourceCommand = exports.serializeAws_restJson1UpdateApiKeyCommand = exports.serializeAws_restJson1UpdateApiCacheCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartSchemaCreationCommand = exports.serializeAws_restJson1ListTypesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListResolversByFunctionCommand = exports.serializeAws_restJson1ListResolversCommand = exports.serializeAws_restJson1ListGraphqlApisCommand = exports.serializeAws_restJson1ListFunctionsCommand = exports.serializeAws_restJson1ListDomainNamesCommand = exports.serializeAws_restJson1ListDataSourcesCommand = exports.serializeAws_restJson1ListApiKeysCommand = exports.serializeAws_restJson1GetTypeCommand = exports.serializeAws_restJson1GetSchemaCreationStatusCommand = exports.serializeAws_restJson1GetResolverCommand = exports.serializeAws_restJson1GetIntrospectionSchemaCommand = exports.serializeAws_restJson1GetGraphqlApiCommand = exports.serializeAws_restJson1GetFunctionCommand = exports.serializeAws_restJson1GetDomainNameCommand = exports.serializeAws_restJson1GetDataSourceCommand = exports.serializeAws_restJson1GetApiCacheCommand = exports.serializeAws_restJson1GetApiAssociationCommand = exports.serializeAws_restJson1FlushApiCacheCommand = exports.serializeAws_restJson1DisassociateApiCommand = exports.serializeAws_restJson1DeleteTypeCommand = exports.serializeAws_restJson1DeleteResolverCommand = exports.serializeAws_restJson1DeleteGraphqlApiCommand = exports.serializeAws_restJson1DeleteFunctionCommand = exports.serializeAws_restJson1DeleteDomainNameCommand = exports.serializeAws_restJson1DeleteDataSourceCommand = exports.serializeAws_restJson1DeleteApiKeyCommand = exports.serializeAws_restJson1DeleteApiCacheCommand = exports.serializeAws_restJson1CreateTypeCommand = exports.serializeAws_restJson1CreateResolverCommand = exports.serializeAws_restJson1CreateGraphqlApiCommand = exports.serializeAws_restJson1CreateFunctionCommand = exports.serializeAws_restJson1CreateDomainNameCommand = exports.serializeAws_restJson1CreateDataSourceCommand = exports.serializeAws_restJson1CreateApiKeyCommand = exports.serializeAws_restJson1CreateApiCacheCommand = exports.serializeAws_restJson1AssociateApiCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateTypeCommand = exports.deserializeAws_restJson1UpdateResolverCommand = exports.deserializeAws_restJson1UpdateGraphqlApiCommand = exports.deserializeAws_restJson1UpdateFunctionCommand = exports.deserializeAws_restJson1UpdateDomainNameCommand = exports.deserializeAws_restJson1UpdateDataSourceCommand = exports.deserializeAws_restJson1UpdateApiKeyCommand = exports.deserializeAws_restJson1UpdateApiCacheCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartSchemaCreationCommand = exports.deserializeAws_restJson1ListTypesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListResolversByFunctionCommand = exports.deserializeAws_restJson1ListResolversCommand = exports.deserializeAws_restJson1ListGraphqlApisCommand = exports.deserializeAws_restJson1ListFunctionsCommand = exports.deserializeAws_restJson1ListDomainNamesCommand = exports.deserializeAws_restJson1ListDataSourcesCommand = exports.deserializeAws_restJson1ListApiKeysCommand = exports.deserializeAws_restJson1GetTypeCommand = exports.deserializeAws_restJson1GetSchemaCreationStatusCommand = exports.deserializeAws_restJson1GetResolverCommand = exports.deserializeAws_restJson1GetIntrospectionSchemaCommand = exports.deserializeAws_restJson1GetGraphqlApiCommand = exports.deserializeAws_restJson1GetFunctionCommand = exports.deserializeAws_restJson1GetDomainNameCommand = exports.deserializeAws_restJson1GetDataSourceCommand = exports.deserializeAws_restJson1GetApiCacheCommand = exports.deserializeAws_restJson1GetApiAssociationCommand = exports.deserializeAws_restJson1FlushApiCacheCommand = exports.deserializeAws_restJson1DisassociateApiCommand = exports.deserializeAws_restJson1DeleteTypeCommand = exports.deserializeAws_restJson1DeleteResolverCommand = exports.deserializeAws_restJson1DeleteGraphqlApiCommand = exports.deserializeAws_restJson1DeleteFunctionCommand = exports.deserializeAws_restJson1DeleteDomainNameCommand = exports.deserializeAws_restJson1DeleteDataSourceCommand = exports.deserializeAws_restJson1DeleteApiKeyCommand = exports.deserializeAws_restJson1DeleteApiCacheCommand = exports.deserializeAws_restJson1CreateTypeCommand = exports.deserializeAws_restJson1CreateResolverCommand = exports.deserializeAws_restJson1CreateGraphqlApiCommand = exports.deserializeAws_restJson1CreateFunctionCommand = exports.deserializeAws_restJson1CreateDomainNameCommand = exports.deserializeAws_restJson1CreateDataSourceCommand = exports.deserializeAws_restJson1CreateApiKeyCommand = exports.deserializeAws_restJson1CreateApiCacheCommand = 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
+ const serializeAws_restJson1AssociateApiCommand = async (input, context) => {
8
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const headers = {
10
+ "content-type": "application/json",
11
+ };
12
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}/apiassociation";
13
+ if (input.domainName !== undefined) {
14
+ const labelValue = input.domainName;
15
+ if (labelValue.length <= 0) {
16
+ throw new Error("Empty value provided for input HTTP label: domainName.");
17
+ }
18
+ resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
19
+ }
20
+ else {
21
+ throw new Error("No value provided for input HTTP label: domainName.");
22
+ }
23
+ let body;
24
+ body = JSON.stringify({
25
+ ...(input.apiId !== undefined && input.apiId !== null && { apiId: input.apiId }),
26
+ });
27
+ return new protocol_http_1.HttpRequest({
28
+ protocol,
29
+ hostname,
30
+ port,
31
+ method: "POST",
32
+ headers,
33
+ path: resolvedPath,
34
+ body,
35
+ });
36
+ };
37
+ exports.serializeAws_restJson1AssociateApiCommand = serializeAws_restJson1AssociateApiCommand;
7
38
  const serializeAws_restJson1CreateApiCacheCommand = async (input, context) => {
8
39
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
40
  const headers = {
@@ -133,6 +164,30 @@ const serializeAws_restJson1CreateDataSourceCommand = async (input, context) =>
133
164
  });
134
165
  };
135
166
  exports.serializeAws_restJson1CreateDataSourceCommand = serializeAws_restJson1CreateDataSourceCommand;
167
+ const serializeAws_restJson1CreateDomainNameCommand = async (input, context) => {
168
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const headers = {
170
+ "content-type": "application/json",
171
+ };
172
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
173
+ let body;
174
+ body = JSON.stringify({
175
+ ...(input.certificateArn !== undefined &&
176
+ input.certificateArn !== null && { certificateArn: input.certificateArn }),
177
+ ...(input.description !== undefined && input.description !== null && { description: input.description }),
178
+ ...(input.domainName !== undefined && input.domainName !== null && { domainName: input.domainName }),
179
+ });
180
+ return new protocol_http_1.HttpRequest({
181
+ protocol,
182
+ hostname,
183
+ port,
184
+ method: "POST",
185
+ headers,
186
+ path: resolvedPath,
187
+ body,
188
+ });
189
+ };
190
+ exports.serializeAws_restJson1CreateDomainNameCommand = serializeAws_restJson1CreateDomainNameCommand;
136
191
  const serializeAws_restJson1CreateFunctionCommand = async (input, context) => {
137
192
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
193
  const headers = {
@@ -156,6 +211,7 @@ const serializeAws_restJson1CreateFunctionCommand = async (input, context) => {
156
211
  ...(input.description !== undefined && input.description !== null && { description: input.description }),
157
212
  ...(input.functionVersion !== undefined &&
158
213
  input.functionVersion !== null && { functionVersion: input.functionVersion }),
214
+ ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }),
159
215
  ...(input.name !== undefined && input.name !== null && { name: input.name }),
160
216
  ...(input.requestMappingTemplate !== undefined &&
161
217
  input.requestMappingTemplate !== null && { requestMappingTemplate: input.requestMappingTemplate }),
@@ -255,6 +311,7 @@ const serializeAws_restJson1CreateResolverCommand = async (input, context) => {
255
311
  input.dataSourceName !== null && { dataSourceName: input.dataSourceName }),
256
312
  ...(input.fieldName !== undefined && input.fieldName !== null && { fieldName: input.fieldName }),
257
313
  ...(input.kind !== undefined && input.kind !== null && { kind: input.kind }),
314
+ ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }),
258
315
  ...(input.pipelineConfig !== undefined &&
259
316
  input.pipelineConfig !== null && {
260
317
  pipelineConfig: serializeAws_restJson1PipelineConfig(input.pipelineConfig, context),
@@ -407,6 +464,32 @@ const serializeAws_restJson1DeleteDataSourceCommand = async (input, context) =>
407
464
  });
408
465
  };
409
466
  exports.serializeAws_restJson1DeleteDataSourceCommand = serializeAws_restJson1DeleteDataSourceCommand;
467
+ const serializeAws_restJson1DeleteDomainNameCommand = async (input, context) => {
468
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
469
+ const headers = {};
470
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
471
+ if (input.domainName !== undefined) {
472
+ const labelValue = input.domainName;
473
+ if (labelValue.length <= 0) {
474
+ throw new Error("Empty value provided for input HTTP label: domainName.");
475
+ }
476
+ resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
477
+ }
478
+ else {
479
+ throw new Error("No value provided for input HTTP label: domainName.");
480
+ }
481
+ let body;
482
+ return new protocol_http_1.HttpRequest({
483
+ protocol,
484
+ hostname,
485
+ port,
486
+ method: "DELETE",
487
+ headers,
488
+ path: resolvedPath,
489
+ body,
490
+ });
491
+ };
492
+ exports.serializeAws_restJson1DeleteDomainNameCommand = serializeAws_restJson1DeleteDomainNameCommand;
410
493
  const serializeAws_restJson1DeleteFunctionCommand = async (input, context) => {
411
494
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
412
495
  const headers = {};
@@ -552,6 +635,32 @@ const serializeAws_restJson1DeleteTypeCommand = async (input, context) => {
552
635
  });
553
636
  };
554
637
  exports.serializeAws_restJson1DeleteTypeCommand = serializeAws_restJson1DeleteTypeCommand;
638
+ const serializeAws_restJson1DisassociateApiCommand = async (input, context) => {
639
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
640
+ const headers = {};
641
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}/apiassociation";
642
+ if (input.domainName !== undefined) {
643
+ const labelValue = input.domainName;
644
+ if (labelValue.length <= 0) {
645
+ throw new Error("Empty value provided for input HTTP label: domainName.");
646
+ }
647
+ resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
648
+ }
649
+ else {
650
+ throw new Error("No value provided for input HTTP label: domainName.");
651
+ }
652
+ let body;
653
+ return new protocol_http_1.HttpRequest({
654
+ protocol,
655
+ hostname,
656
+ port,
657
+ method: "DELETE",
658
+ headers,
659
+ path: resolvedPath,
660
+ body,
661
+ });
662
+ };
663
+ exports.serializeAws_restJson1DisassociateApiCommand = serializeAws_restJson1DisassociateApiCommand;
555
664
  const serializeAws_restJson1FlushApiCacheCommand = async (input, context) => {
556
665
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
557
666
  const headers = {};
@@ -578,6 +687,32 @@ const serializeAws_restJson1FlushApiCacheCommand = async (input, context) => {
578
687
  });
579
688
  };
580
689
  exports.serializeAws_restJson1FlushApiCacheCommand = serializeAws_restJson1FlushApiCacheCommand;
690
+ const serializeAws_restJson1GetApiAssociationCommand = async (input, context) => {
691
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
692
+ const headers = {};
693
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}/apiassociation";
694
+ if (input.domainName !== undefined) {
695
+ const labelValue = input.domainName;
696
+ if (labelValue.length <= 0) {
697
+ throw new Error("Empty value provided for input HTTP label: domainName.");
698
+ }
699
+ resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
700
+ }
701
+ else {
702
+ throw new Error("No value provided for input HTTP label: domainName.");
703
+ }
704
+ let body;
705
+ return new protocol_http_1.HttpRequest({
706
+ protocol,
707
+ hostname,
708
+ port,
709
+ method: "GET",
710
+ headers,
711
+ path: resolvedPath,
712
+ body,
713
+ });
714
+ };
715
+ exports.serializeAws_restJson1GetApiAssociationCommand = serializeAws_restJson1GetApiAssociationCommand;
581
716
  const serializeAws_restJson1GetApiCacheCommand = async (input, context) => {
582
717
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
583
718
  const headers = {};
@@ -640,6 +775,32 @@ const serializeAws_restJson1GetDataSourceCommand = async (input, context) => {
640
775
  });
641
776
  };
642
777
  exports.serializeAws_restJson1GetDataSourceCommand = serializeAws_restJson1GetDataSourceCommand;
778
+ const serializeAws_restJson1GetDomainNameCommand = async (input, context) => {
779
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
780
+ const headers = {};
781
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
782
+ if (input.domainName !== undefined) {
783
+ const labelValue = input.domainName;
784
+ if (labelValue.length <= 0) {
785
+ throw new Error("Empty value provided for input HTTP label: domainName.");
786
+ }
787
+ resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
788
+ }
789
+ else {
790
+ throw new Error("No value provided for input HTTP label: domainName.");
791
+ }
792
+ let body;
793
+ return new protocol_http_1.HttpRequest({
794
+ protocol,
795
+ hostname,
796
+ port,
797
+ method: "GET",
798
+ headers,
799
+ path: resolvedPath,
800
+ body,
801
+ });
802
+ };
803
+ exports.serializeAws_restJson1GetDomainNameCommand = serializeAws_restJson1GetDomainNameCommand;
643
804
  const serializeAws_restJson1GetFunctionCommand = async (input, context) => {
644
805
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
645
806
  const headers = {};
@@ -908,6 +1069,27 @@ const serializeAws_restJson1ListDataSourcesCommand = async (input, context) => {
908
1069
  });
909
1070
  };
910
1071
  exports.serializeAws_restJson1ListDataSourcesCommand = serializeAws_restJson1ListDataSourcesCommand;
1072
+ const serializeAws_restJson1ListDomainNamesCommand = async (input, context) => {
1073
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1074
+ const headers = {};
1075
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
1076
+ const query = {
1077
+ ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
1078
+ ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
1079
+ };
1080
+ let body;
1081
+ return new protocol_http_1.HttpRequest({
1082
+ protocol,
1083
+ hostname,
1084
+ port,
1085
+ method: "GET",
1086
+ headers,
1087
+ path: resolvedPath,
1088
+ query,
1089
+ body,
1090
+ });
1091
+ };
1092
+ exports.serializeAws_restJson1ListDomainNamesCommand = serializeAws_restJson1ListDomainNamesCommand;
911
1093
  const serializeAws_restJson1ListFunctionsCommand = async (input, context) => {
912
1094
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
913
1095
  const headers = {};
@@ -1339,6 +1521,37 @@ const serializeAws_restJson1UpdateDataSourceCommand = async (input, context) =>
1339
1521
  });
1340
1522
  };
1341
1523
  exports.serializeAws_restJson1UpdateDataSourceCommand = serializeAws_restJson1UpdateDataSourceCommand;
1524
+ const serializeAws_restJson1UpdateDomainNameCommand = async (input, context) => {
1525
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1526
+ const headers = {
1527
+ "content-type": "application/json",
1528
+ };
1529
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
1530
+ if (input.domainName !== undefined) {
1531
+ const labelValue = input.domainName;
1532
+ if (labelValue.length <= 0) {
1533
+ throw new Error("Empty value provided for input HTTP label: domainName.");
1534
+ }
1535
+ resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
1536
+ }
1537
+ else {
1538
+ throw new Error("No value provided for input HTTP label: domainName.");
1539
+ }
1540
+ let body;
1541
+ body = JSON.stringify({
1542
+ ...(input.description !== undefined && input.description !== null && { description: input.description }),
1543
+ });
1544
+ return new protocol_http_1.HttpRequest({
1545
+ protocol,
1546
+ hostname,
1547
+ port,
1548
+ method: "POST",
1549
+ headers,
1550
+ path: resolvedPath,
1551
+ body,
1552
+ });
1553
+ };
1554
+ exports.serializeAws_restJson1UpdateDomainNameCommand = serializeAws_restJson1UpdateDomainNameCommand;
1342
1555
  const serializeAws_restJson1UpdateFunctionCommand = async (input, context) => {
1343
1556
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1344
1557
  const headers = {
@@ -1372,6 +1585,7 @@ const serializeAws_restJson1UpdateFunctionCommand = async (input, context) => {
1372
1585
  ...(input.description !== undefined && input.description !== null && { description: input.description }),
1373
1586
  ...(input.functionVersion !== undefined &&
1374
1587
  input.functionVersion !== null && { functionVersion: input.functionVersion }),
1588
+ ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }),
1375
1589
  ...(input.name !== undefined && input.name !== null && { name: input.name }),
1376
1590
  ...(input.requestMappingTemplate !== undefined &&
1377
1591
  input.requestMappingTemplate !== null && { requestMappingTemplate: input.requestMappingTemplate }),
@@ -1489,6 +1703,7 @@ const serializeAws_restJson1UpdateResolverCommand = async (input, context) => {
1489
1703
  ...(input.dataSourceName !== undefined &&
1490
1704
  input.dataSourceName !== null && { dataSourceName: input.dataSourceName }),
1491
1705
  ...(input.kind !== undefined && input.kind !== null && { kind: input.kind }),
1706
+ ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }),
1492
1707
  ...(input.pipelineConfig !== undefined &&
1493
1708
  input.pipelineConfig !== null && {
1494
1709
  pipelineConfig: serializeAws_restJson1PipelineConfig(input.pipelineConfig, context),
@@ -1553,6 +1768,78 @@ const serializeAws_restJson1UpdateTypeCommand = async (input, context) => {
1553
1768
  });
1554
1769
  };
1555
1770
  exports.serializeAws_restJson1UpdateTypeCommand = serializeAws_restJson1UpdateTypeCommand;
1771
+ const deserializeAws_restJson1AssociateApiCommand = async (output, context) => {
1772
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1773
+ return deserializeAws_restJson1AssociateApiCommandError(output, context);
1774
+ }
1775
+ const contents = {
1776
+ $metadata: deserializeMetadata(output),
1777
+ apiAssociation: undefined,
1778
+ };
1779
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1780
+ if (data.apiAssociation !== undefined && data.apiAssociation !== null) {
1781
+ contents.apiAssociation = deserializeAws_restJson1ApiAssociation(data.apiAssociation, context);
1782
+ }
1783
+ return Promise.resolve(contents);
1784
+ };
1785
+ exports.deserializeAws_restJson1AssociateApiCommand = deserializeAws_restJson1AssociateApiCommand;
1786
+ const deserializeAws_restJson1AssociateApiCommandError = async (output, context) => {
1787
+ const parsedOutput = {
1788
+ ...output,
1789
+ body: await parseBody(output.body, context),
1790
+ };
1791
+ let response;
1792
+ let errorCode = "UnknownError";
1793
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1794
+ switch (errorCode) {
1795
+ case "AccessDeniedException":
1796
+ case "com.amazonaws.appsync#AccessDeniedException":
1797
+ response = {
1798
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1799
+ name: errorCode,
1800
+ $metadata: deserializeMetadata(output),
1801
+ };
1802
+ break;
1803
+ case "BadRequestException":
1804
+ case "com.amazonaws.appsync#BadRequestException":
1805
+ response = {
1806
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1807
+ name: errorCode,
1808
+ $metadata: deserializeMetadata(output),
1809
+ };
1810
+ break;
1811
+ case "InternalFailureException":
1812
+ case "com.amazonaws.appsync#InternalFailureException":
1813
+ response = {
1814
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
1815
+ name: errorCode,
1816
+ $metadata: deserializeMetadata(output),
1817
+ };
1818
+ break;
1819
+ case "NotFoundException":
1820
+ case "com.amazonaws.appsync#NotFoundException":
1821
+ response = {
1822
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1823
+ name: errorCode,
1824
+ $metadata: deserializeMetadata(output),
1825
+ };
1826
+ break;
1827
+ default:
1828
+ const parsedBody = parsedOutput.body;
1829
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1830
+ response = {
1831
+ ...parsedBody,
1832
+ name: `${errorCode}`,
1833
+ message: parsedBody.message || parsedBody.Message || errorCode,
1834
+ $fault: "client",
1835
+ $metadata: deserializeMetadata(output),
1836
+ };
1837
+ }
1838
+ const message = response.message || response.Message || errorCode;
1839
+ response.message = message;
1840
+ delete response.Message;
1841
+ return Promise.reject(Object.assign(new Error(message), response));
1842
+ };
1556
1843
  const deserializeAws_restJson1CreateApiCacheCommand = async (output, context) => {
1557
1844
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1558
1845
  return deserializeAws_restJson1CreateApiCacheCommandError(output, context);
@@ -1809,22 +2096,22 @@ const deserializeAws_restJson1CreateDataSourceCommandError = async (output, cont
1809
2096
  delete response.Message;
1810
2097
  return Promise.reject(Object.assign(new Error(message), response));
1811
2098
  };
1812
- const deserializeAws_restJson1CreateFunctionCommand = async (output, context) => {
2099
+ const deserializeAws_restJson1CreateDomainNameCommand = async (output, context) => {
1813
2100
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1814
- return deserializeAws_restJson1CreateFunctionCommandError(output, context);
2101
+ return deserializeAws_restJson1CreateDomainNameCommandError(output, context);
1815
2102
  }
1816
2103
  const contents = {
1817
2104
  $metadata: deserializeMetadata(output),
1818
- functionConfiguration: undefined,
2105
+ domainNameConfig: undefined,
1819
2106
  };
1820
2107
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1821
- if (data.functionConfiguration !== undefined && data.functionConfiguration !== null) {
1822
- contents.functionConfiguration = deserializeAws_restJson1FunctionConfiguration(data.functionConfiguration, context);
2108
+ if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
2109
+ contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
1823
2110
  }
1824
2111
  return Promise.resolve(contents);
1825
2112
  };
1826
- exports.deserializeAws_restJson1CreateFunctionCommand = deserializeAws_restJson1CreateFunctionCommand;
1827
- const deserializeAws_restJson1CreateFunctionCommandError = async (output, context) => {
2113
+ exports.deserializeAws_restJson1CreateDomainNameCommand = deserializeAws_restJson1CreateDomainNameCommand;
2114
+ const deserializeAws_restJson1CreateDomainNameCommandError = async (output, context) => {
1828
2115
  const parsedOutput = {
1829
2116
  ...output,
1830
2117
  body: await parseBody(output.body, context),
@@ -1833,34 +2120,26 @@ const deserializeAws_restJson1CreateFunctionCommandError = async (output, contex
1833
2120
  let errorCode = "UnknownError";
1834
2121
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1835
2122
  switch (errorCode) {
1836
- case "ConcurrentModificationException":
1837
- case "com.amazonaws.appsync#ConcurrentModificationException":
1838
- response = {
1839
- ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
1840
- name: errorCode,
1841
- $metadata: deserializeMetadata(output),
1842
- };
1843
- break;
1844
- case "InternalFailureException":
1845
- case "com.amazonaws.appsync#InternalFailureException":
2123
+ case "AccessDeniedException":
2124
+ case "com.amazonaws.appsync#AccessDeniedException":
1846
2125
  response = {
1847
- ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
2126
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
1848
2127
  name: errorCode,
1849
2128
  $metadata: deserializeMetadata(output),
1850
2129
  };
1851
2130
  break;
1852
- case "NotFoundException":
1853
- case "com.amazonaws.appsync#NotFoundException":
2131
+ case "BadRequestException":
2132
+ case "com.amazonaws.appsync#BadRequestException":
1854
2133
  response = {
1855
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2134
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1856
2135
  name: errorCode,
1857
2136
  $metadata: deserializeMetadata(output),
1858
2137
  };
1859
2138
  break;
1860
- case "UnauthorizedException":
1861
- case "com.amazonaws.appsync#UnauthorizedException":
2139
+ case "InternalFailureException":
2140
+ case "com.amazonaws.appsync#InternalFailureException":
1862
2141
  response = {
1863
- ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
2142
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
1864
2143
  name: errorCode,
1865
2144
  $metadata: deserializeMetadata(output),
1866
2145
  };
@@ -1881,13 +2160,85 @@ const deserializeAws_restJson1CreateFunctionCommandError = async (output, contex
1881
2160
  delete response.Message;
1882
2161
  return Promise.reject(Object.assign(new Error(message), response));
1883
2162
  };
1884
- const deserializeAws_restJson1CreateGraphqlApiCommand = async (output, context) => {
2163
+ const deserializeAws_restJson1CreateFunctionCommand = async (output, context) => {
1885
2164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1886
- return deserializeAws_restJson1CreateGraphqlApiCommandError(output, context);
2165
+ return deserializeAws_restJson1CreateFunctionCommandError(output, context);
1887
2166
  }
1888
2167
  const contents = {
1889
2168
  $metadata: deserializeMetadata(output),
1890
- graphqlApi: undefined,
2169
+ functionConfiguration: undefined,
2170
+ };
2171
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2172
+ if (data.functionConfiguration !== undefined && data.functionConfiguration !== null) {
2173
+ contents.functionConfiguration = deserializeAws_restJson1FunctionConfiguration(data.functionConfiguration, context);
2174
+ }
2175
+ return Promise.resolve(contents);
2176
+ };
2177
+ exports.deserializeAws_restJson1CreateFunctionCommand = deserializeAws_restJson1CreateFunctionCommand;
2178
+ const deserializeAws_restJson1CreateFunctionCommandError = async (output, context) => {
2179
+ const parsedOutput = {
2180
+ ...output,
2181
+ body: await parseBody(output.body, context),
2182
+ };
2183
+ let response;
2184
+ let errorCode = "UnknownError";
2185
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2186
+ switch (errorCode) {
2187
+ case "ConcurrentModificationException":
2188
+ case "com.amazonaws.appsync#ConcurrentModificationException":
2189
+ response = {
2190
+ ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
2191
+ name: errorCode,
2192
+ $metadata: deserializeMetadata(output),
2193
+ };
2194
+ break;
2195
+ case "InternalFailureException":
2196
+ case "com.amazonaws.appsync#InternalFailureException":
2197
+ response = {
2198
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
2199
+ name: errorCode,
2200
+ $metadata: deserializeMetadata(output),
2201
+ };
2202
+ break;
2203
+ case "NotFoundException":
2204
+ case "com.amazonaws.appsync#NotFoundException":
2205
+ response = {
2206
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2207
+ name: errorCode,
2208
+ $metadata: deserializeMetadata(output),
2209
+ };
2210
+ break;
2211
+ case "UnauthorizedException":
2212
+ case "com.amazonaws.appsync#UnauthorizedException":
2213
+ response = {
2214
+ ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
2215
+ name: errorCode,
2216
+ $metadata: deserializeMetadata(output),
2217
+ };
2218
+ break;
2219
+ default:
2220
+ const parsedBody = parsedOutput.body;
2221
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2222
+ response = {
2223
+ ...parsedBody,
2224
+ name: `${errorCode}`,
2225
+ message: parsedBody.message || parsedBody.Message || errorCode,
2226
+ $fault: "client",
2227
+ $metadata: deserializeMetadata(output),
2228
+ };
2229
+ }
2230
+ const message = response.message || response.Message || errorCode;
2231
+ response.message = message;
2232
+ delete response.Message;
2233
+ return Promise.reject(Object.assign(new Error(message), response));
2234
+ };
2235
+ const deserializeAws_restJson1CreateGraphqlApiCommand = async (output, context) => {
2236
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2237
+ return deserializeAws_restJson1CreateGraphqlApiCommandError(output, context);
2238
+ }
2239
+ const contents = {
2240
+ $metadata: deserializeMetadata(output),
2241
+ graphqlApi: undefined,
1891
2242
  };
1892
2243
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
1893
2244
  if (data.graphqlApi !== undefined && data.graphqlApi !== null) {
@@ -2341,6 +2692,82 @@ const deserializeAws_restJson1DeleteDataSourceCommandError = async (output, cont
2341
2692
  delete response.Message;
2342
2693
  return Promise.reject(Object.assign(new Error(message), response));
2343
2694
  };
2695
+ const deserializeAws_restJson1DeleteDomainNameCommand = async (output, context) => {
2696
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2697
+ return deserializeAws_restJson1DeleteDomainNameCommandError(output, context);
2698
+ }
2699
+ const contents = {
2700
+ $metadata: deserializeMetadata(output),
2701
+ };
2702
+ await collectBody(output.body, context);
2703
+ return Promise.resolve(contents);
2704
+ };
2705
+ exports.deserializeAws_restJson1DeleteDomainNameCommand = deserializeAws_restJson1DeleteDomainNameCommand;
2706
+ const deserializeAws_restJson1DeleteDomainNameCommandError = async (output, context) => {
2707
+ const parsedOutput = {
2708
+ ...output,
2709
+ body: await parseBody(output.body, context),
2710
+ };
2711
+ let response;
2712
+ let errorCode = "UnknownError";
2713
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2714
+ switch (errorCode) {
2715
+ case "AccessDeniedException":
2716
+ case "com.amazonaws.appsync#AccessDeniedException":
2717
+ response = {
2718
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2719
+ name: errorCode,
2720
+ $metadata: deserializeMetadata(output),
2721
+ };
2722
+ break;
2723
+ case "BadRequestException":
2724
+ case "com.amazonaws.appsync#BadRequestException":
2725
+ response = {
2726
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2727
+ name: errorCode,
2728
+ $metadata: deserializeMetadata(output),
2729
+ };
2730
+ break;
2731
+ case "ConcurrentModificationException":
2732
+ case "com.amazonaws.appsync#ConcurrentModificationException":
2733
+ response = {
2734
+ ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
2735
+ name: errorCode,
2736
+ $metadata: deserializeMetadata(output),
2737
+ };
2738
+ break;
2739
+ case "InternalFailureException":
2740
+ case "com.amazonaws.appsync#InternalFailureException":
2741
+ response = {
2742
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
2743
+ name: errorCode,
2744
+ $metadata: deserializeMetadata(output),
2745
+ };
2746
+ break;
2747
+ case "NotFoundException":
2748
+ case "com.amazonaws.appsync#NotFoundException":
2749
+ response = {
2750
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2751
+ name: errorCode,
2752
+ $metadata: deserializeMetadata(output),
2753
+ };
2754
+ break;
2755
+ default:
2756
+ const parsedBody = parsedOutput.body;
2757
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2758
+ response = {
2759
+ ...parsedBody,
2760
+ name: `${errorCode}`,
2761
+ message: parsedBody.message || parsedBody.Message || errorCode,
2762
+ $fault: "client",
2763
+ $metadata: deserializeMetadata(output),
2764
+ };
2765
+ }
2766
+ const message = response.message || response.Message || errorCode;
2767
+ response.message = message;
2768
+ delete response.Message;
2769
+ return Promise.reject(Object.assign(new Error(message), response));
2770
+ };
2344
2771
  const deserializeAws_restJson1DeleteFunctionCommand = async (output, context) => {
2345
2772
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2346
2773
  return deserializeAws_restJson1DeleteFunctionCommandError(output, context);
@@ -2469,14 +2896,234 @@ const deserializeAws_restJson1DeleteGraphqlApiCommandError = async (output, cont
2469
2896
  $metadata: deserializeMetadata(output),
2470
2897
  };
2471
2898
  break;
2472
- case "UnauthorizedException":
2473
- case "com.amazonaws.appsync#UnauthorizedException":
2474
- response = {
2475
- ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
2476
- name: errorCode,
2477
- $metadata: deserializeMetadata(output),
2478
- };
2479
- break;
2899
+ case "UnauthorizedException":
2900
+ case "com.amazonaws.appsync#UnauthorizedException":
2901
+ response = {
2902
+ ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
2903
+ name: errorCode,
2904
+ $metadata: deserializeMetadata(output),
2905
+ };
2906
+ break;
2907
+ default:
2908
+ const parsedBody = parsedOutput.body;
2909
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2910
+ response = {
2911
+ ...parsedBody,
2912
+ name: `${errorCode}`,
2913
+ message: parsedBody.message || parsedBody.Message || errorCode,
2914
+ $fault: "client",
2915
+ $metadata: deserializeMetadata(output),
2916
+ };
2917
+ }
2918
+ const message = response.message || response.Message || errorCode;
2919
+ response.message = message;
2920
+ delete response.Message;
2921
+ return Promise.reject(Object.assign(new Error(message), response));
2922
+ };
2923
+ const deserializeAws_restJson1DeleteResolverCommand = async (output, context) => {
2924
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2925
+ return deserializeAws_restJson1DeleteResolverCommandError(output, context);
2926
+ }
2927
+ const contents = {
2928
+ $metadata: deserializeMetadata(output),
2929
+ };
2930
+ await collectBody(output.body, context);
2931
+ return Promise.resolve(contents);
2932
+ };
2933
+ exports.deserializeAws_restJson1DeleteResolverCommand = deserializeAws_restJson1DeleteResolverCommand;
2934
+ const deserializeAws_restJson1DeleteResolverCommandError = async (output, context) => {
2935
+ const parsedOutput = {
2936
+ ...output,
2937
+ body: await parseBody(output.body, context),
2938
+ };
2939
+ let response;
2940
+ let errorCode = "UnknownError";
2941
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2942
+ switch (errorCode) {
2943
+ case "ConcurrentModificationException":
2944
+ case "com.amazonaws.appsync#ConcurrentModificationException":
2945
+ response = {
2946
+ ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
2947
+ name: errorCode,
2948
+ $metadata: deserializeMetadata(output),
2949
+ };
2950
+ break;
2951
+ case "InternalFailureException":
2952
+ case "com.amazonaws.appsync#InternalFailureException":
2953
+ response = {
2954
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
2955
+ name: errorCode,
2956
+ $metadata: deserializeMetadata(output),
2957
+ };
2958
+ break;
2959
+ case "NotFoundException":
2960
+ case "com.amazonaws.appsync#NotFoundException":
2961
+ response = {
2962
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2963
+ name: errorCode,
2964
+ $metadata: deserializeMetadata(output),
2965
+ };
2966
+ break;
2967
+ case "UnauthorizedException":
2968
+ case "com.amazonaws.appsync#UnauthorizedException":
2969
+ response = {
2970
+ ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
2971
+ name: errorCode,
2972
+ $metadata: deserializeMetadata(output),
2973
+ };
2974
+ break;
2975
+ default:
2976
+ const parsedBody = parsedOutput.body;
2977
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2978
+ response = {
2979
+ ...parsedBody,
2980
+ name: `${errorCode}`,
2981
+ message: parsedBody.message || parsedBody.Message || errorCode,
2982
+ $fault: "client",
2983
+ $metadata: deserializeMetadata(output),
2984
+ };
2985
+ }
2986
+ const message = response.message || response.Message || errorCode;
2987
+ response.message = message;
2988
+ delete response.Message;
2989
+ return Promise.reject(Object.assign(new Error(message), response));
2990
+ };
2991
+ const deserializeAws_restJson1DeleteTypeCommand = async (output, context) => {
2992
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2993
+ return deserializeAws_restJson1DeleteTypeCommandError(output, context);
2994
+ }
2995
+ const contents = {
2996
+ $metadata: deserializeMetadata(output),
2997
+ };
2998
+ await collectBody(output.body, context);
2999
+ return Promise.resolve(contents);
3000
+ };
3001
+ exports.deserializeAws_restJson1DeleteTypeCommand = deserializeAws_restJson1DeleteTypeCommand;
3002
+ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) => {
3003
+ const parsedOutput = {
3004
+ ...output,
3005
+ body: await parseBody(output.body, context),
3006
+ };
3007
+ let response;
3008
+ let errorCode = "UnknownError";
3009
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3010
+ switch (errorCode) {
3011
+ case "BadRequestException":
3012
+ case "com.amazonaws.appsync#BadRequestException":
3013
+ response = {
3014
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3015
+ name: errorCode,
3016
+ $metadata: deserializeMetadata(output),
3017
+ };
3018
+ break;
3019
+ case "ConcurrentModificationException":
3020
+ case "com.amazonaws.appsync#ConcurrentModificationException":
3021
+ response = {
3022
+ ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
3023
+ name: errorCode,
3024
+ $metadata: deserializeMetadata(output),
3025
+ };
3026
+ break;
3027
+ case "InternalFailureException":
3028
+ case "com.amazonaws.appsync#InternalFailureException":
3029
+ response = {
3030
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
3031
+ name: errorCode,
3032
+ $metadata: deserializeMetadata(output),
3033
+ };
3034
+ break;
3035
+ case "NotFoundException":
3036
+ case "com.amazonaws.appsync#NotFoundException":
3037
+ response = {
3038
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
3039
+ name: errorCode,
3040
+ $metadata: deserializeMetadata(output),
3041
+ };
3042
+ break;
3043
+ case "UnauthorizedException":
3044
+ case "com.amazonaws.appsync#UnauthorizedException":
3045
+ response = {
3046
+ ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
3047
+ name: errorCode,
3048
+ $metadata: deserializeMetadata(output),
3049
+ };
3050
+ break;
3051
+ default:
3052
+ const parsedBody = parsedOutput.body;
3053
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3054
+ response = {
3055
+ ...parsedBody,
3056
+ name: `${errorCode}`,
3057
+ message: parsedBody.message || parsedBody.Message || errorCode,
3058
+ $fault: "client",
3059
+ $metadata: deserializeMetadata(output),
3060
+ };
3061
+ }
3062
+ const message = response.message || response.Message || errorCode;
3063
+ response.message = message;
3064
+ delete response.Message;
3065
+ return Promise.reject(Object.assign(new Error(message), response));
3066
+ };
3067
+ const deserializeAws_restJson1DisassociateApiCommand = async (output, context) => {
3068
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3069
+ return deserializeAws_restJson1DisassociateApiCommandError(output, context);
3070
+ }
3071
+ const contents = {
3072
+ $metadata: deserializeMetadata(output),
3073
+ };
3074
+ await collectBody(output.body, context);
3075
+ return Promise.resolve(contents);
3076
+ };
3077
+ exports.deserializeAws_restJson1DisassociateApiCommand = deserializeAws_restJson1DisassociateApiCommand;
3078
+ const deserializeAws_restJson1DisassociateApiCommandError = async (output, context) => {
3079
+ const parsedOutput = {
3080
+ ...output,
3081
+ body: await parseBody(output.body, context),
3082
+ };
3083
+ let response;
3084
+ let errorCode = "UnknownError";
3085
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3086
+ switch (errorCode) {
3087
+ case "AccessDeniedException":
3088
+ case "com.amazonaws.appsync#AccessDeniedException":
3089
+ response = {
3090
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3091
+ name: errorCode,
3092
+ $metadata: deserializeMetadata(output),
3093
+ };
3094
+ break;
3095
+ case "BadRequestException":
3096
+ case "com.amazonaws.appsync#BadRequestException":
3097
+ response = {
3098
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3099
+ name: errorCode,
3100
+ $metadata: deserializeMetadata(output),
3101
+ };
3102
+ break;
3103
+ case "ConcurrentModificationException":
3104
+ case "com.amazonaws.appsync#ConcurrentModificationException":
3105
+ response = {
3106
+ ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
3107
+ name: errorCode,
3108
+ $metadata: deserializeMetadata(output),
3109
+ };
3110
+ break;
3111
+ case "InternalFailureException":
3112
+ case "com.amazonaws.appsync#InternalFailureException":
3113
+ response = {
3114
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
3115
+ name: errorCode,
3116
+ $metadata: deserializeMetadata(output),
3117
+ };
3118
+ break;
3119
+ case "NotFoundException":
3120
+ case "com.amazonaws.appsync#NotFoundException":
3121
+ response = {
3122
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
3123
+ name: errorCode,
3124
+ $metadata: deserializeMetadata(output),
3125
+ };
3126
+ break;
2480
3127
  default:
2481
3128
  const parsedBody = parsedOutput.body;
2482
3129
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -2493,9 +3140,9 @@ const deserializeAws_restJson1DeleteGraphqlApiCommandError = async (output, cont
2493
3140
  delete response.Message;
2494
3141
  return Promise.reject(Object.assign(new Error(message), response));
2495
3142
  };
2496
- const deserializeAws_restJson1DeleteResolverCommand = async (output, context) => {
3143
+ const deserializeAws_restJson1FlushApiCacheCommand = async (output, context) => {
2497
3144
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2498
- return deserializeAws_restJson1DeleteResolverCommandError(output, context);
3145
+ return deserializeAws_restJson1FlushApiCacheCommandError(output, context);
2499
3146
  }
2500
3147
  const contents = {
2501
3148
  $metadata: deserializeMetadata(output),
@@ -2503,8 +3150,8 @@ const deserializeAws_restJson1DeleteResolverCommand = async (output, context) =>
2503
3150
  await collectBody(output.body, context);
2504
3151
  return Promise.resolve(contents);
2505
3152
  };
2506
- exports.deserializeAws_restJson1DeleteResolverCommand = deserializeAws_restJson1DeleteResolverCommand;
2507
- const deserializeAws_restJson1DeleteResolverCommandError = async (output, context) => {
3153
+ exports.deserializeAws_restJson1FlushApiCacheCommand = deserializeAws_restJson1FlushApiCacheCommand;
3154
+ const deserializeAws_restJson1FlushApiCacheCommandError = async (output, context) => {
2508
3155
  const parsedOutput = {
2509
3156
  ...output,
2510
3157
  body: await parseBody(output.body, context),
@@ -2513,6 +3160,14 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
2513
3160
  let errorCode = "UnknownError";
2514
3161
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2515
3162
  switch (errorCode) {
3163
+ case "BadRequestException":
3164
+ case "com.amazonaws.appsync#BadRequestException":
3165
+ response = {
3166
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3167
+ name: errorCode,
3168
+ $metadata: deserializeMetadata(output),
3169
+ };
3170
+ break;
2516
3171
  case "ConcurrentModificationException":
2517
3172
  case "com.amazonaws.appsync#ConcurrentModificationException":
2518
3173
  response = {
@@ -2561,18 +3216,22 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
2561
3216
  delete response.Message;
2562
3217
  return Promise.reject(Object.assign(new Error(message), response));
2563
3218
  };
2564
- const deserializeAws_restJson1DeleteTypeCommand = async (output, context) => {
3219
+ const deserializeAws_restJson1GetApiAssociationCommand = async (output, context) => {
2565
3220
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2566
- return deserializeAws_restJson1DeleteTypeCommandError(output, context);
3221
+ return deserializeAws_restJson1GetApiAssociationCommandError(output, context);
2567
3222
  }
2568
3223
  const contents = {
2569
3224
  $metadata: deserializeMetadata(output),
3225
+ apiAssociation: undefined,
2570
3226
  };
2571
- await collectBody(output.body, context);
3227
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3228
+ if (data.apiAssociation !== undefined && data.apiAssociation !== null) {
3229
+ contents.apiAssociation = deserializeAws_restJson1ApiAssociation(data.apiAssociation, context);
3230
+ }
2572
3231
  return Promise.resolve(contents);
2573
3232
  };
2574
- exports.deserializeAws_restJson1DeleteTypeCommand = deserializeAws_restJson1DeleteTypeCommand;
2575
- const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) => {
3233
+ exports.deserializeAws_restJson1GetApiAssociationCommand = deserializeAws_restJson1GetApiAssociationCommand;
3234
+ const deserializeAws_restJson1GetApiAssociationCommandError = async (output, context) => {
2576
3235
  const parsedOutput = {
2577
3236
  ...output,
2578
3237
  body: await parseBody(output.body, context),
@@ -2581,18 +3240,18 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
2581
3240
  let errorCode = "UnknownError";
2582
3241
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2583
3242
  switch (errorCode) {
2584
- case "BadRequestException":
2585
- case "com.amazonaws.appsync#BadRequestException":
3243
+ case "AccessDeniedException":
3244
+ case "com.amazonaws.appsync#AccessDeniedException":
2586
3245
  response = {
2587
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3246
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2588
3247
  name: errorCode,
2589
3248
  $metadata: deserializeMetadata(output),
2590
3249
  };
2591
3250
  break;
2592
- case "ConcurrentModificationException":
2593
- case "com.amazonaws.appsync#ConcurrentModificationException":
3251
+ case "BadRequestException":
3252
+ case "com.amazonaws.appsync#BadRequestException":
2594
3253
  response = {
2595
- ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
3254
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2596
3255
  name: errorCode,
2597
3256
  $metadata: deserializeMetadata(output),
2598
3257
  };
@@ -2613,14 +3272,6 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
2613
3272
  $metadata: deserializeMetadata(output),
2614
3273
  };
2615
3274
  break;
2616
- case "UnauthorizedException":
2617
- case "com.amazonaws.appsync#UnauthorizedException":
2618
- response = {
2619
- ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
2620
- name: errorCode,
2621
- $metadata: deserializeMetadata(output),
2622
- };
2623
- break;
2624
3275
  default:
2625
3276
  const parsedBody = parsedOutput.body;
2626
3277
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -2637,18 +3288,22 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
2637
3288
  delete response.Message;
2638
3289
  return Promise.reject(Object.assign(new Error(message), response));
2639
3290
  };
2640
- const deserializeAws_restJson1FlushApiCacheCommand = async (output, context) => {
3291
+ const deserializeAws_restJson1GetApiCacheCommand = async (output, context) => {
2641
3292
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2642
- return deserializeAws_restJson1FlushApiCacheCommandError(output, context);
3293
+ return deserializeAws_restJson1GetApiCacheCommandError(output, context);
2643
3294
  }
2644
3295
  const contents = {
2645
3296
  $metadata: deserializeMetadata(output),
3297
+ apiCache: undefined,
2646
3298
  };
2647
- await collectBody(output.body, context);
3299
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3300
+ if (data.apiCache !== undefined && data.apiCache !== null) {
3301
+ contents.apiCache = deserializeAws_restJson1ApiCache(data.apiCache, context);
3302
+ }
2648
3303
  return Promise.resolve(contents);
2649
3304
  };
2650
- exports.deserializeAws_restJson1FlushApiCacheCommand = deserializeAws_restJson1FlushApiCacheCommand;
2651
- const deserializeAws_restJson1FlushApiCacheCommandError = async (output, context) => {
3305
+ exports.deserializeAws_restJson1GetApiCacheCommand = deserializeAws_restJson1GetApiCacheCommand;
3306
+ const deserializeAws_restJson1GetApiCacheCommandError = async (output, context) => {
2652
3307
  const parsedOutput = {
2653
3308
  ...output,
2654
3309
  body: await parseBody(output.body, context),
@@ -2713,22 +3368,22 @@ const deserializeAws_restJson1FlushApiCacheCommandError = async (output, context
2713
3368
  delete response.Message;
2714
3369
  return Promise.reject(Object.assign(new Error(message), response));
2715
3370
  };
2716
- const deserializeAws_restJson1GetApiCacheCommand = async (output, context) => {
3371
+ const deserializeAws_restJson1GetDataSourceCommand = async (output, context) => {
2717
3372
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2718
- return deserializeAws_restJson1GetApiCacheCommandError(output, context);
3373
+ return deserializeAws_restJson1GetDataSourceCommandError(output, context);
2719
3374
  }
2720
3375
  const contents = {
2721
3376
  $metadata: deserializeMetadata(output),
2722
- apiCache: undefined,
3377
+ dataSource: undefined,
2723
3378
  };
2724
3379
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2725
- if (data.apiCache !== undefined && data.apiCache !== null) {
2726
- contents.apiCache = deserializeAws_restJson1ApiCache(data.apiCache, context);
3380
+ if (data.dataSource !== undefined && data.dataSource !== null) {
3381
+ contents.dataSource = deserializeAws_restJson1DataSource(data.dataSource, context);
2727
3382
  }
2728
3383
  return Promise.resolve(contents);
2729
3384
  };
2730
- exports.deserializeAws_restJson1GetApiCacheCommand = deserializeAws_restJson1GetApiCacheCommand;
2731
- const deserializeAws_restJson1GetApiCacheCommandError = async (output, context) => {
3385
+ exports.deserializeAws_restJson1GetDataSourceCommand = deserializeAws_restJson1GetDataSourceCommand;
3386
+ const deserializeAws_restJson1GetDataSourceCommandError = async (output, context) => {
2732
3387
  const parsedOutput = {
2733
3388
  ...output,
2734
3389
  body: await parseBody(output.body, context),
@@ -2793,22 +3448,22 @@ const deserializeAws_restJson1GetApiCacheCommandError = async (output, context)
2793
3448
  delete response.Message;
2794
3449
  return Promise.reject(Object.assign(new Error(message), response));
2795
3450
  };
2796
- const deserializeAws_restJson1GetDataSourceCommand = async (output, context) => {
3451
+ const deserializeAws_restJson1GetDomainNameCommand = async (output, context) => {
2797
3452
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2798
- return deserializeAws_restJson1GetDataSourceCommandError(output, context);
3453
+ return deserializeAws_restJson1GetDomainNameCommandError(output, context);
2799
3454
  }
2800
3455
  const contents = {
2801
3456
  $metadata: deserializeMetadata(output),
2802
- dataSource: undefined,
3457
+ domainNameConfig: undefined,
2803
3458
  };
2804
3459
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2805
- if (data.dataSource !== undefined && data.dataSource !== null) {
2806
- contents.dataSource = deserializeAws_restJson1DataSource(data.dataSource, context);
3460
+ if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
3461
+ contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
2807
3462
  }
2808
3463
  return Promise.resolve(contents);
2809
3464
  };
2810
- exports.deserializeAws_restJson1GetDataSourceCommand = deserializeAws_restJson1GetDataSourceCommand;
2811
- const deserializeAws_restJson1GetDataSourceCommandError = async (output, context) => {
3465
+ exports.deserializeAws_restJson1GetDomainNameCommand = deserializeAws_restJson1GetDomainNameCommand;
3466
+ const deserializeAws_restJson1GetDomainNameCommandError = async (output, context) => {
2812
3467
  const parsedOutput = {
2813
3468
  ...output,
2814
3469
  body: await parseBody(output.body, context),
@@ -2817,18 +3472,18 @@ const deserializeAws_restJson1GetDataSourceCommandError = async (output, context
2817
3472
  let errorCode = "UnknownError";
2818
3473
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2819
3474
  switch (errorCode) {
2820
- case "BadRequestException":
2821
- case "com.amazonaws.appsync#BadRequestException":
3475
+ case "AccessDeniedException":
3476
+ case "com.amazonaws.appsync#AccessDeniedException":
2822
3477
  response = {
2823
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3478
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
2824
3479
  name: errorCode,
2825
3480
  $metadata: deserializeMetadata(output),
2826
3481
  };
2827
3482
  break;
2828
- case "ConcurrentModificationException":
2829
- case "com.amazonaws.appsync#ConcurrentModificationException":
3483
+ case "BadRequestException":
3484
+ case "com.amazonaws.appsync#BadRequestException":
2830
3485
  response = {
2831
- ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
3486
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2832
3487
  name: errorCode,
2833
3488
  $metadata: deserializeMetadata(output),
2834
3489
  };
@@ -2849,14 +3504,6 @@ const deserializeAws_restJson1GetDataSourceCommandError = async (output, context
2849
3504
  $metadata: deserializeMetadata(output),
2850
3505
  };
2851
3506
  break;
2852
- case "UnauthorizedException":
2853
- case "com.amazonaws.appsync#UnauthorizedException":
2854
- response = {
2855
- ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
2856
- name: errorCode,
2857
- $metadata: deserializeMetadata(output),
2858
- };
2859
- break;
2860
3507
  default:
2861
3508
  const parsedBody = parsedOutput.body;
2862
3509
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
@@ -3459,6 +4106,74 @@ const deserializeAws_restJson1ListDataSourcesCommandError = async (output, conte
3459
4106
  delete response.Message;
3460
4107
  return Promise.reject(Object.assign(new Error(message), response));
3461
4108
  };
4109
+ const deserializeAws_restJson1ListDomainNamesCommand = async (output, context) => {
4110
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4111
+ return deserializeAws_restJson1ListDomainNamesCommandError(output, context);
4112
+ }
4113
+ const contents = {
4114
+ $metadata: deserializeMetadata(output),
4115
+ domainNameConfigs: undefined,
4116
+ nextToken: undefined,
4117
+ };
4118
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
4119
+ if (data.domainNameConfigs !== undefined && data.domainNameConfigs !== null) {
4120
+ contents.domainNameConfigs = deserializeAws_restJson1DomainNameConfigs(data.domainNameConfigs, context);
4121
+ }
4122
+ if (data.nextToken !== undefined && data.nextToken !== null) {
4123
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
4124
+ }
4125
+ return Promise.resolve(contents);
4126
+ };
4127
+ exports.deserializeAws_restJson1ListDomainNamesCommand = deserializeAws_restJson1ListDomainNamesCommand;
4128
+ const deserializeAws_restJson1ListDomainNamesCommandError = async (output, context) => {
4129
+ const parsedOutput = {
4130
+ ...output,
4131
+ body: await parseBody(output.body, context),
4132
+ };
4133
+ let response;
4134
+ let errorCode = "UnknownError";
4135
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4136
+ switch (errorCode) {
4137
+ case "AccessDeniedException":
4138
+ case "com.amazonaws.appsync#AccessDeniedException":
4139
+ response = {
4140
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
4141
+ name: errorCode,
4142
+ $metadata: deserializeMetadata(output),
4143
+ };
4144
+ break;
4145
+ case "BadRequestException":
4146
+ case "com.amazonaws.appsync#BadRequestException":
4147
+ response = {
4148
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
4149
+ name: errorCode,
4150
+ $metadata: deserializeMetadata(output),
4151
+ };
4152
+ break;
4153
+ case "InternalFailureException":
4154
+ case "com.amazonaws.appsync#InternalFailureException":
4155
+ response = {
4156
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
4157
+ name: errorCode,
4158
+ $metadata: deserializeMetadata(output),
4159
+ };
4160
+ break;
4161
+ default:
4162
+ const parsedBody = parsedOutput.body;
4163
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
4164
+ response = {
4165
+ ...parsedBody,
4166
+ name: `${errorCode}`,
4167
+ message: parsedBody.message || parsedBody.Message || errorCode,
4168
+ $fault: "client",
4169
+ $metadata: deserializeMetadata(output),
4170
+ };
4171
+ }
4172
+ const message = response.message || response.Message || errorCode;
4173
+ response.message = message;
4174
+ delete response.Message;
4175
+ return Promise.reject(Object.assign(new Error(message), response));
4176
+ };
3462
4177
  const deserializeAws_restJson1ListFunctionsCommand = async (output, context) => {
3463
4178
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3464
4179
  return deserializeAws_restJson1ListFunctionsCommandError(output, context);
@@ -4423,6 +5138,86 @@ const deserializeAws_restJson1UpdateDataSourceCommandError = async (output, cont
4423
5138
  delete response.Message;
4424
5139
  return Promise.reject(Object.assign(new Error(message), response));
4425
5140
  };
5141
+ const deserializeAws_restJson1UpdateDomainNameCommand = async (output, context) => {
5142
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5143
+ return deserializeAws_restJson1UpdateDomainNameCommandError(output, context);
5144
+ }
5145
+ const contents = {
5146
+ $metadata: deserializeMetadata(output),
5147
+ domainNameConfig: undefined,
5148
+ };
5149
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
5150
+ if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
5151
+ contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
5152
+ }
5153
+ return Promise.resolve(contents);
5154
+ };
5155
+ exports.deserializeAws_restJson1UpdateDomainNameCommand = deserializeAws_restJson1UpdateDomainNameCommand;
5156
+ const deserializeAws_restJson1UpdateDomainNameCommandError = async (output, context) => {
5157
+ const parsedOutput = {
5158
+ ...output,
5159
+ body: await parseBody(output.body, context),
5160
+ };
5161
+ let response;
5162
+ let errorCode = "UnknownError";
5163
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5164
+ switch (errorCode) {
5165
+ case "AccessDeniedException":
5166
+ case "com.amazonaws.appsync#AccessDeniedException":
5167
+ response = {
5168
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
5169
+ name: errorCode,
5170
+ $metadata: deserializeMetadata(output),
5171
+ };
5172
+ break;
5173
+ case "BadRequestException":
5174
+ case "com.amazonaws.appsync#BadRequestException":
5175
+ response = {
5176
+ ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
5177
+ name: errorCode,
5178
+ $metadata: deserializeMetadata(output),
5179
+ };
5180
+ break;
5181
+ case "ConcurrentModificationException":
5182
+ case "com.amazonaws.appsync#ConcurrentModificationException":
5183
+ response = {
5184
+ ...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
5185
+ name: errorCode,
5186
+ $metadata: deserializeMetadata(output),
5187
+ };
5188
+ break;
5189
+ case "InternalFailureException":
5190
+ case "com.amazonaws.appsync#InternalFailureException":
5191
+ response = {
5192
+ ...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
5193
+ name: errorCode,
5194
+ $metadata: deserializeMetadata(output),
5195
+ };
5196
+ break;
5197
+ case "NotFoundException":
5198
+ case "com.amazonaws.appsync#NotFoundException":
5199
+ response = {
5200
+ ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
5201
+ name: errorCode,
5202
+ $metadata: deserializeMetadata(output),
5203
+ };
5204
+ break;
5205
+ default:
5206
+ const parsedBody = parsedOutput.body;
5207
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
5208
+ response = {
5209
+ ...parsedBody,
5210
+ name: `${errorCode}`,
5211
+ message: parsedBody.message || parsedBody.Message || errorCode,
5212
+ $fault: "client",
5213
+ $metadata: deserializeMetadata(output),
5214
+ };
5215
+ }
5216
+ const message = response.message || response.Message || errorCode;
5217
+ response.message = message;
5218
+ delete response.Message;
5219
+ return Promise.reject(Object.assign(new Error(message), response));
5220
+ };
4426
5221
  const deserializeAws_restJson1UpdateFunctionCommand = async (output, context) => {
4427
5222
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4428
5223
  return deserializeAws_restJson1UpdateFunctionCommandError(output, context);
@@ -5126,6 +5921,14 @@ const deserializeAws_restJson1AdditionalAuthenticationProviders = (output, conte
5126
5921
  return deserializeAws_restJson1AdditionalAuthenticationProvider(entry, context);
5127
5922
  });
5128
5923
  };
5924
+ const deserializeAws_restJson1ApiAssociation = (output, context) => {
5925
+ return {
5926
+ apiId: smithy_client_1.expectString(output.apiId),
5927
+ associationStatus: smithy_client_1.expectString(output.associationStatus),
5928
+ deploymentDetail: smithy_client_1.expectString(output.deploymentDetail),
5929
+ domainName: smithy_client_1.expectString(output.domainName),
5930
+ };
5931
+ };
5129
5932
  const deserializeAws_restJson1ApiCache = (output, context) => {
5130
5933
  return {
5131
5934
  apiCachingBehavior: smithy_client_1.expectString(output.apiCachingBehavior),
@@ -5237,6 +6040,25 @@ const deserializeAws_restJson1DeltaSyncConfig = (output, context) => {
5237
6040
  deltaSyncTableTTL: smithy_client_1.expectLong(output.deltaSyncTableTTL),
5238
6041
  };
5239
6042
  };
6043
+ const deserializeAws_restJson1DomainNameConfig = (output, context) => {
6044
+ return {
6045
+ appsyncDomainName: smithy_client_1.expectString(output.appsyncDomainName),
6046
+ certificateArn: smithy_client_1.expectString(output.certificateArn),
6047
+ description: smithy_client_1.expectString(output.description),
6048
+ domainName: smithy_client_1.expectString(output.domainName),
6049
+ hostedZoneId: smithy_client_1.expectString(output.hostedZoneId),
6050
+ };
6051
+ };
6052
+ const deserializeAws_restJson1DomainNameConfigs = (output, context) => {
6053
+ return (output || [])
6054
+ .filter((e) => e != null)
6055
+ .map((entry) => {
6056
+ if (entry === null) {
6057
+ return null;
6058
+ }
6059
+ return deserializeAws_restJson1DomainNameConfig(entry, context);
6060
+ });
6061
+ };
5240
6062
  const deserializeAws_restJson1DynamodbDataSourceConfig = (output, context) => {
5241
6063
  return {
5242
6064
  awsRegion: smithy_client_1.expectString(output.awsRegion),
@@ -5261,6 +6083,7 @@ const deserializeAws_restJson1FunctionConfiguration = (output, context) => {
5261
6083
  functionArn: smithy_client_1.expectString(output.functionArn),
5262
6084
  functionId: smithy_client_1.expectString(output.functionId),
5263
6085
  functionVersion: smithy_client_1.expectString(output.functionVersion),
6086
+ maxBatchSize: smithy_client_1.expectInt32(output.maxBatchSize),
5264
6087
  name: smithy_client_1.expectString(output.name),
5265
6088
  requestMappingTemplate: smithy_client_1.expectString(output.requestMappingTemplate),
5266
6089
  responseMappingTemplate: smithy_client_1.expectString(output.responseMappingTemplate),
@@ -5419,6 +6242,7 @@ const deserializeAws_restJson1Resolver = (output, context) => {
5419
6242
  dataSourceName: smithy_client_1.expectString(output.dataSourceName),
5420
6243
  fieldName: smithy_client_1.expectString(output.fieldName),
5421
6244
  kind: smithy_client_1.expectString(output.kind),
6245
+ maxBatchSize: smithy_client_1.expectInt32(output.maxBatchSize),
5422
6246
  pipelineConfig: output.pipelineConfig !== undefined && output.pipelineConfig !== null
5423
6247
  ? deserializeAws_restJson1PipelineConfig(output.pipelineConfig, context)
5424
6248
  : undefined,